From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: pemente@northpark.edu (Eric Pement) Newsgroups: gmane.emacs.help Subject: Re: problem getting hooks to be active Date: 20 Aug 2003 08:46:32 -0700 Organization: http://groups.google.com/ Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <227a55e9.0308200746.486a4685@posting.google.com> References: <227a55e9.0308110934.1eb23f37@posting.google.com> <84u18j2i16.fsf@slowfox.is.informatik.uni-duisburg.de> NNTP-Posting-Host: deer.gmane.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1061419475 18318 80.91.224.253 (20 Aug 2003 22:44:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 20 Aug 2003 22:44:35 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Aug 21 00:44:34 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19pbgw-0007xH-00 for ; Thu, 21 Aug 2003 00:44:34 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19pVPo-0004WH-FJ for geh-help-gnu-emacs@m.gmane.org; Wed, 20 Aug 2003 12:02:28 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews1.google.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 54 Original-NNTP-Posting-Host: 66.185.249.144 Original-X-Trace: posting.google.com 1061394395 10655 127.0.0.1 (20 Aug 2003 15:46:35 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: 20 Aug 2003 15:46:35 GMT Original-Xref: shelby.stanford.edu gnu.emacs.help:116021 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:11939 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:11939 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