GNU bug report logs - #4887
globalized-minor-modes in new fundamental mode buffers

Previous Next

Package: emacs;

Reported by: mark.lillibridge <at> hp.com

Date: Sun, 8 Nov 2009 05:40:05 UTC

Severity: normal

Tags: wontfix

Merged with 5153

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Mark Lillibridge <mark.lillibridge <at> hp.com>
To: rgm <at> gnu.org
Cc: 4887 <at> debbugs.gnu.org
Subject: bug#4887: 23.1; list-load-path-shadows produces broken buffer
Date: Wed, 11 Nov 2009 10:08:37 -0800
Glenn Morris wrote:
>  Mark Lillibridge wrote:
>  
>  > * turn on global-linum-mode
>  > * run list-load-path-shadows
>  > * observe that the resulting buffer, *Shadows*, has no line numbering,
>  
>  global-linum-mode is defined using the macro `define-globalized-minor-mode'.
>  >From the Elisp manual entry on that macro:
>  
>       Globally enabling the mode also affects buffers subsequently
>       created by visiting files, and buffers that use a major mode
>       other than Fundamental mode; but it does not detect the creation
>       of a new buffer in Fundamental mode.
>  
>  And the *Shadows* buffer uses Fundamental mode.

    Ok, how do we go about deciding where the bug(s) lies?  Clearly,
linum is meant to work in all buffers:

linum.el:26:
;; Display line numbers for the current buffer.
;;
;; Toggle display of line numbers with M-x linum-mode.  To enable
;; line numbering in all buffers, use M-x global-linum-mode.

This is the behavior I need -- I use voice commands to navigate among
lines and designate ranges of lines for operations -- so simply changing
linum's spec so that it does not work in fundamental buffers is
unacceptable.


    Should linum use a different implementation method than
define-globalized-minor-mode?  (does one exist?)  


    Should we instead fix define-globalized-minor-mode to work with all
buffers?  Its documentation via ^h f claims it works in every buffer:

    define-globalized-minor-mode is an autoloaded Lisp macro in
    `easy-mmode.el'.
    
    (define-globalized-minor-mode global-mode mode turn-on &rest keys)
    
    Make a global mode global-mode corresponding to buffer-local minor mode.
    turn-on is a function that will be called with no args in every buffer
      and that should try to turn mode on if applicable for that buffer.

Clearly at a minimum this is inconsistent with
define-globalized-minor-mode's actual behavior and Elisp manual entry.


What do people think?

- Mark





This bug report was last modified 9 years and 202 days ago.

Previous Next


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