GNU bug report logs - #14200
24.3; Window fringes / margins get reset on switching buffer

Previous Next

Package: emacs;

Reported by: E Sabof <esabof <at> gmail.com>

Date: Sat, 13 Apr 2013 20:56:01 UTC

Severity: normal

Tags: notabug

Found in version 24.3

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 14200 in the body.
You can then email your comments to 14200 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#14200; Package emacs. (Sat, 13 Apr 2013 20:56:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to E Sabof <esabof <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 13 Apr 2013 20:56:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: E Sabof <esabof <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3; Window fringes / margins get reset on switching buffer
Date: Sat, 13 Apr 2013 21:51:35 +0100
[Message part 1 (text/plain, inline)]
If in emacs -Q, I evaluate:

(set-window-margins nil 5 5)
(set-window-fringes nil 16 16)

and switch to a different buffer, the fringes/margins will be reset. They
will still be frame-default if I switch back to the same buffer.

Btw, I think it would make more sense, if the above settings where attached
to a buffer and not a window. At the same time there is a buffer-local
variable called window-size-fixed, which looks like it should be a window
property.

Evgeni
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14200; Package emacs. (Sat, 13 Apr 2013 21:41:02 GMT) Full text and rfc822 format available.

Message #8 received at 14200 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: E Sabof <esabof <at> gmail.com>
Cc: 14200 <at> debbugs.gnu.org
Subject: Re: bug#14200: 24.3;
	Window fringes / margins get reset on switching buffer
Date: Sun, 14 Apr 2013 00:36:27 +0300
> Date: Sat, 13 Apr 2013 21:51:35 +0100
> From: E Sabof <esabof <at> gmail.com>
> 
> If in emacs -Q, I evaluate:
> 
> (set-window-margins nil 5 5)
> (set-window-fringes nil 16 16)
> 
> and switch to a different buffer, the fringes/margins will be reset. They
> will still be frame-default if I switch back to the same buffer.

If you want the values you set be preserved for that buffer, you need
to set the buffer-local values of left/right-margin-width and
left/right-fringe-width.  If you want them to be preserved in a window
regardless of the buffer it displays, switch to another buffer by
invoking set-window-buffer with non-nil 3rd argument.

> Btw, I think it would make more sense, if the above settings where attached
> to a buffer and not a window.

They are (or can be), see above.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14200; Package emacs. (Sat, 13 Apr 2013 21:57:01 GMT) Full text and rfc822 format available.

Message #11 received at 14200 <at> debbugs.gnu.org (full text, mbox):

From: E Sabof <esabof <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 14200 <at> debbugs.gnu.org
Subject: Re: bug#14200: 24.3;
	Window fringes / margins get reset on switching buffer
Date: Sat, 13 Apr 2013 22:52:24 +0100
[Message part 1 (text/plain, inline)]
On Sat, Apr 13, 2013 at 10:36 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:

> > Date: Sat, 13 Apr 2013 21:51:35 +0100
> > From: E Sabof <esabof <at> gmail.com>
> >
> > If in emacs -Q, I evaluate:
> >
> > (set-window-margins nil 5 5)
> > (set-window-fringes nil 16 16)
> >
> > and switch to a different buffer, the fringes/margins will be reset. They
> > will still be frame-default if I switch back to the same buffer.
>
> If you want the values you set be preserved for that buffer, you need
> to set the buffer-local values of left/right-margin-width and
> left/right-fringe-width.  If you want them to be preserved in a window
> regardless of the buffer it displays, switch to another buffer by
> invoking set-window-buffer with non-nil 3rd argument.
>

Thanks, but changing those variables (or the corresponding fringe ones)
doesn't seem to have any effect. emacs-version: GNU Emacs 24.3.1
(x86_64-unknown-linux-gnu, GTK+ Version 2.24.13) of 2013-03-05 on ubuntu

> Btw, I think it would make more sense, if the above settings where
> attached
> > to a buffer and not a window.
>
> They are (or can be), see above.
>

Evgeni
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14200; Package emacs. (Sun, 14 Apr 2013 05:39:02 GMT) Full text and rfc822 format available.

Message #14 received at 14200 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: E Sabof <esabof <at> gmail.com>
Cc: 14200 <at> debbugs.gnu.org
Subject: Re: bug#14200: 24.3;
	Window fringes / margins get reset on switching buffer
Date: Sun, 14 Apr 2013 08:34:24 +0300
> Date: Sat, 13 Apr 2013 22:52:24 +0100
> From: E Sabof <esabof <at> gmail.com>
> Cc: 14200 <at> debbugs.gnu.org
> 
> > If you want the values you set be preserved for that buffer, you need
> > to set the buffer-local values of left/right-margin-width and
> > left/right-fringe-width.  If you want them to be preserved in a window
> > regardless of the buffer it displays, switch to another buffer by
> > invoking set-window-buffer with non-nil 3rd argument.
> 
> Thanks, but changing those variables (or the corresponding fringe ones)
> doesn't seem to have any effect.

From the ELisp manual:

     Setting these variables does not immediately affect the window.
  These variables are checked when a new buffer is displayed in the
  window.  Thus, you can make changes take effect by calling
  `set-window-buffer'.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14200; Package emacs. (Sun, 14 Apr 2013 14:52:01 GMT) Full text and rfc822 format available.

Message #17 received at 14200 <at> debbugs.gnu.org (full text, mbox):

From: E Sabof <esabof <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 14200 <at> debbugs.gnu.org
Subject: Re: bug#14200: 24.3;
	Window fringes / margins get reset on switching buffer
Date: Sun, 14 Apr 2013 15:47:27 +0100
[Message part 1 (text/plain, inline)]
On Sun, Apr 14, 2013 at 6:34 AM, Eli Zaretskii <eliz <at> gnu.org> wrote:

> > Date: Sat, 13 Apr 2013 22:52:24 +0100
> > From: E Sabof <esabof <at> gmail.com>
> > Cc: 14200 <at> debbugs.gnu.org
> >
> > > If you want the values you set be preserved for that buffer, you need
> > > to set the buffer-local values of left/right-margin-width and
> > > left/right-fringe-width.  If you want them to be preserved in a window
> > > regardless of the buffer it displays, switch to another buffer by
> > > invoking set-window-buffer with non-nil 3rd argument.
> >
> > Thanks, but changing those variables (or the corresponding fringe ones)
> > doesn't seem to have any effect.
>
> From the ELisp manual:
>
>      Setting these variables does not immediately affect the window.
>   These variables are checked when a new buffer is displayed in the
>   window.  Thus, you can make changes take effect by calling
>   `set-window-buffer'.
>

I see.

Evgeni
[Message part 2 (text/html, inline)]

Added tag(s) notabug. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sat, 27 Apr 2013 00:02:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 14200 <at> debbugs.gnu.org and E Sabof <esabof <at> gmail.com> Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sat, 27 Apr 2013 00:02:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 25 May 2013 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 361 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.