GNU bug report logs -
#57813
Icon images are non-functional
Previous Next
Reported by: Juri Linkov <juri <at> linkov.net>
Date: Wed, 14 Sep 2022 19:43:02 UTC
Severity: normal
Fixed in version 29.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
>> Here is a preliminary patch, but using buffer-local left-margin-width
>> exhibits strange behavior: margins don't always appear immediately
>> after switching the buffer.
>
> Margins are specific to a window, not to a buffer. See the
> description of set-window-margins in the ELisp manual, and the
> accompanying description of set-window-buffer there.
-- Function: set-window-buffer window buffer-or-name &optional
keep-margins
...
By default, this function resets WINDOW’s position, display
margins, fringe widths, and scroll bar settings, based on the local
variables in the specified buffer. However, if the optional
argument KEEP-MARGINS is non-‘nil’, it leaves WINDOW’s display
margins, fringes and scroll bar settings alone.
KEEP-MARGINS is nil by default, so buffer-local 'left-margin-width'
should work as described:
-- Variable: left-margin-width
This variable specifies the width of the left margin, in character
cell (a.k.a. “column”) units. It is buffer-local in all buffers.
A value of ‘nil’ means no left marginal area.
And indeed, 'left-margin-width' works fine. The only problem is
with 'C-h n' that doesn't show margins immediately, only after
switching to another buffer and back. Then afterwards buffer-local
margins are kept in etc/NEWS as well. It can be fixed by:
diff --git a/lisp/textmodes/emacs-news-mode.el b/lisp/textmodes/emacs-news-mode.el
index 88e8948060..9b99740290 100644
--- a/lisp/textmodes/emacs-news-mode.el
+++ b/lisp/textmodes/emacs-news-mode.el
@@ -80,6 +80,7 @@ emacs-news--mode-common
outline-minor-mode-cycle t
outline-minor-mode-highlight 'append)
(outline-minor-mode)
+ (set-window-buffer nil (current-buffer))
(emacs-etc--hide-local-variables))
This bug report was last modified 2 years and 270 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.