GNU bug report logs - #51809
29.0.50; [PATCH] Support for outline default state in Diff buffers

Previous Next

Package: emacs;

Reported by: Matthias Meulien <orontee <at> gmail.com>

Date: Sat, 13 Nov 2021 13:10:02 UTC

Severity: normal

Tags: fixed, patch

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

From: Matthias Meulien <orontee <at> gmail.com>
To: Juri Linkov <juri <at> linkov.net>
Cc: 51809 <at> debbugs.gnu.org
Subject: bug#51809: 29.0.50; [PATCH] Support for outline default state in Diff buffers
Date: Sun, 26 Dec 2021 21:32:17 +0100
Matthias Meulien <orontee <at> gmail.com> writes:

> There's a bug when used with diff-mode (where `outline-level' returns
> unexpected values), the starting point of that thread! I'll try to
> study this in the forthcoming days.

Fixed with (applied to the patch sent in reply to Eli's suggestions on
documentation):

diff --git a/lisp/outline.el b/lisp/outline.el
index ad45e38946..2dc9805b85 100644
--- a/lisp/outline.el
+++ b/lisp/outline.el
@@ -1449,7 +1449,7 @@ outline--show-headings-up-to-level
         ;; Then unhide the top level headers.
         (outline-map-region
          (lambda ()
-             (let ((current-level (outline-level)))
+             (let ((current-level (funcall outline-level)))
 	       (when (< current-level level)
                  (outline-show-heading)
                  (outline-show-entry))


I am now back to the origin of this bug report (toggling visibility of
some diff hunks depending on long lines, chunks size, or file names) and
I see there's a major drawback with the outline mode default visibility
state approach: When outline minor mode is set through diff-mode-hook,
the buffer is emtpy and applying the default state visibility is a
no-op; It's a side-effect of the buffer content being generated
asynchronously...




This bug report was last modified 3 years and 91 days ago.

Previous Next


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