GNU bug report logs - #37213
Execute set-window-margins. left-margin-width remains 0.

Previous Next

Package: emacs;

Reported by: Alan Mackenzie <acm <at> muc.de>

Date: Wed, 28 Aug 2019 18:54:01 UTC

Severity: normal

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: martin rudalics <rudalics <at> gmx.at>
To: Alan Mackenzie <acm <at> muc.de>, 37213 <at> debbugs.gnu.org
Subject: bug#37213: Execute set-window-margins. left-margin-width remains 0.
Date: Thu, 29 Aug 2019 09:46:34 +0200
> Hello, Emacs.

Hello, Alan.

> In Emacs-27, recent master branch, do:
>
> emacs -Q
> M-: (set-window-margins (selected-window) 2) ; This works.

In which sense?

> M-: left-margin-width.
>
> The result is that left-margin-width is still at zero, although the
> value should be 2.  This is a bug.

Neither of the last two statements is correct.  'set-window-margins'
sets the margin widths of its WINDOW argument (the selected window in
your case) and triggers an update of the display.  If WINDOW's buffer
is currently displayed in another window as well, the margins of that
other window remain unaffected.  You can verify that by splitting your
window before invoking 'set-window-margins'.

'left-margin-width' is the buffer-local value of the left margin for
showing that buffer in a window.  That value is put into effect only
when 'set-window-buffer' has a window display that buffer.  You can
verfiy this by setting 'left-margin-width' to some different value
before splitting the window as suggested above.

Concludingly, you've been comparing apples and oranges here.  If the
doc-strings or the manual made you do so, please consider adjusting
their texts appropriately.  Gladly, your questions was about margins
only; with fringes we would even have a frame parameter to take into
account here ...

Thanks, martin




This bug report was last modified 5 years and 325 days ago.

Previous Next


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