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: Alan Mackenzie <acm <at> muc.de>
To: martin rudalics <rudalics <at> gmx.at>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 37213 <at> debbugs.gnu.org
Subject: bug#37213: Execute set-window-margins. left-margin-width remains 0.
Date: Sun, 1 Sep 2019 12:42:45 +0000
Hello, Martin.

On Sun, Sep 01, 2019 at 14:19:37 +0200, martin rudalics wrote:
>  > OK.  It seems there are two alternative strategies for manipulating a
>  > window's margins.  One is to use set-window-margins together with
>  > window-margins, the other is to use left/right-margin-width and
>  > set-window-buffer.

> Right.  With fringes and scroll bars you can additionally set a frame
> parameter.  I know that you're not interested in the latter but any
> descriptions should be consistent.

None of this is simple.

>  >> Hmm...  What is the "current width of the left or right margin"?

>  > I'm not sure I understand the question.  In a given window with a left
>  > margin, there will be a maximum length of string which can be displayed
>  > in that margin.  That is its "current width".  The same for a right
>  > margin.  What are you getting at, here?

> That you omitted the "In a given window" preamble in the manual.  When
> you have a frame with two windows showing one and the same buffer, the
> margins of these windows can have different widths.  What would be the
> "current width" in that case?

Whatever it is, you can't get it reliably from left/right-margin-width.
You can get it by calling window-margins, and as window-margins takes a
window as a mandatory argument, that surely answers the question.

The point about the extra text I put in is to emphasise that Emacs does
not update left/right-margin-width to reflect the current width (in
whatever sense).  The former text was not clear about this point.

I don't think the current text needs further amendment.  If you
disagree, perhaps you could propose a specific change.

> martin

-- 
Alan Mackenzie (Nuremberg, Germany).




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.