From: Lennart Borgman <lennart.borgman@gmail.com>
To: 7101@debbugs.gnu.org
Subject: bug#7101: Please reveal-mode, don't hide my overlays!
Date: Sat, 25 Sep 2010 15:23:58 +0200 [thread overview]
Message-ID: <AANLkTi=Dq=pBxv-tqchke00=hb12apqMQcGO93yA1KgD@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 417 bytes --]
Am I the only one that gets crazy when reveal hides the overlays
again? At least I mostly find it very frustrating when moving around
in a buffer that uses org-mode.
I can see it is useful sometimes though I do not know how to best
separate those times when it is useful and when it is not. So I will
not try that.
Instead in the attached patch I made the automatic hiding optional and
add a new command for hiding
[-- Attachment #2: reveal-dont-hide.diff --]
[-- Type: application/octet-stream, Size: 1349 bytes --]
=== modified file 'lisp/reveal.el'
--- trunk/lisp/reveal.el 2010-03-12 17:47:22 +0000
+++ patched/lisp/reveal.el 2010-09-25 13:22:19 +0000
@@ -56,6 +56,11 @@
:type 'boolean
:group 'reveal)
+(defcustom reveal-auto-close nil
+ "Close revealed overlays when leaving them."
+ :type 'boolean
+ :group 'reveal)
+
(defvar reveal-open-spots nil
"List of spots in the buffer which are open.
Each element has the form (WINDOW . OVERLAY).")
@@ -92,7 +97,8 @@
(cdr x))))
reveal-open-spots))))
(setq old-ols (reveal-open-new-overlays old-ols))
- (reveal-close-old-overlays old-ols))
+ (when reveal-auto-close
+ (reveal-close-old-overlays old-ols)))
(error (message "Reveal: %s" err)))))
(defun reveal-open-new-overlays (old-ols)
@@ -180,6 +186,14 @@
(delq (rassoc ol reveal-open-spots)
reveal-open-spots)))))))
+(defun reveal-close-revealed ()
+ "Close revealed overlays.
+This does not close the overlay where point is in the selected
+window."
+ (interactive)
+ (let ((reveal-auto-close t))
+ (reveal-post-command)))
+
(defvar reveal-mode-map
(let ((map (make-sparse-keymap)))
;; Override the default move-beginning-of-line and move-end-of-line
next reply other threads:[~2010-09-25 13:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-25 13:23 Lennart Borgman [this message]
2010-09-25 20:57 ` bug#7101: Please reveal-mode, don't hide my overlays! Lennart Borgman
2010-10-07 10:23 ` Stefan Monnier
2010-10-07 10:33 ` Lennart Borgman
2020-09-19 15:46 ` Lars Ingebrigtsen
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='AANLkTi=Dq=pBxv-tqchke00=hb12apqMQcGO93yA1KgD@mail.gmail.com' \
--to=lennart.borgman@gmail.com \
--cc=7101@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.