unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#20468: Erc timestamps and buffer-invisibility-spec
       [not found] <558a5d6c.8651c20a.75f24.1efc@mx.google.com>
@ 2015-06-24 14:17 ` Stefan Monnier
  0 siblings, 0 replies; only message in thread
From: Stefan Monnier @ 2015-06-24 14:17 UTC (permalink / raw)
  To: Cédric Chépied; +Cc: 20468

> Is it a bug? Should the default value be (t) instead of t?

Right, now I finally see where the problem was introduced:
the ERC code always starts by calling erc-munge-invisibility-spec, so by
default, the old code ended up setting buffer-invisibility-spec to
`(t)', whereas the new code calls remove-from-invisibility-spec which
ends up not doing anything.

I'm tempted to install the patch below, since I think it makes sense to
expect that remove-from-invisibility-spec makes ELEMENT visible.


        Stefan


diff --git a/lisp/subr.el b/lisp/subr.el
index 9580109..e9a5a2a 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -4172,9 +4173,10 @@ that can be added."
 
 (defun remove-from-invisibility-spec (element)
   "Remove ELEMENT from `buffer-invisibility-spec'."
-  (if (consp buffer-invisibility-spec)
-      (setq buffer-invisibility-spec
-	    (delete element buffer-invisibility-spec))))
+  (setq buffer-invisibility-spec
+        (if (consp buffer-invisibility-spec)
+	    (delete element buffer-invisibility-spec)
+          (list t))))
 \f
 ;;;; Syntax tables.
 





^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-06-24 14:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <558a5d6c.8651c20a.75f24.1efc@mx.google.com>
2015-06-24 14:17 ` bug#20468: Erc timestamps and buffer-invisibility-spec Stefan Monnier

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).