unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#42232: Fix for lisp/allout-widgets void variable
@ 2020-07-06 17:43 Ken Manheimer
       [not found] ` <handler.42232.B.159405741117681.ack@debbugs.gnu.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Ken Manheimer @ 2020-07-06 17:43 UTC (permalink / raw)
  To: 42232


[-- Attachment #1.1: Type: text/plain, Size: 957 bytes --]

The attached patch provides for a background void-variable error that
happens when parts of an outline are being concealed. Because the error
happens via the after-change-functions hook, it was being caught by an
allout provision and reported in the mode line.

To see the error before applying the patch, make a simple outline, activate
allout-mode, and then conceal a part of the outline by positioning on the
item whose contents you can hide and using `allout-hide-current-subtree'
(by default, bound to '\C-c SPC \C-h'). When the problem occurs you will
see a message in the mode line, like:

allout-widgets-last-hook-error stored,
allout-widgets-hook-error-handler/error (void-variable handled-conceal)
 6-Jul-2020 01:10:58 PM

You can then see that message and a full backtrace in the *Messages* buffer.

(The let declaration for the variable was probably removed because use of
the variable is oblique. It happens through `(symbol-value handling)'.)

[-- Attachment #1.2: Type: text/html, Size: 1056 bytes --]

[-- Attachment #2: 0001-Provide-missing-let-definition-to-prevent-background.patch --]
[-- Type: application/octet-stream, Size: 1073 bytes --]

From 5412a6688e34ae6f649486c84483bea290d90f80 Mon Sep 17 00:00:00 2001
From: Ken Manheimer <ken.manheimer@gmail.com>
Date: Mon, 6 Jul 2020 13:19:11 -0400
Subject: [PATCH] Provide missing let definition to prevent background
 void-variable error.

* lisp/allout-widgets.el (allout-widgets-exposure-change-processor)
Let-declare handled-conceal, for reference through `(symbol-value)'
within the let body. (Because the error happens in an
after-change-functions hook, so it is caught and reported as a message
by allout-widgets-hook-error-handler.)
---
 lisp/allout-widgets.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lisp/allout-widgets.el b/lisp/allout-widgets.el
index fbdddca7d7..4f028b9612 100644
--- a/lisp/allout-widgets.el
+++ b/lisp/allout-widgets.el
@@ -988,6 +988,7 @@ allout-widgets-exposure-change-processor
         ;; have to distinguish between concealing and exposing so that, eg,
         ;; `allout-expose-topic's mix is handled properly.
         handled-expose
+        handled-conceal
         covered
         deactivate-mark)
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-20 19:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-06 17:43 bug#42232: Fix for lisp/allout-widgets void variable Ken Manheimer
     [not found] ` <handler.42232.B.159405741117681.ack@debbugs.gnu.org>
2020-07-20 19:20   ` bug#42232: Acknowledgement (Fix for lisp/allout-widgets void variable) Ken Manheimer

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).