GNU bug report logs - #76193
30.0.93; Wrong type argument in outline-minor-mode

Previous Next

Package: emacs;

Reported by: Roshan Shariff <roshan.shariff <at> gmail.com>

Date: Tue, 11 Feb 2025 05:05:01 UTC

Severity: normal

Found in version 30.0.93

Full log


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

From: Juri Linkov <juri <at> linkov.net>
To: Roshan Shariff <roshan.shariff <at> gmail.com>
Cc: 76193 <at> debbugs.gnu.org
Subject: Re: bug#76193: 30.0.93; Wrong type argument in outline-minor-mode
Date: Tue, 11 Feb 2025 09:53:25 +0200
> 1. Open scratch buffer
> 2. M-: (setq outline-minor-mode-use-buttons 'in-margins) RET
> 3. M-: (setq left-margin-width 2) RET
> 4. M-x outline-minor-mode [Outline minor mode enabled in current buffer]
> 5. M-x outline-minor-mode [Wrong type argument: number-or-mark-p, nil]
>
> The error happens on line 616 of outline.el, because
> outline--margin-width is nil when outline-minor-mode is disabled.  It
> turns out that it was never set when outline-minor-mode was enabled,
> because the condition on line 552 fails when left-margin-width is greater than
> zero.

Thanks for the bug report.  outline-minor-mode was not intended
to work for left-margin-width set to a non-zero value from outside.

I wonder do you know a case where the same margin is successfully shared
between outline-minor-mode and some other package?

In any case this information is not required for fixing outline-minor-mode
that should support any value of left-margin-width.

Do you agree that the right fix would be just do nothing
when outline--margin-width is nil?




This bug report was last modified 125 days ago.

Previous Next


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