From: Lawrence Mitchell <wence@gmx.li>
To: ding@gnus.org
Subject: [PATCH] Make saving and restoring of hidden threads work with overlays.
Date: Fri, 30 Jul 2010 17:47:49 +0100 [thread overview]
Message-ID: <87eiekor0q.fsf@gmx.li> (raw)
* gnus-sum.el (gnus-hidden-threads-configuration)
(gnus-restore-hidden-threads-configuration): Update to deal with text
properties, rather than searching for a magic character.
---
lisp/ChangeLog | 6 ++++++
lisp/gnus-sum.el | 12 ++++++------
2 files changed, 12 insertions(+), 6 deletions(-)
Hi there,
34d3c95 broke usage of gnus-save-hidden-threads, notably when
attempting to fetch a thread's parent. Example:
Enter a group with multiple collapsed threads.
Select an article with a parent you wish to fetch.
Hit '^'.
Note how all threads are left expanded, rather than being hidden
again. This is because gnus-hidden-threads-configuration and
gnus-restore-hidden-threads-configuration have not been updated
to deal with the 'gnus-sum 'invisible overlay.
The patch below fixes things for me.
Cheers,
Lawrence
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index bbf42d3..1726429 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
+2010-07-30 Lawrence Mitchell <wence@gmx.li>
+
+ * gnus-sum.el (gnus-hidden-threads-configuration)
+ (gnus-restore-hidden-threads-configuration): Update to deal with text
+ properties, rather than searching for a magic character.
+
2010-07-30 Katsumi Yamaoka <yamaoka@jpl.org>
* nnmail.el (nnmail-get-new-mail-1): Encode group names possibly
diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el
index 93024e0..53a2470 100644
--- a/lisp/gnus-sum.el
+++ b/lisp/gnus-sum.el
@@ -3406,8 +3406,10 @@ marks of articles."
(save-excursion
(let (config)
(goto-char (point-min))
- (while (search-forward "\r" nil t)
- (push (1- (point)) config))
+ (while (not (eobp))
+ (when (eq (get-char-property (point-at-eol) 'invisible) 'gnus-sum)
+ (push (save-excursion (forward-line 0) (point)) config))
+ (forward-line 1))
config)))
(defun gnus-restore-hidden-threads-configuration (config)
@@ -3415,10 +3417,8 @@ marks of articles."
(save-excursion
(let (point (inhibit-read-only t))
(while (setq point (pop config))
- (when (and (< point (point-max))
- (goto-char point)
- (eq (char-after) ?\n))
- (subst-char-in-region point (1+ point) ?\n ?\r))))))
+ (goto-char point)
+ (gnus-summary-hide-thread)))))
;; Various summary mode internalish functions.
--
1.7.2.1.6.g61bf12
next reply other threads:[~2010-07-30 16:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-30 16:47 Lawrence Mitchell [this message]
2010-08-03 18:52 ` Ted Zlatanov
2010-08-04 1:12 ` Katsumi Yamaoka
2010-08-12 20:47 ` Ted Zlatanov
2010-08-04 8:23 ` Lawrence Mitchell
2010-08-04 11:08 ` Tassilo Horn
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=87eiekor0q.fsf@gmx.li \
--to=wence@gmx.li \
--cc=ding@gnus.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.
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 NNTP newsgroup(s).