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

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

bug#37213: Execute set-window-margins. left-margin-width remains 0.


From: Alan Mackenzie
Subject: bug#37213: Execute set-window-margins. left-margin-width remains 0.
Date: Wed, 28 Aug 2019 19:57:06 +0000
User-agent: Mutt/1.10.1 (2018-07-13)

Hello, Eli.

On Wed, Aug 28, 2019 at 22:14:54 +0300, Eli Zaretskii wrote:
> > Date: Wed, 28 Aug 2019 18:53:52 +0000
> > From: Alan Mackenzie <address@hidden>

> > emacs -Q
> > M-: (set-window-margins (selected-window) 2) ; This works.
> > 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.

> I don't think this is a bug.  This variable is for _setting_ the
> margin width, not for _returning_ its width as set "by other means".
> See its documentation.

The documentation says "This variable specifies the width of the left
margin".  As best, this is unclear.  What you're saying is that the
variable ceases to specify that width, should the margin be altered by
other means.

I maintain that this is either a bug in the documentation, or in the
code.

If the former, it should explicitly state that the variable is
write-only, and its read value is undefined.  It should say that the
function window-margins should be used instead.

But it might be easier just to amend the code.  There appear to be just
two ways to set the width of the left margin (or the right margin), so
if it gets set the second way, why not just set that variable?  Could
this do any harm?  (Note: I haven't looked at the code, yet.)

-- 
Alan Mackenzie (Nuremberg, Germany).





reply via email to

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