all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Alan Mackenzie <acm@muc.de>, 37213@debbugs.gnu.org
Subject: bug#37213: Execute set-window-margins. left-margin-width remains 0.
Date: Thu, 29 Aug 2019 09:46:34 +0200	[thread overview]
Message-ID: <77150b42-bc15-89ff-bf67-f2c938ac6b5c@gmx.at> (raw)
In-Reply-To: <20190828185352.GA4530@ACM>

 > 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





  parent reply	other threads:[~2019-08-29  7:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-28 18:53 bug#37213: Execute set-window-margins. left-margin-width remains 0 Alan Mackenzie
2019-08-28 19:14 ` Eli Zaretskii
2019-08-28 19:57   ` Alan Mackenzie
2019-08-29  6:42     ` Eli Zaretskii
2019-08-31 11:59       ` Alan Mackenzie
2019-08-31 12:13         ` Eli Zaretskii
2019-08-29  7:46     ` martin rudalics
2019-08-31 14:07       ` Alan Mackenzie
2019-09-01  8:26         ` martin rudalics
2019-09-01  9:48           ` Alan Mackenzie
2019-09-01 12:19             ` martin rudalics
2019-09-01 12:42               ` Alan Mackenzie
2019-08-29  7:46 ` martin rudalics [this message]
     [not found] ` <handler.37213.B.156701844019660.ack@debbugs.gnu.org>
2019-08-31 14:39   ` Alan Mackenzie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=77150b42-bc15-89ff-bf67-f2c938ac6b5c@gmx.at \
    --to=rudalics@gmx.at \
    --cc=37213@debbugs.gnu.org \
    --cc=acm@muc.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.