From: pemente@northpark.edu (Eric Pement)
Subject: Re: problem getting hooks to be active
Date: 20 Aug 2003 08:46:32 -0700 [thread overview]
Message-ID: <227a55e9.0308200746.486a4685@posting.google.com> (raw)
In-Reply-To: 84u18j2i16.fsf@slowfox.is.informatik.uni-duisburg.de
kai.grossjohann@gmx.net (Kai Großjohann) wrote in message news:<84u18j2i16.fsf@slowfox.is.informatik.uni-duisburg.de>...
> pemente@northpark.edu (Eric Pement) writes:
>
> > (add-hook 'sgml-mode-hook'
> > (lambda ()
> > (setq tab-width 2)
>
> Do you know what tab-width does?
Yes. It controls the number of columns that are used to represent
TAB characters embedded in the document. (As an aside, I have a page
on Emacs and Tabs here, which is the limits of my knowledge here:
http://www.student.northpark.edu/pemente/emacs_tabs.htm)
> I'm guessing that the code is doing
> what you tell it to, but it's not what you expect.
Normally, that's a reasonable guess, but C-h v (describe-variable)
confirms that my variables are not being set. When I followed the
advice of Peter Solodov to evaluate the code in the *scratch* buffer,
I instantly recognize the change, so my guess for now is that I have
other code in my .emacs file which conflicts with it.
> Hm. Well, do you have tab characters in your files?
Yes. Basically, I edit XML files written by other people, people
who don't know about TABS and have no preference either way. The
spacing is inconsistent and irregular (regardless of which tab-width I
select), and so I'd want to use just hard spaces for spacing, so
whoever works on these files after me will at least have something
consistent to work with.
> A completely wild speculation is that you actually want to set
> sgml-indent-data to t to make it indent more often. Then you want to
> set sgml-indent-step to 2 (which is the default, afaik).
But the problem is that none of the settings in the "block" are
being obeyed. But I can try your suggestion manually and see what
results I get.
> And for filling, maybe you want to turn on auto-fill mode?
Already on, along with abbrev-mode (a real time-saver for me).
> Does this help?
It's encouraging to get good responses. I'll try your suggestions
about sgml-indent-data and sgml-indent-step to see what I get. Thanks
for answering.
--
Eric Pement
next prev parent reply other threads:[~2003-08-20 15:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-11 17:34 problem getting hooks to be active Eric Pement
2003-08-11 17:45 ` Peter Solodov
2003-08-11 18:26 ` Johan Bockgård
2003-08-11 18:30 ` Barry Margolin
2003-08-12 16:32 ` Eric Pement
2003-08-12 16:54 ` Peter Solodov
2003-08-15 14:54 ` Eric Pement
2003-08-15 12:59 ` Kai Großjohann
2003-08-20 15:46 ` Eric Pement [this message]
2003-08-24 12:58 ` Kai Großjohann
2003-08-20 17:29 ` Eric Pement
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=227a55e9.0308200746.486a4685@posting.google.com \
--to=pemente@northpark.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).