help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: set margin width locally doesn't work


From: najja
Subject: Re: set margin width locally doesn't work
Date: Tue, 19 Aug 2008 01:42:44 -0700 (PDT)
User-agent: G2/1.0

You are right. It's better to reverse it and make zero margin default.
Thanks.

btw: major-mode is a variable instead of a function. :-)

On Aug 19, 5:00 am, address@hidden (Pascal J. Bourguignon)
wrote:
> Najja <address@hidden> writes:
> >> najja <address@hidden> writes:
> >> > hi there,
>
> >> > I like having two blank margin flanking the text when I do my daily
> >> > editing so I add this to my .emacs:
>
> >> > (setq default-left-margin-width 20)
> >> > (setq default-right-margin-width 20)
>
> > I change my configuration to:
> > (add-hook 'newsticker-treeview-list-mode-hook
> >           '(lambda nil
> >         (setq left-margin-width 0)
> >         (setq right-margin-width 0)) nil t)
> > (add-hook 'newsticker-start-hook
> >           '(lambda nil
> >         (setq left-margin-width 0)
> >         (setq right-margin-width 0)) nil t)
> > However, emacs still show two flanking blank margin when I shoot
> > newsticker after restart.
>
> Well, setting the default-left-margin-width et al. like this looks a
> little strong.   I would have done the reverse, left the default at 0,
> and added hooks to the modes I usually use AND I want to have margins
> with.
>
> Probably the problem you have is that newsticker uses actuall various
> modes for its various buffers (I assume, it doesn't seem to do much
> here), and it happens the buffer where it displays what you want are
> in modes for which the hooks you defined are not executed.  You can
> check the mode of a buffer by typing M-x major-mode RET in the buffer.
>
> But consider doing the reverse, leave the default at 0, and set
> left-margin-width and right-margin-width to 20 in hooks specific to
> the modes you use for your daily editing (eg. text-mode-hook).
>
> --
> __Pascal Bourguignon__                    http://www.informatimago.com/
>
> NOTE: The most fundamental particles in this product are held
> together by a "gluing" force about which little is currently known
> and whose adhesive power can therefore not be permanently
> guaranteed.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]