unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* html-mode: adding tags to html-tag-alist
@ 2009-07-15  1:49 tyler
  2009-07-15 10:45 ` Bernardo
  0 siblings, 1 reply; 3+ messages in thread
From: tyler @ 2009-07-15  1:49 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

I'm trying to customize html-mode, but I'm having trouble with the
skeleton stuff. I want to get a prompt for class or id for div tags, but
I can't figure out how to do it. I think I have to change
html-tags-alist somehow, but I'm not sure how, or if there's anything
else I need to do in addition. The manual is pretty skimpy on this
topic, and I'm missing a few steps between the description of skeletons
in the wiki and the application of the skeletons in html-mode.

Can anyone explain this to me, or point me to a fuller description
somewhere else?

Thanks,

Tyler

-- 
When in doubt, use brute force.
                                       --Ken Thompson





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: html-mode: adding tags to html-tag-alist
  2009-07-15  1:49 html-mode: adding tags to html-tag-alist tyler
@ 2009-07-15 10:45 ` Bernardo
  2009-07-15 15:23   ` tyler
  0 siblings, 1 reply; 3+ messages in thread
From: Bernardo @ 2009-07-15 10:45 UTC (permalink / raw)
  To: help-gnu-emacs


> 
> I'm trying to customize html-mode, but I'm having trouble with the
> skeleton stuff. I want to get a prompt for class or id for div tags, but
> I can't figure out how to do it. I think I have to change
> html-tags-alist somehow, but I'm not sure how, or if there's anything
> else I need to do in addition. The manual is pretty skimpy on this
> topic, and I'm missing a few steps between the description of skeletons
> in the wiki and the application of the skeletons in html-mode.

i've bookmared this (if you are keen for more reading):
http://www.panix.com/~tehom/my-code/skel-recipe.txt

and there is always EmacsWiki:
http://www.emacswiki.org/cgi-bin/wiki/SkeletonMode




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: html-mode: adding tags to html-tag-alist
  2009-07-15 10:45 ` Bernardo
@ 2009-07-15 15:23   ` tyler
  0 siblings, 0 replies; 3+ messages in thread
From: tyler @ 2009-07-15 15:23 UTC (permalink / raw)
  To: help-gnu-emacs

Bernardo <bernardo.bacic@pobox.com> writes:

>>
>> I'm trying to customize html-mode, but I'm having trouble with the
>> skeleton stuff. I want to get a prompt for class or id for div tags, but
>> I can't figure out how to do it. I think I have to change
>> html-tags-alist somehow, but I'm not sure how, or if there's anything
>> else I need to do in addition. The manual is pretty skimpy on this
>> topic, and I'm missing a few steps between the description of skeletons
>> in the wiki and the application of the skeletons in html-mode.
>
> i've bookmared this (if you are keen for more reading):
> http://www.panix.com/~tehom/my-code/skel-recipe.txt
>
> and there is always EmacsWiki:
> http://www.emacswiki.org/cgi-bin/wiki/SkeletonMode

Thanks for your help, but that's not where my problem is. I can follow,
sort of, the instructions for setting up a basic skeleton. What I need
to know how to do is to modify the html-tag-alist in html-mode to get it
to do what I want with div tags.

The help for sgml-tag says:

Prompt for a tag and insert it, optionally with attributes.
Completion and configuration are done according to `sgml-tag-alist'.

It goes on to say that this is built on skeleton-insert, pointing to
that help page. The basic syntax of skeletons I'm beginning to
understand, so I looked at the help for sgml-tag-alist. This page
describes two different alists, TAGRULE and ATTRIBUTERULE. This variable
is customizable, so I opened the customize dialogue and added a new
cons-cell with Tag Name: div, but I can't figure out a Tag Rule that
will provide class and id as options, and also separate the start and
end tags with a newline.

A further complication is that whatever I do in the customize dialogue
gets overwritten by the hard-coded contents of html-tag-alist anyways,
so it doesn't really matter.

So what I'm wondering now is if it is even possible to modify the way
sgml-tag works in html-mode, and if so, how? I could probably figure out
how to write my own skeleton from scratch and have that loaded with an
html-mode-hook, but that seems silly when html-mode is so close to
providing everything I'm looking for.

Any other suggestions? Thanks!

Tyler


-- 
There is something fascinating about science. One gets such wholesale 
returns of conjecture out of such a trifling investment of fact.
                                       --Mark Twain





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-07-15 15:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-15  1:49 html-mode: adding tags to html-tag-alist tyler
2009-07-15 10:45 ` Bernardo
2009-07-15 15:23   ` tyler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).