Gnus development mailing list
 help / color / mirror / Atom feed
* [PATCH] Hide headers using narrowing
@ 2004-01-11 12:45 Romain Francoise
  2004-11-22 20:50 ` Romain Francoise
  0 siblings, 1 reply; 20+ messages in thread
From: Romain Francoise @ 2004-01-11 12:45 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 1202 bytes --]

Hi,

This patch has been waiting for No Gnus for months: it makes Message use
narrowing to hide headers, by moving them to the very top of the message
buffer, and narrowing to the region underneath.  This approach will most
probably be less fragile than the current one which uses the `invisible'
text property.

To make raw messages look less funky, I've also made it sort the headers
before sending the message, maybe it's not 100% necessary, but it seemed
cleaner this way.  The proposed ChangeLog entry follows.  (And I do have
papers on file for Gnus.)

2004-01-11  Romain Francoise  <romain@orebokech.com>

	* message.el (message-header-format-alist): Add `From' in list
	so that it can be sorted.
	(message-hide-headers): Use narrowing to hide headers by moving
	them to the top of the buffer and narrowing to the region
	underneath.
	(message-fix-before-sending): Widen and sort headers before
	sending.
	(message-strip-forbidden-properties): Remove check for obsolete
	`message-hidden' text property, hidden headers are not
	accessible in the buffer anymore.

-- 
Romain Francoise <romain@orebokech.com> | Shine the headlight, straight
it's a miracle -- http://orebokech.com/ | into my eyes.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Hide headers using narrowing --]
[-- Type: text/x-patch, Size: 2815 bytes --]

