GNU bug report logs - #28396
26.0.50; display-line-numbers not saved by Save Options

Previous Next

Package: emacs;

Reported by: Eli Zaretskii <eliz <at> gnu.org>

Date: Sat, 9 Sep 2017 10:05:02 UTC

Severity: minor

Found in version 26.0.50

Fixed in version 26.0.91

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 28396 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 28396 <at> debbugs.gnu.org
Subject: Re: bug#28396: 26.0.50; display-line-numbers not saved by Save Options
Date: Tue, 21 Nov 2017 19:44:05 -0500
Eli Zaretskii wrote:

>   emacs -Q
>   Click Options in the menu bar
>   Select Show/Hide->Line Numbers For All Lines->Global Line Numbers Mode
>   Click Options->Save Options
>
> The result is that the setting of global-display-line-numbers-mode is
> not saved on the init file.

commit daa959e (HEAD, origin/emacs-26, emacs-26)
Date:   Tue Nov 21 19:42:32 2017 -0500

    * lisp/menu-bar.el (menu-bar-options-save):
    Add global-display-line-numbers-mode.  (Bug#28396)

diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index 972f84e..9ff3de1 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -669,7 +669,8 @@ menu-bar-options-save
   (let ((need-save nil))
     ;; These are set with menu-bar-make-mm-toggle, which does not
     ;; put on a customized-value property.
-    (dolist (elt '(line-number-mode column-number-mode size-indication-mode
+    (dolist (elt '(global-display-line-numbers-mode
+		   line-number-mode column-number-mode size-indication-mode
 		   cua-mode show-paren-mode transient-mark-mode
 		   blink-cursor-mode display-time-mode display-battery-mode
 		   ;; These are set by other functions that don't set


> Note that the solution should also save the sub-mode, when the user
> selects, say, Relative Line Numbers.

Buffer-local variables like display-line-numbers don't play well with
Customize.




This bug report was last modified 7 years and 187 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.