unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Ken Manheimer <ken.manheimer@gmail.com>
To: 42232@debbugs.gnu.org
Subject: bug#42232: Fix for lisp/allout-widgets void variable
Date: Mon, 6 Jul 2020 13:43:06 -0400	[thread overview]
Message-ID: <CAAT_zTHZuKBzdVhMkLOJ0dYmcmzPpTrnPTUBErF-bAas5di9Ew@mail.gmail.com> (raw)


[-- 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


             reply	other threads:[~2020-07-06 17:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-06 17:43 Ken Manheimer [this message]
     [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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAAT_zTHZuKBzdVhMkLOJ0dYmcmzPpTrnPTUBErF-bAas5di9Ew@mail.gmail.com \
    --to=ken.manheimer@gmail.com \
    --cc=42232@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).