Index: lisp/message.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/message.el,v
retrieving revision 7.3
diff -u -r7.3 message.el
--- lisp/message.el	7 Jan 2004 17:47:39 -0000	7.3
+++ lisp/message.el	11 Jan 2004 11:31:56 -0000
@@ -1490,7 +1490,8 @@
   "A regexp that matches the separator before the text of a failed message.")
 
 (defvar message-header-format-alist
-  `((Newsgroups)
+  `((From)
+    (Newsgroups)
     (To . message-fill-address)
     (Cc . message-fill-address)
     (Subject)
@@ -2108,7 +2109,8 @@
 	 10000))))
 
 (defun message-sort-headers ()
-  "Sort the headers of the current message according to `message-header-format-alist'."
+  "Sort the headers of the current message according to
+`message-header-format-alist'."
   (interactive)
   (save-excursion
     (save-restriction
@@ -2372,9 +2374,8 @@
   (when (and message-strip-special-text-properties
 	     (message-tamago-not-in-use-p begin))
     (while (not (= begin end))
-      (when (not (get-text-property begin 'message-hidden))
-	(remove-text-properties begin (1+ begin)
-				message-forbidden-properties))
+      (remove-text-properties begin (1+ begin)
+			       message-forbidden-properties)
       (incf begin))))
 
 ;;;###autoload
@@ -3470,12 +3471,9 @@
   (unless (bolp)
     (insert "\n"))
   ;; Make the hidden headers visible.
-  (let ((points (message-text-with-property 'message-hidden)))
-    (when points
-      (goto-char (car points))
-      (dolist (point points)
-	(add-text-properties point (1+ point)
-			     '(invisible nil intangible nil)))))
+  (widen)
+  ;; Sort headers before sending the message.
+  (message-sort-headers)
   ;; Make invisible text visible.
   ;; It doesn't seem as if this is useful, since the invisible property
   ;; is clobbered by an after-change hook anyhow.
@@ -6804,7 +6802,8 @@
 		     (list message-hidden-headers)
 		   message-hidden-headers))
 	(inhibit-point-motion-hooks t)
-	(after-change-functions nil))
+	(after-change-functions nil)
+	(end-of-headers 0))
     (when regexps
       (save-excursion
 	(save-restriction
@@ -6813,11 +6812,17 @@
 	  (while (not (eobp))
 	    (if (not (message-hide-header-p regexps))
 		(message-next-header)
-	      (let ((begin (point)))
+	      (let ((begin (point))
+		    header header-len)
 		(message-next-header)
-		(add-text-properties
-		 begin (point)
-		 '(invisible t message-hidden t))))))))))
+		(setq header (buffer-substring begin (point))
+		      header-len (- (point) begin))
+		(delete-region begin (point))
+		(goto-char (1+ end-of-headers))
+		(insert header)
+		(setq end-of-headers
+		      (+ end-of-headers header-len))))))))
+    (narrow-to-region (1+ end-of-headers) (point-max))))
 
 (defun message-hide-header-p (regexps)
   (let ((result nil)

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

* Re: [PATCH] Hide headers using narrowing
  2004-01-11 12:45 [PATCH] Hide headers using narrowing Romain Francoise
@ 2004-11-22 20:50 ` Romain Francoise
  2004-11-23  0:18   ` Katsumi Yamaoka
  0 siblings, 1 reply; 20+ messages in thread
From: Romain Francoise @ 2004-11-22 20:50 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 383 bytes --]

Although nobody picked up my patch 45 weeks ago when I first sent it,
I'm attaching an updated version which applies cleanly against current
CVS since people asked for it.

Who knows, when Larsi comes back at Christmas he might feel like
applying it.

-- 
Romain Francoise <romain@orebokech.com> | Every sky is blue, but not
it's a miracle -- http://orebokech.com/ | for me and you.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Hide headers using narrowing --]
[-- Type: text/x-patch, Size: 1927 bytes --]

Index: message.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/message.el,v
retrieving revision 7.59
diff -u -r7.59 message.el
--- message.el	14 Nov 2004 14:27:44 -0000	7.59
+++ message.el	16 Nov 2004 22:19:15 -0000
@@ -1548,7 +1548,8 @@
   "Alist of header names/filler functions.")
 
 (defvar message-header-format-alist
-  `((Newsgroups)
+  `((From)
+    (Newsgroups)
     (To)
     (Cc)
     (Subject)
@@ -3580,9 +3582,9 @@
   (unless (bolp)
     (insert "\n"))
   ;; Make the hidden headers visible.
-  (dolist (from-to (message-text-with-property 'message-hidden))
-    (add-text-properties (car from-to) (cdr from-to)
-			 '(invisible nil intangible nil)))
+  (widen)
+  ;; Sort headers before sending the message.
+  (message-sort-headers)
   ;; Make invisible text visible.
   ;; It doesn't seem as if this is useful, since the invisible property
   ;; is clobbered by an after-change hook anyhow.
@@ -6914,7 +6921,8 @@
 		     (list message-hidden-headers)
 		   message-hidden-headers))
 	(inhibit-point-motion-hooks t)
-	(after-change-functions nil))
+	(after-change-functions nil)
+	(end-of-headers 0))
     (when regexps
       (save-excursion
 	(save-restriction
@@ -6923,11 +6931,17 @@
 	  (while (not (eobp))
 	    (if (not (message-hide-header-p regexps))
 		(message-next-header)
-	      (let ((begin (point)))
+	      (let ((begin (point))
+		    header header-len)
 		(message-next-header)
-		(add-text-properties
-		 begin (point)
-		 '(invisible t message-hidden t))))))))))
+		(setq header (buffer-substring begin (point))
+		      header-len (- (point) begin))
+		(delete-region begin (point))
+		(goto-char (1+ end-of-headers))
+		(insert header)
+		(setq end-of-headers
+		      (+ end-of-headers header-len))))))))
+    (narrow-to-region (1+ end-of-headers) (point-max))))
 
 (defun message-hide-header-p (regexps)
   (let ((result nil)

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

* Re: [PATCH] Hide headers using narrowing
  2004-11-22 20:50 ` Romain Francoise
@ 2004-11-23  0:18   ` Katsumi Yamaoka
  2004-11-23 11:21     ` Romain Francoise
  0 siblings, 1 reply; 20+ messages in thread
From: Katsumi Yamaoka @ 2004-11-23  0:18 UTC (permalink / raw)


>>>>> In <877jod7glv.fsf@orebokech.com> 
>>>>>	Romain Francoise <romain@orebokech.com> wrote:

> Although nobody picked up my patch 45 weeks ago when I first sent it,
> I'm attaching an updated version which applies cleanly against current
> CVS since people asked for it.

I saw the patch Raymond Scholz posted at Nov 16 in the
gnus.gnus-bug newsgroup and replied as follows:

> How about the following patch?

> --- message.el~	2004-11-14 21:50:37 +0000
> +++ message.el	2004-11-19 10:54:38 +0000
> @@ -6927,7 +6927,7 @@
>  		(message-next-header)
>  		(add-text-properties
>  		 begin (point)
> -		 '(invisible t message-hidden t))))))))))
> +		 '(invisible t message-hidden t intangible t))))))))))
 
>  (defun message-hide-header-p (regexps)
>    (let ((result nil)

> I guess the reason the intangible property is not used there may
> be because XEmacs doesn't support it.

If the purpose of the patch is to correct cursor movement around
invisible headers, I think this is enough for Emacs users.  Did
I overlook something?



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

* Re: [PATCH] Hide headers using narrowing
  2004-11-23  0:18   ` Katsumi Yamaoka
@ 2004-11-23 11:21     ` Romain Francoise
  2004-11-23 12:55       ` Katsumi Yamaoka
  0 siblings, 1 reply; 20+ messages in thread
From: Romain Francoise @ 2004-11-23 11:21 UTC (permalink / raw)


Katsumi Yamaoka <yamaoka@jpl.org> writes:

> I saw the patch Raymond Scholz posted at Nov 16 in the
> gnus.gnus-bug newsgroup and replied as follows:

[...]

> If the purpose of the patch is to correct cursor movement around
> invisible headers, I think this is enough for Emacs users.  Did
> I overlook something?

Please see this thread:

<URL: http://thread.gmane.org/gmane.emacs.gnus.general/51861>

My patch makes Gnus use narrowing instead of invisible text for hiding
headers, which is a more solid approach: invisible text isn't supported
very well on all Emacs versions supported by Gnus, and even so, you
always have the risk of deleting invisible headers by mistake with C-k
C-k C-k or somesuch.  Narrowing removes the headers from the buffer
entirely and is well supported on all known Emacs versions; Lars seemed
to think it was worth trying in No Gnus.

-- 
Romain Francoise <romain@orebokech.com> | They're nothing but scared
it's a miracle -- http://orebokech.com/ | little mice.



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

* Re: [PATCH] Hide headers using narrowing
  2004-11-23 11:21     ` Romain Francoise
@ 2004-11-23 12:55       ` Katsumi Yamaoka
  2004-11-23 13:39         ` Romain Francoise
  0 siblings, 1 reply; 20+ messages in thread
From: Katsumi Yamaoka @ 2004-11-23 12:55 UTC (permalink / raw)


> Katsumi Yamaoka <yamaoka@jpl.org> writes:

>> Did I overlook something?

>>>>> In <87llcsreu5.fsf@orebokech.com>
>>>>>	Romain Francoise <romain@orebokech.com> wrote:

> Please see this thread:

> <URL: http://thread.gmane.org/gmane.emacs.gnus.general/51861>

> My patch makes Gnus use narrowing instead of invisible text for hiding
> headers, which is a more solid approach: invisible text isn't supported
> very well on all Emacs versions supported by Gnus, and even so, you
> always have the risk of deleting invisible headers by mistake with C-k
> C-k C-k or somesuch.  Narrowing removes the headers from the buffer
> entirely and is well supported on all known Emacs versions; Lars seemed
> to think it was worth trying in No Gnus.

Thanks.  I agree hidden headers should be robustly guarded if
there're those who think hiding some headers is essential.  That
all headers are visible is my favorite, though. ;-)



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

* Re: [PATCH] Hide headers using narrowing
  2004-11-23 12:55       ` Katsumi Yamaoka
@ 2004-11-23 13:39         ` Romain Francoise
  2004-11-23 14:49           ` Reiner Steib
  0 siblings, 1 reply; 20+ messages in thread
From: Romain Francoise @ 2004-11-23 13:39 UTC (permalink / raw)


Katsumi Yamaoka <yamaoka@jpl.org> writes:

> I agree hidden headers should be robustly guarded if there're those
> who think hiding some headers is essential.

I use "^References:\\|^X-Draft-From:" since you never need to edit
those, and References can take quite a lot of room in the Message
buffer.

(Since message-generate-headers-first is set to '(references).)

-- 
Romain Francoise <romain@orebokech.com> | And you never lay down and
it's a miracle -- http://orebokech.com/ | you never stay home...



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

* Re: [PATCH] Hide headers using narrowing
  2004-11-23 13:39         ` Romain Francoise
@ 2004-11-23 14:49           ` Reiner Steib
  2004-11-23 15:41             ` Romain Francoise
  0 siblings, 1 reply; 20+ messages in thread
From: Reiner Steib @ 2004-11-23 14:49 UTC (permalink / raw)


On Tue, Nov 23 2004, Romain Francoise wrote:

> I use "^References:\\|^X-Draft-From:" since you never need to edit
> those, and References can take quite a lot of room in the Message
> buffer.
>
> (Since message-generate-headers-first is set to '(references).)

... which was done for a reason:

;; FIXME: This should be a temporary workaround until someone implements a
;; proper solution.  If a crash happens while replying, the auto-save file
;; will *not* have a `References:' header if `message-generate-headers-first'
;; is nil.  See: http://article.gmane.org/gmane.emacs.gnus.general/51138
(defcustom message-generate-headers-first '(references)

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/




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

* Re: [PATCH] Hide headers using narrowing
  2004-11-23 14:49           ` Reiner Steib
@ 2004-11-23 15:41             ` Romain Francoise
  2004-11-23 16:35               ` Reiner Steib
  0 siblings, 1 reply; 20+ messages in thread
From: Romain Francoise @ 2004-11-23 15:41 UTC (permalink / raw)


Reiner Steib <reinersteib+gmane@imap.cc> writes:

> ... which was done for a reason:

Yes, I know.  Adding References as a header hidden by default would make
this workaround unobtrusive, and invisible.

-- 
Romain Francoise <romain@orebokech.com> | Sometimes I don't know where
it's a miracle -- http://orebokech.com/ | this dirty road is taking me,
                                        | sometimes I can't even see
                                        | the reason why.



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

* Re: [PATCH] Hide headers using narrowing
  2004-11-23 15:41             ` Romain Francoise
@ 2004-11-23 16:35               ` Reiner Steib
  2004-11-25  0:39                 ` Katsumi Yamaoka
  0 siblings, 1 reply; 20+ messages in thread
From: Reiner Steib @ 2004-11-23 16:35 UTC (permalink / raw)


On Tue, Nov 23 2004, Romain Francoise wrote:

> Adding References as a header hidden by default would make this
> workaround unobtrusive, and invisible.

Yes, if hiding headers works reliably, we can hide References by
default.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/




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

* Re: [PATCH] Hide headers using narrowing
  2004-11-23 16:35               ` Reiner Steib
@ 2004-11-25  0:39                 ` Katsumi Yamaoka
  2004-11-25 12:46                   ` Katsumi Yamaoka
  0 siblings, 1 reply; 20+ messages in thread
From: Katsumi Yamaoka @ 2004-11-25  0:39 UTC (permalink / raw)


> On Tue, Nov 23 2004, Romain Francoise wrote:

>> Adding References as a header hidden by default would make this
>> workaround unobtrusive, and invisible.

>>>>> In <v9653wmsk7.fsf@marauder.physik.uni-ulm.de> Reiner Steib wrote:

> Yes, if hiding headers works reliably, we can hide References by
> default.

Since there seems no objection, I'll apply Romain's patch and
also modify the default value for `message-hidden-headers', in
No Gnus, today.



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

* Re: [PATCH] Hide headers using narrowing
  2004-11-25  0:39                 ` Katsumi Yamaoka
@ 2004-11-25 12:46                   ` Katsumi Yamaoka
  2004-11-25 13:18                     ` Ralf Angeli
  2004-11-25 13:32                     ` Romain Francoise
  0 siblings, 2 replies; 20+ messages in thread
From: Katsumi Yamaoka @ 2004-11-25 12:46 UTC (permalink / raw)


>>>>> In <b9yzn163gp8.fsf@jpl.org> Katsumi Yamaoka wrote:

> Since there seems no objection, I'll apply Romain's patch and
> also modify the default value for `message-hidden-headers', in
> No Gnus, today.

I've tested with several versions of Emacs and XEmacs and
committed it.  I've also applied the change Romain Francoise
posted on January 11, 2004 for message-strip-forbidden-properties.

If you upgrade your Gnus, the References header is hidden in the
message buffer by default.  To expose it, run `M-x widen' or put
the following line in your ~/.gnus.el file.

(setq message-hidden-headers nil)

Regards,




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

* Re: [PATCH] Hide headers using narrowing
  2004-11-25 12:46                   ` Katsumi Yamaoka
@ 2004-11-25 13:18                     ` Ralf Angeli
  2004-11-25 13:36                       ` Romain Francoise
  2006-04-15 12:34                       ` Lars Magne Ingebrigtsen
  2004-11-25 13:32                     ` Romain Francoise
  1 sibling, 2 replies; 20+ messages in thread
From: Ralf Angeli @ 2004-11-25 13:18 UTC (permalink / raw)


* Katsumi Yamaoka (2004-11-25) writes:

>>>>>> In <b9yzn163gp8.fsf@jpl.org> Katsumi Yamaoka wrote:
>
>> Since there seems no objection, I'll apply Romain's patch and
>> also modify the default value for `message-hidden-headers', in
>> No Gnus, today.
>
> I've tested with several versions of Emacs and XEmacs and
> committed it.  I've also applied the change Romain Francoise
> posted on January 11, 2004 for message-strip-forbidden-properties.
>
> If you upgrade your Gnus, the References header is hidden in the
> message buffer by default.  To expose it, run `M-x widen' or put
> the following line in your ~/.gnus.el file.
>
> (setq message-hidden-headers nil)

Cool!  What about adding "^Face:" to the headers hidden by default?

I just tried that by setting `message-hidden-headers' to
'("^References:" "^Face:") with help of the "(regexp ...)" customize
option which resulted in this error:

Debugger entered--Lisp error: (wrong-type-argument stringp ("^References:" "^Face:"))
  looking-at(("^References:" "^Face:"))
  message-hide-header-p((("^References:" "^Face:")))
  message-hide-headers()
  gnus-post-news(post "nntp+news.gmane.org:gmane.emacs.auc-tex")
  gnus-summary-post-news(nil)
  call-interactively(gnus-summary-post-news)

So currently I am using "^\\(References\\|Face\\):" as a workaround.

-- 
Ralf




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

* Re: [PATCH] Hide headers using narrowing
  2004-11-25 12:46                   ` Katsumi Yamaoka
  2004-11-25 13:18                     ` Ralf Angeli
@ 2004-11-25 13:32                     ` Romain Francoise
  2005-01-02 18:45                       ` Romain Francoise
  1 sibling, 1 reply; 20+ messages in thread
From: Romain Francoise @ 2004-11-25 13:32 UTC (permalink / raw)


Katsumi Yamaoka <yamaoka@jpl.org> writes:

> I've tested with several versions of Emacs and XEmacs and committed
> it.

Thanks!

> I've also applied the change Romain Francoise posted on January 11,
> 2004 for message-strip-forbidden-properties.

Yes, that hunk had fallen off the patch.

> If you upgrade your Gnus, the References header is hidden in the
> message buffer by default.  To expose it, run `M-x widen' or put
> the following line in your ~/.gnus.el file.

> (setq message-hidden-headers nil)

Also note that if you hide headers that need to be accessed in the
Message buffer by a Lisp package (like gnus-pers.el), it needs to be
adapted to use save-restriction and widen to find all the headers, since
hidden headers aren't in the accessible part of the buffer anymore.

Katsumi, I'll provide a patch for GNUS-NEWS and maybe for the manual
later to document this feature.

-- 
Romain Francoise <romain@orebokech.com> | That there, that's not me. I
it's a miracle -- http://orebokech.com/ | go where I please.



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

* Re: [PATCH] Hide headers using narrowing
  2004-11-25 13:18                     ` Ralf Angeli
@ 2004-11-25 13:36                       ` Romain Francoise
  2004-11-25 15:33                         ` Katsumi Yamaoka
  2006-04-15 12:34                       ` Lars Magne Ingebrigtsen
  1 sibling, 1 reply; 20+ messages in thread
From: Romain Francoise @ 2004-11-25 13:36 UTC (permalink / raw)


Ralf Angeli <dev.null@iwi.uni-sb.de> writes:

> Cool!  What about adding "^Face:" to the headers hidden by default?

Why not...  I think X-Draft-From is a good candidate, too.

> I just tried that by setting `message-hidden-headers' to
> '("^References:" "^Face:") with help of the "(regexp ...)" customize
> option which resulted in this error:

> Debugger entered--Lisp error: (wrong-type-argument stringp ("^References:" "^Face:"))
>   looking-at(("^References:" "^Face:"))
>   message-hide-header-p((("^References:" "^Face:")))

Yeah, the customization code should have set it to '("^References:"
"^Face:"), not '(("^References:" "^Face:")).  Katsumi will probably fix
this shortly.  ;-)

-- 
Romain Francoise <romain@orebokech.com> | They're nothing but scared
it's a miracle -- http://orebokech.com/ | little mice.



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

* Re: [PATCH] Hide headers using narrowing
  2004-11-25 13:36                       ` Romain Francoise
@ 2004-11-25 15:33                         ` Katsumi Yamaoka
  2004-11-25 23:23                           ` Katsumi Yamaoka
  0 siblings, 1 reply; 20+ messages in thread
From: Katsumi Yamaoka @ 2004-11-25 15:33 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 318 bytes --]

>>>>> In <87brdmnj96.fsf@orebokech.com> 
>>>>>	Romain Francoise <romain@orebokech.com> wrote:

> Yeah, the customization code should have set it to '("^References:"
> "^Face:"), not '(("^References:" "^Face:")).  Katsumi will probably fix
> this shortly.  ;-)

Oops.  The following patch fixes it for only Emacs CVS:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 582 bytes --]

--- message.el~	2004-11-25 14:23:14 +0000
+++ message.el	2004-11-25 15:31:26 +0000
@@ -1118,8 +1118,9 @@
   :link '(custom-manual "(message)Message Headers")
   :type '(choice
 	  (regexp :tag "regexp" :format "%t\nRegexp: %v" :size 1)
-	  (group :tag "(regexp ...)" :format "(regexp ...)\n%v" :inline t
-		 (repeat :format "%v%i" (regexp :format "%t: %v\n" :size 1)))
+	  (group :tag "(regexp ...)" :format "(regexp ...)\n%v"
+		 (repeat :format "%v%i" :inline t
+			 (regexp :format "%t: %v\n" :size 1)))
 	  (cons :tag "(not regexp ...)"
 		(const not)
 		(repeat :format "%v%i"

[-- Attachment #3: Type: text/plain, Size: 46 bytes --]


I'll complete it tomorrow (in Japan), sorry.

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

* Re: [PATCH] Hide headers using narrowing
  2004-11-25 15:33                         ` Katsumi Yamaoka
@ 2004-11-25 23:23                           ` Katsumi Yamaoka
  2004-11-25 23:47                             ` Katsumi Yamaoka
  0 siblings, 1 reply; 20+ messages in thread
From: Katsumi Yamaoka @ 2004-11-25 23:23 UTC (permalink / raw)


> Ralf Angeli <dev.null@iwi.uni-sb.de> writes:

>> Cool!  What about adding "^Face:" to the headers hidden by default?

>>>>> In <87brdmnj96.fsf@orebokech.com> Romain Francoise wrote:

> Why not...  I think X-Draft-From is a good candidate, too.

I also think including Face and X-Draft-From in the default
value is a good idea.  Patches are welcome. :)

>>>>> In <yotlpt22j64s.fsf@jpl.org> Katsumi Yamaoka wrote:

> Oops.  The following patch fixes it for only Emacs CVS:

> +	  (group :tag "(regexp ...)" :format "(regexp ...)\n%v"
> +		 (repeat :format "%v%i" :inline t
> +			 (regexp :format "%t: %v\n" :size 1)))

> I'll complete it tomorrow (in Japan), sorry.

I used the `(group (repeat :inline t ...))' form to avoid the
:menu-tag bug in the `repeat' widget in Emacs 21.3 or earlier.
Now I found another way to avoid the bug and committed it.



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

* Re: [PATCH] Hide headers using narrowing
  2004-11-25 23:23                           ` Katsumi Yamaoka
@ 2004-11-25 23:47                             ` Katsumi Yamaoka
  0 siblings, 0 replies; 20+ messages in thread
From: Katsumi Yamaoka @ 2004-11-25 23:47 UTC (permalink / raw)


I noticed mml-preview doesn't show hidden headers, and fixed it
so that all headers are visible in the preview buffer.



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

* Re: [PATCH] Hide headers using narrowing
  2004-11-25 13:32                     ` Romain Francoise
@ 2005-01-02 18:45                       ` Romain Francoise
  2005-01-02 23:33                         ` Katsumi Yamaoka
  0 siblings, 1 reply; 20+ messages in thread
From: Romain Francoise @ 2005-01-02 18:45 UTC (permalink / raw)


Romain Francoise <romain@orebokech.com> writes:

> Katsumi, I'll provide a patch for GNUS-NEWS and maybe for the manual
> later to document this feature.

Nobody seemed to object to this new feature, so let's update the docs:

Index: GNUS-NEWS
===================================================================
RCS file: /usr/local/cvsroot/gnus/GNUS-NEWS,v
retrieving revision 7.25
diff -u -r7.25 GNUS-NEWS
--- GNUS-NEWS	2 Jan 2005 02:21:08 -0000	7.25
+++ GNUS-NEWS	2 Jan 2005 18:44:21 -0000
@@ -42,8 +42,6 @@
 
 ** You can now drag and drop attachments to the Message buffer.
 
-** `/ r' limits the summary buffer to replied articles.
-
 ** ANSI SGR control sequences can be transformed using `W A'.
 
 ANSI sequences are used in some Chinese hierarchies for highlighting
@@ -81,8 +79,8 @@
 ** Gnus now view DNS master files sent as text/dns using dns-mode.
 
 ** Gnus now support the "hashcash" client puzzle anti-spam idea.  See
-the Gnus manual, section Hashcash, for more information.  Use (setq
-message-generate-hashcash t) to enable.
+the Gnus manual, section Hashcash, for more information.  Use `(setq
+message-generate-hashcash t)' to enable.
 
 ** Gnus supports new limiting commands in the Summary buffer: `/ r'
 (`gnus-summary-limit-to-replied') and `/ R'
@@ -97,6 +95,9 @@
 ** URLs inside OpenPGP: headers are retrieved and imported to your PGP
 key ring when you click on them.
 
+** Gnus uses narrowing to hide headers in Message buffers.  The
+`References' header is hidden by default.  To make all headers
+visible, use `(setq message-hidden-headers nil)'.
 \f
 * For older news, see Gnus info node "New Features".
 
Index: ChangeLog
===================================================================
RCS file: /usr/local/cvsroot/gnus/ChangeLog,v
retrieving revision 7.21
diff -u -r7.21 ChangeLog
--- ChangeLog	26 Dec 2004 13:45:08 -0000	7.21
+++ ChangeLog	2 Jan 2005 18:44:22 -0000
@@ -1,3 +1,7 @@
+2005-01-02  Romain Francoise  <romain@orebokech.com>
+
+	* GNUS-NEWS: Generated.
+
 2004-12-26  Katsumi Yamaoka  <yamaoka@jpl.org>
 
 	* GNUS-NEWS: Generated.
Index: texi/ChangeLog
===================================================================
RCS file: /usr/local/cvsroot/gnus/texi/ChangeLog,v
retrieving revision 7.115
diff -u -r7.115 ChangeLog
--- texi/ChangeLog	2 Jan 2005 02:20:45 -0000	7.115
+++ texi/ChangeLog	2 Jan 2005 18:44:22 -0000
@@ -1,3 +1,12 @@
+2005-01-02  Romain Francoise  <romain@orebokech.com>
+
+	* gnus-news.texi: Mention the new method used to hide headers.
+	Remove duplicate item about `/ r'.  Add missing @code.
+
+	* message.texi (Message Headers): Mention that headers are hidden
+	using narrowing, and how to expose them.
+	Update copyright.
+
 2005-01-02  Simon Josefsson  <jas@extundo.com>
 
 	* gnus-news.texi: Add.
Index: texi/gnus-news.texi
===================================================================
RCS file: /usr/local/cvsroot/gnus/texi/gnus-news.texi,v
retrieving revision 7.20
diff -u -r7.20 gnus-news.texi
--- texi/gnus-news.texi	2 Jan 2005 02:20:45 -0000	7.20
+++ texi/gnus-news.texi	2 Jan 2005 18:44:22 -0000
@@ -54,8 +54,6 @@
 
 @item You can now drag and drop attachments to the Message buffer.
 
-@item @kbd{/ r} limits the summary buffer to replied articles.
-
 @item @acronym{ANSI} @acronym{SGR} control sequences can be transformed
 using @kbd{W A}.
 
@@ -98,7 +96,7 @@
 
 @item Gnus now support the ``hashcash'' client puzzle anti-spam idea.
 See the Gnus manual, section Hashcash, for more information.  Use
-(setq message-generate-hashcash t) to enable.
+@code{(setq message-generate-hashcash t)} to enable.
 
 @item Gnus supports new limiting commands in the Summary buffer:
 @kbd{/ r} (@code{gnus-summary-limit-to-replied}) and @kbd{/ R}
@@ -114,6 +112,9 @@
 @item URLs inside OpenPGP: headers are retrieved and imported to your
 PGP key ring when you click on them.
 
+@item Gnus uses narrowing to hide headers in Message buffers.
+The @code{References} header is hidden by default.  To make all
+headers visible, use @code{(setq message-hidden-headers nil)}.
 @end itemize
 
 @c gnus-news.texi ends here.
Index: texi/message.texi
===================================================================
RCS file: /usr/local/cvsroot/gnus/texi/message.texi,v
retrieving revision 7.13
diff -u -r7.13 message.texi
--- texi/message.texi	8 Dec 2004 00:05:13 -0000	7.13
+++ texi/message.texi	2 Jan 2005 18:44:22 -0000
@@ -8,7 +8,7 @@
 @copying
 This file documents Message, the Emacs message composition mode.
 
-Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 
+Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 
 Free Software Foundation, Inc.
 
 @quotation
@@ -1405,6 +1405,9 @@
 (setq message-hidden-headers
       '(not "From" "Subject" "To" "Cc" "Newsgroups"))
 @end lisp
+
+Headers are hidden using narrowing, you can use @kbd{M-x widen} to
+expose them in the buffer.
 
 @item message-header-synonyms
 @vindex message-header-synonyms

-- 
Romain Francoise <romain@orebokech.com> | Every sky is blue, but not
it's a miracle -- http://orebokech.com/ | for me and you.



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

* Re: [PATCH] Hide headers using narrowing
  2005-01-02 18:45                       ` Romain Francoise
@ 2005-01-02 23:33                         ` Katsumi Yamaoka
  0 siblings, 0 replies; 20+ messages in thread
From: Katsumi Yamaoka @ 2005-01-02 23:33 UTC (permalink / raw)


>>>>> In <87acrrbrfs.fsf@orebokech.com> 
>>>>>	Romain Francoise <romain@orebokech.com> wrote:

> Romain Francoise <romain@orebokech.com> writes:

>> Katsumi, I'll provide a patch for GNUS-NEWS and maybe for the manual
>> later to document this feature.

> Nobody seemed to object to this new feature, so let's update the docs:

I've applied the patch.  Thank you.



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

* Re: [PATCH] Hide headers using narrowing
  2004-11-25 13:18                     ` Ralf Angeli
  2004-11-25 13:36                       ` Romain Francoise
@ 2006-04-15 12:34                       ` Lars Magne Ingebrigtsen
  1 sibling, 0 replies; 20+ messages in thread
From: Lars Magne Ingebrigtsen @ 2006-04-15 12:34 UTC (permalink / raw)


Ralf Angeli <dev.null@iwi.uni-sb.de> writes:

> Cool!  What about adding "^Face:" to the headers hidden by default?

Ok; done.  I also added X-Face.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




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

end of thread, other threads:[~2006-04-15 12:34 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-11 12:45 [PATCH] Hide headers using narrowing Romain Francoise
2004-11-22 20:50 ` Romain Francoise
2004-11-23  0:18   ` Katsumi Yamaoka
2004-11-23 11:21     ` Romain Francoise
2004-11-23 12:55       ` Katsumi Yamaoka
2004-11-23 13:39         ` Romain Francoise
2004-11-23 14:49           ` Reiner Steib
2004-11-23 15:41             ` Romain Francoise
2004-11-23 16:35               ` Reiner Steib
2004-11-25  0:39                 ` Katsumi Yamaoka
2004-11-25 12:46                   ` Katsumi Yamaoka
2004-11-25 13:18                     ` Ralf Angeli
2004-11-25 13:36                       ` Romain Francoise
2004-11-25 15:33                         ` Katsumi Yamaoka
2004-11-25 23:23                           ` Katsumi Yamaoka
2004-11-25 23:47                             ` Katsumi Yamaoka
2006-04-15 12:34                       ` Lars Magne Ingebrigtsen
2004-11-25 13:32                     ` Romain Francoise
2005-01-02 18:45                       ` Romain Francoise
2005-01-02 23:33                         ` Katsumi Yamaoka

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