|
View:
New views
13 Messages
—
Rating Filter:
Alert me
|
|
|
html-helper-mode won't indentAquamacs 2.0 ships with html-helper-mode as the default mode for
".html" files. The mode seems to basically work - syntax highlighting and special commands work as advertised. Trouble is that indenting just doesn't work at all. Instead of inserting the proper indentation, a TAB removes existing indentation. html-mode doesn't have the problem, but html-mode has far fewer features than html-helper-mode. This has been mentioned before, at http://www.opensubscriber.com/message/help-gnu-emacs@.../5925879.html -- Pete _______________________________________________ Aquamacs-devel mailing list Aquamacs-devel@... http://lists.aquamacs.org/mailman/listinfo.cgi/aquamacs-devel |
|
|
Re: html-helper-mode won't indentOn Sep 27, 2009, at 2:09 AM, Pete Siemsen wrote:
> Aquamacs 2.0 ships with html-helper-mode as the default mode for > ".html" files. The mode seems to basically work - syntax > highlighting and special commands work as advertised. Trouble is > that indenting just doesn't work at all. Instead of inserting the > proper indentation, a TAB removes existing indentation. > > html-mode doesn't have the problem, but html-mode has far fewer > features than html-helper-mode. So, what do you suggest? Can you fix the indentation problem with h-h- m? That would be ideal. -- http://aquamacs.org -- Aquamacs: Emacs on Mac OS X http://aquamacs.org/donate -- Could we help you? Return the favor and support the Aquamacs Project! _______________________________________________ Aquamacs-devel mailing list Aquamacs-devel@... http://lists.aquamacs.org/mailman/listinfo.cgi/aquamacs-devel |
|
|
Re: html-helper-mode won't indentOn 27 Sep 2009, at 08:09, Pete Siemsen wrote:
> Aquamacs 2.0 ships with html-helper-mode as the default mode for > ".html" files. The mode seems to basically work - syntax > highlighting and special commands work as advertised. Trouble is > that indenting just doesn't work at all. Instead of inserting the > proper indentation, a TAB removes existing indentation. My fix since ever: (eval-after-load "html-helper" '(define-key html-helper-mode-map "\M-q" 'indent-region)) --e. _______________________________________________ Aquamacs-devel mailing list Aquamacs-devel@... http://lists.aquamacs.org/mailman/listinfo.cgi/aquamacs-devel |
|
|
Re: html-helper-mode won't indentOn Sep 27, 2009, at 2:15 PM, Enrico Franconi wrote:
> On 27 Sep 2009, at 08:09, Pete Siemsen wrote: > >> Aquamacs 2.0 ships with html-helper-mode as the default mode for >> ".html" files. The mode seems to basically work - syntax >> highlighting and special commands work as advertised. Trouble is >> that indenting just doesn't work at all. Instead of inserting the >> proper indentation, a TAB removes existing indentation. > > My fix since ever: > > (eval-after-load "html-helper" > '(define-key html-helper-mode-map "\M-q" 'indent-region)) tab-command",and then do the right thing. D _______________________________________________ Aquamacs-devel mailing list Aquamacs-devel@... http://lists.aquamacs.org/mailman/listinfo.cgi/aquamacs-devel |
|
|
Re: html-helper-mode won't indentOn Sep 27, 2009, at 7:23 AM, David Reitter wrote:
I agree. I'll try to fix it. -- Pete _______________________________________________ Aquamacs-devel mailing list Aquamacs-devel@... http://lists.aquamacs.org/mailman/listinfo.cgi/aquamacs-devel |
|
|
Re: html-helper-mode won't indentOn Sep 27, 2009, at 7:23 AM, David Reitter wrote:
Here's what I was able learn by Googling: Html-mode was written by Marc Andreessen of Netscape fame. It is documented in the GNU Emacs manual, so it must've been absorbed by GNU Emacs as the "standard" HTML mode. Html-helper-mode was written later, by Nelson Minar. It was inspired by html-mode. The author wrote up the differences between the two modes, at http://www.santafe.edu/~nelson/tools/differences.html. Briefly: html-mode html-helper-mode older newer written to replace html-mode built into GNU Emacs a .el file documented in GNU Emacs manual limited lots of features written by Marc Andreessen written by Nelson Minar simple syntax highlighting better syntax highlighting no templates templates via tempo.el 1. The html-helper-mode that comes with Aquamacs is version 1.5. Version 2.19 is available. Version 1.5 has a much smaller set of commands, so at first glance you might conclude that html-helper-mode isn't much better than html-mode. 2. Html-helper-mode seems to indent poorly, but it will indent lists (<li> tags). Perhaps the author of html-helper-mode only wanted indentation for lists. 3. A "solution" to the indenting problem is to call "tidy" to do sophisticated indenting/rewriting of your entire HTML buffer. This is cool, but tidy does a lot more to the HTML than just reindenting. Fortunately, tidy comes with Mac OS X, so it's a good general solution for Aquamacs users. This approach is IMHO, html-mode is too rudimentary, even though it has nice indentation. It would be possible to improve the indentation in html-helper-mode, with some effort, but it seems that the author intended it to produce mostly flat HTML. I think the best approach is to load the latest html-helper-mode and add the hack to use tidy to indent the HTML. -- Pete _______________________________________________ Aquamacs-devel mailing list Aquamacs-devel@... http://lists.aquamacs.org/mailman/listinfo.cgi/aquamacs-devel |
|
|
Re: html-helper-mode won't indentOn Sep 27, 2009, at 2:53 PM, David Reitter wrote: > On Sep 27, 2009, at 2:15 PM, Enrico Franconi wrote: > >> On 27 Sep 2009, at 08:09, Pete Siemsen wrote: >> >>> Aquamacs 2.0 ships with html-helper-mode as the default mode for >>> ".html" files. The mode seems to basically work - syntax >>> highlighting and special commands work as advertised. Trouble is >>> that indenting just doesn't work at all. Instead of inserting the >>> proper indentation, a TAB removes existing indentation. >> >> My fix since ever: >> >> (eval-after-load "html-helper" >> '(define-key html-helper-mode-map "\M-q" 'indent-region)) > > OK, can we bind Tab to something similar... it should be "indent-for- > tab-command",and then do the right thing. I don't see how Enrico's suggestion helps. -- Pete _______________________________________________ Aquamacs-devel mailing list Aquamacs-devel@... http://lists.aquamacs.org/mailman/listinfo.cgi/aquamacs-devel |
|
|
Re: html-helper-mode won't indentOn Sep 28, 2009, at 7:42 AM, Pete Siemsen wrote:
> 1. The html-helper-mode that comes with Aquamacs is version 1.5. > Version 2.19 is available. Version 1.5 has a much smaller set of > commands, so at first glance you might conclude that html-helper- > mode isn't much better than html-mode. Are you sure? The 1.5 is based on an automatic CVS versioning mechanism. Doesn't reflect reality. If you look at the authors list, you might infer that we're actually using a much more advanced version of html-helper-mode, which is based on Nelson Minar's original mode. http://www.nongnu.org/baol-hth/index.html Writing a little Lisp function to indent a single line would be the cleanest approach. -- http://aquamacs.org -- Aquamacs: Emacs on Mac OS X http://aquamacs.org/donate -- Could we help you? Return the favor and support the Aquamacs Project! _______________________________________________ Aquamacs-devel mailing list Aquamacs-devel@... http://lists.aquamacs.org/mailman/listinfo.cgi/aquamacs-devel |
|
|
Re: html-helper-mode won't indentOn Sep 28, 2009, at 6:27 AM, David Reitter wrote: > On Sep 28, 2009, at 7:42 AM, Pete Siemsen wrote: >> 1. The html-helper-mode that comes with Aquamacs is version 1.5. >> Version 2.19 is available. Version 1.5 has a much smaller set of >> commands, so at first glance you might conclude that html-helper- >> mode isn't much better than html-mode. > > Are you sure? The 1.5 is based on an automatic CVS versioning > mechanism. Doesn't reflect reality. > If you look at the authors list, you might infer that we're actually > using a much more advanced version of html-helper-mode, which is > based on Nelson Minar's original mode. > > http://www.nongnu.org/baol-hth/index.html Ok, I'm confused :-) Here are the versions that I now know about: 1. The one that comes with Aquamacs. It's in /Applications/Aquamacs.app/Contents/Resources/site-lisp/edit- modes/html-helper-mode.el. It's html-helper-mode-version variable says "1.5". It's 94203 bytes. When you do help-mode, it displays a very short list of commands - about 35. This one has a comment that says you modified it for Aquamacs in 2008. 2. The "beta" one from Nelson Minar's site. It's html-helper-mode-version variable says "2.19". It's 45873 bytes. When you do help-mode, it displays a longer list of commands - about 94. 3. The one I just downloaded from http://www.nongnu.org/baol-hth/ It's html-helper-mode-version variable says "3.0.4jolly". It's 97505 bytes. When you do help-mode, it displays the longest list of commands - about 134. Please forgive my confusion :-) > Writing a little Lisp function to indent a single line would be the > cleanest approach. I'm interested. Should I start with version #3, or does it need some Aquamacs-specific mods first? -- Pete _______________________________________________ Aquamacs-devel mailing list Aquamacs-devel@... http://lists.aquamacs.org/mailman/listinfo.cgi/aquamacs-devel |
|
|
Re: html-helper-mode won't indentOn Sep 28, 2009, at 11:33 AM, Pete Siemsen wrote:
> > On Sep 28, 2009, at 6:27 AM, David Reitter wrote: > >> On Sep 28, 2009, at 7:42 AM, Pete Siemsen wrote: >>> 1. The html-helper-mode that comes with Aquamacs is version 1.5. >>> Version 2.19 is available. Version 1.5 has a much smaller set of >>> commands, so at first glance you might conclude that html-helper- >>> mode isn't much better than html-mode. >> >> Are you sure? The 1.5 is based on an automatic CVS versioning >> mechanism. Doesn't reflect reality. > >> If you look at the authors list, you might infer that we're >> actually using a much more advanced version of html-helper-mode, >> which is based on Nelson Minar's original mode. >> >> http://www.nongnu.org/baol-hth/index.html > > Ok, I'm confused :-) Here are the versions that I now know about: > > 1. > The one that comes with Aquamacs. > It's in /Applications/Aquamacs.app/Contents/Resources/site-lisp/edit- > modes/html-helper-mode.el. > It's html-helper-mode-version variable says "1.5". > It's 94203 bytes. > When you do help-mode, it displays a very short list of commands - > about 35. > This one has a comment that says you modified it for Aquamacs in 2008. available version from their CVS. This is dated May 16, and it is still here: http://cvs.savannah.gnu.org/viewvc/baol-hth/html-helper-mode.el?revision=3.10&root=baol-hth&view=markup It has a few fixes on top of that that I think I wrote, as in the change log and in the comment. > 3. > The one I just downloaded from http://www.nongnu.org/baol-hth/ > It's html-helper-mode-version variable says "3.0.4jolly". > It's 97505 bytes. > When you do help-mode, it displays the longest list of commands - > about 134. > > Please forgive my confusion :-) Why jolly, and not kilo, which they have available there as well? Kilo is dated May 16, 2004. The two don't seem to differ in terms of commands, but the CVS based version seems to be more modern (and has dropped support for Emacs 18). >> Writing a little Lisp function to indent a single line would be the >> cleanest approach. > > I'm interested. Should I start with version #3, or does it need > some Aquamacs-specific > mods first? I'd say start with version #1, the one included in Aquamacs. It's where the original authors apparently gave up. - David _______________________________________________ Aquamacs-devel mailing list Aquamacs-devel@... http://lists.aquamacs.org/mailman/listinfo.cgi/aquamacs-devel |
|
|
Re: html-helper-mode won't indentOn Sep 28, 2009, at 11:33 AM, Pete Siemsen wrote:
> >> Writing a little Lisp function to indent a single line would be the >> cleanest approach. > > I'm interested. Should I start with version #3, or does it need > some Aquamacs-specific > mods first? Further to that... Somebody seems to have done *some* work on it: https://launchpad.net/ubuntu/+source/html-helper-mode I downloaded this (i.e. applied their patch)... it seems like our version is still more modern, but probably "beta"... It might be worthwhile going through their changes to see what we need to do here. - D _______________________________________________ Aquamacs-devel mailing list Aquamacs-devel@... http://lists.aquamacs.org/mailman/listinfo.cgi/aquamacs-devel |
|
|
Re: html-helper-mode won't indentOn Sep 30, 2009, at 12:49 PM, David Reitter wrote: > On Sep 28, 2009, at 11:33 AM, Pete Siemsen wrote: > >> >> On Sep 28, 2009, at 6:27 AM, David Reitter wrote: >> >>> On Sep 28, 2009, at 7:42 AM, Pete Siemsen wrote: >>>> 1. The html-helper-mode that comes with Aquamacs is version 1.5. >>>> Version 2.19 is available. Version 1.5 has a much smaller set of >>>> commands, so at first glance you might conclude that html-helper- >>>> mode isn't much better than html-mode. >>> >>> Are you sure? The 1.5 is based on an automatic CVS versioning >>> mechanism. Doesn't reflect reality. >> >>> If you look at the authors list, you might infer that we're >>> actually using a much more advanced version of html-helper-mode, >>> which is based on Nelson Minar's original mode. >>> >>> http://www.nongnu.org/baol-hth/index.html >> >> Ok, I'm confused :-) Here are the versions that I now know about: >> >> 1. >> The one that comes with Aquamacs. >> It's in /Applications/Aquamacs.app/Contents/Resources/site-lisp/ >> edit-modes/html-helper-mode.el. >> It's html-helper-mode-version variable says "1.5". >> It's 94203 bytes. >> When you do help-mode, it displays a very short list of commands - >> about 35. >> This one has a comment that says you modified it for Aquamacs in >> 2008. > > ... and the version control change log says that is the latest > available version from their CVS. This is dated May 16, and it is > still here: > > http://cvs.savannah.gnu.org/viewvc/baol-hth/html-helper-mode.el?revision=3.10&root=baol-hth&view=markup > > It has a few fixes on top of that that I think I wrote, as in the > change log and in the comment. Ok, thanks. My quest for the latest html-helper-mode is almost complete. Here's the reasons for my confusion, in the hope that others may avoid this in the future... When the Aquamacs html-helper-mode didn't behave as I expected, I did describe-mode. It showed a list of only 32 key bindings. I assumed it was old. I grep`d the .el file for "version" and found the html- helper-mode-version variable set to "1.5". I Google'd for html-helper- mode and found Nelson Minar's old site. The beta version there had html-helper-mode-version set to "2.19". I loaded it and did describe- mode, and found many more key bindings. I thought "This makes sense - version 1.5 is ancient, and version 2.19 has more key bindings". Dead wrong, but sensible. Then you told me about the baol-hth website, which has versions of html-helper-mode newer than Nelson's. I went to the site's "download area". It has misleading file names, but I finally got "3.0.4kilo", after some confusion with "3.0.4jolly". I loaded "3.0.4kilo", and describe-mode showed even more key bindings. I thought I was making progress. Then you supplied the link above, to the CVS tree at the baol-hth website. It has an even newer version - "3.10". It would be nice if that version were available in the website's "download" area. With some help from you, I've learned that the version distributed with Aquamacs is really 3.10 from the baol-hth website, but with some modifications. One modification was changing the version number from 3.10 to 1.5. I think this is confusing at best. I suggest that the version should be "3.10 with Aquamacs mods" or even "3.11". The other modifications have to do with whether it's a major mode or a minor mode. I don't understand them, but I do know that they "break" describe-mode. In the unmodified 3.10, describe-mode lists 176 key bindings. In the version that comes with Aquamacs, it lists 32. The unlisted keys work, they just aren't listed by describe-mode. Something about the mods made to version 3.10 to produce the Aquamacs version has broken describe-mode. -- Pete >> 3. >> The one I just downloaded from http://www.nongnu.org/baol-hth/ >> It's html-helper-mode-version variable says "3.0.4jolly". >> It's 97505 bytes. >> When you do help-mode, it displays the longest list of commands - >> about 134. >> >> Please forgive my confusion :-) > > Why jolly, and not kilo, which they have available there as well? > Kilo is dated May 16, 2004. > > The two don't seem to differ in terms of commands, but the CVS based > version seems to be more modern (and has dropped support for Emacs > 18). In their "downloads" directory, I assumed the one labelled "beta" was the latest, but it's actually a copy of jolly. I should've looked at the dates instead of the file names, and I would've gotten "kilo". But even that is wrong, as described above. >>> Writing a little Lisp function to indent a single line would be >>> the cleanest approach. >> >> I'm interested. Should I start with version #3, or does it need >> some Aquamacs-specific >> mods first? > > I'd say start with version #1, the one included in Aquamacs. It's > where the original authors apparently gave up. Ok, but can you help fix html-helper-mode-version and describe-mode? -- Pete _______________________________________________ Aquamacs-devel mailing list Aquamacs-devel@... http://lists.aquamacs.org/mailman/listinfo.cgi/aquamacs-devel |
|
|
Re: html-helper-mode won't indentPete,
On Oct 1, 2009, at 6:09 PM, siemsen@... wrote: > With some help from you, I've learned that the version distributed > with Aquamacs is really 3.10 from the baol-hth website, but with > some modifications. One modification was changing the version > number from 3.10 to 1.5. I think this is confusing at best. I > suggest that the version should be "3.10 with Aquamacs mods" or even > "3.11". Yes, that's confusing. As explained, this happened due to an automatic feature in CVS, which inserts the CVS version number of the file, which is 3.10 (or so) in their repository, but was 1.5 in ours when we still had CVS. I've changed that now. Don't know about the describe-mode issue. Perhaps you want to check that, but the other HTML related changes that you wanted to work on seem more important. - David _______________________________________________ Aquamacs-devel mailing list Aquamacs-devel@... http://lists.aquamacs.org/mailman/listinfo.cgi/aquamacs-devel |
| Free embeddable forum powered by Nabble | Forum Help |