unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#14200: 24.3; Window fringes / margins get reset on switching buffer
@ 2013-04-13 20:51 E Sabof
  2013-04-13 21:36 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: E Sabof @ 2013-04-13 20:51 UTC (permalink / raw)
  To: 14200

[-- Attachment #1: Type: text/plain, Size: 469 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 654 bytes --]

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

* bug#14200: 24.3; Window fringes / margins get reset on switching buffer
  2013-04-13 20:51 bug#14200: 24.3; Window fringes / margins get reset on switching buffer E Sabof
@ 2013-04-13 21:36 ` Eli Zaretskii
  2013-04-13 21:52   ` E Sabof
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2013-04-13 21:36 UTC (permalink / raw)
  To: E Sabof; +Cc: 14200

> Date: Sat, 13 Apr 2013 21:51:35 +0100
> From: E Sabof <esabof@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.





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

* bug#14200: 24.3; Window fringes / margins get reset on switching buffer
  2013-04-13 21:36 ` Eli Zaretskii
@ 2013-04-13 21:52   ` E Sabof
  2013-04-14  5:34     ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: E Sabof @ 2013-04-13 21:52 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 14200

[-- Attachment #1: Type: text/plain, Size: 1119 bytes --]

On Sat, Apr 13, 2013 at 10:36 PM, Eli Zaretskii <eliz@gnu.org> wrote:

> > Date: Sat, 13 Apr 2013 21:51:35 +0100
> > From: E Sabof <esabof@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

[-- Attachment #2: Type: text/html, Size: 1878 bytes --]

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

* bug#14200: 24.3; Window fringes / margins get reset on switching buffer
  2013-04-13 21:52   ` E Sabof
@ 2013-04-14  5:34     ` Eli Zaretskii
  2013-04-14 14:47       ` E Sabof
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2013-04-14  5:34 UTC (permalink / raw)
  To: E Sabof; +Cc: 14200

> Date: Sat, 13 Apr 2013 22:52:24 +0100
> From: E Sabof <esabof@gmail.com>
> Cc: 14200@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'.





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

* bug#14200: 24.3; Window fringes / margins get reset on switching buffer
  2013-04-14  5:34     ` Eli Zaretskii
@ 2013-04-14 14:47       ` E Sabof
  0 siblings, 0 replies; 5+ messages in thread
From: E Sabof @ 2013-04-14 14:47 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 14200

[-- Attachment #1: Type: text/plain, Size: 929 bytes --]

On Sun, Apr 14, 2013 at 6:34 AM, Eli Zaretskii <eliz@gnu.org> wrote:

> > Date: Sat, 13 Apr 2013 22:52:24 +0100
> > From: E Sabof <esabof@gmail.com>
> > Cc: 14200@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

[-- Attachment #2: Type: text/html, Size: 1564 bytes --]

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

end of thread, other threads:[~2013-04-14 14:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-13 20:51 bug#14200: 24.3; Window fringes / margins get reset on switching buffer E Sabof
2013-04-13 21:36 ` Eli Zaretskii
2013-04-13 21:52   ` E Sabof
2013-04-14  5:34     ` Eli Zaretskii
2013-04-14 14:47       ` E Sabof

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).