From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#57813: Icon images are non-functional Date: Sun, 18 Sep 2022 21:46:07 +0300 Organization: LINKOV.NET Message-ID: <86mtawil7s.fsf@mail.linkov.net> References: <86pmfxlp7s.fsf@mail.linkov.net> <861qsca9cn.fsf@mail.linkov.net> <867d2476u4.fsf@mail.linkov.net> <831qsb6g69.fsf@gnu.org> <86illnpzgh.fsf@mail.linkov.net> <86mtaxaj2l.fsf@mail.linkov.net> <83tu55z2vf.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15165"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: 57813@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Sep 18 21:13:18 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oZzjC-0003nW-Gc for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 18 Sep 2022 21:13:18 +0200 Original-Received: from localhost ([::1]:46838 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oZzjB-0001P0-HJ for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 18 Sep 2022 15:13:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33028) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oZzix-0001Or-Ru for bug-gnu-emacs@gnu.org; Sun, 18 Sep 2022 15:13:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52254) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oZzix-0002aU-Iz for bug-gnu-emacs@gnu.org; Sun, 18 Sep 2022 15:13:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oZziw-0007QH-CO for bug-gnu-emacs@gnu.org; Sun, 18 Sep 2022 15:13:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 Sep 2022 19:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57813 X-GNU-PR-Package: emacs Original-Received: via spool by 57813-submit@debbugs.gnu.org id=B57813.166352835728484 (code B ref 57813); Sun, 18 Sep 2022 19:13:02 +0000 Original-Received: (at 57813) by debbugs.gnu.org; 18 Sep 2022 19:12:37 +0000 Original-Received: from localhost ([127.0.0.1]:51329 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oZziW-0007PK-CL for submit@debbugs.gnu.org; Sun, 18 Sep 2022 15:12:36 -0400 Original-Received: from relay8-d.mail.gandi.net ([217.70.183.201]:36923) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oZziS-0007P1-V1 for 57813@debbugs.gnu.org; Sun, 18 Sep 2022 15:12:33 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 998581BF204; Sun, 18 Sep 2022 19:12:24 +0000 (UTC) In-Reply-To: <83tu55z2vf.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 18 Sep 2022 08:08:04 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:243012 Archived-At: >> 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))