Gnus development mailing list
 help / color / mirror / Atom feed
* keep Gcc: field in buffer after sending
@ 2007-12-05  5:03 jidanni
  2007-12-11 16:31 ` Ted Zlatanov
  0 siblings, 1 reply; 12+ messages in thread
From: jidanni @ 2007-12-05  5:03 UTC (permalink / raw)
  To: ding

Gentlemen, I note the Gcc: field disappears from the buffer after a
message is sent.

But often I go back to that buffer and make some alterations and send
another similar message, only later to discover a copy was not saved
on disk.

There ought to be a variable to stop this senseless abduction of the
Gcc: field upon message-send-and-exit, etc.



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

* Re: keep Gcc: field in buffer after sending
  2007-12-05  5:03 keep Gcc: field in buffer after sending jidanni
@ 2007-12-11 16:31 ` Ted Zlatanov
  2007-12-11 19:02   ` jidanni
  2007-12-11 22:08   ` Reiner Steib
  0 siblings, 2 replies; 12+ messages in thread
From: Ted Zlatanov @ 2007-12-11 16:31 UTC (permalink / raw)
  To: jidanni; +Cc: ding

On Wed, 05 Dec 2007 13:03:53 +0800 jidanni@jidanni.org wrote: 

j> Gentlemen, I note the Gcc: field disappears from the buffer after a
j> message is sent.

j> But often I go back to that buffer and make some alterations and send
j> another similar message, only later to discover a copy was not saved
j> on disk.

j> There ought to be a variable to stop this senseless abduction of the
j> Gcc: field upon message-send-and-exit, etc.

I think this is useful.  Try the following simple patch, setting
gnus-mgs-keep-gcc-header to t.  Note it will leave the Gcc header in
outgoing messages, which is not an optimal solution, but doing it right
would require a lot more changes.

Ted

Index: gnus-msg.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-msg.el,v
retrieving revision 7.63
diff -u -r7.63 gnus-msg.el
--- gnus-msg.el 25 Nov 2007 18:25:11 -0000      7.63
+++ gnus-msg.el 11 Dec 2007 16:28:56 -0000
@@ -86,6 +86,11 @@
   :group 'gnus-message
   :type 'boolean)
 
+(defcustom gnus-msg-keep-gcc-header nil
+  "*If non-nil, keep the Gcc header in messages."
+  :group 'gnus-message
+  :type 'boolean)
+
 (defcustom gnus-crosspost-complaint
   "Hi,
 
@@ -1630,7 +1635,8 @@
            groups group method group-art
            mml-externalize-attachments)
        (when gcc
-         (message-remove-header "gcc")
+         (unless gnus-msg-keep-gcc-header
+           (message-remove-header "gcc"))
          (widen)
          (setq groups (message-unquote-tokens
                        (message-tokenize-header gcc " ,")))



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

* Re: keep Gcc: field in buffer after sending
  2007-12-11 16:31 ` Ted Zlatanov
@ 2007-12-11 19:02   ` jidanni
  2007-12-11 23:01     ` Ted Zlatanov
  2007-12-11 22:08   ` Reiner Steib
  1 sibling, 1 reply; 12+ messages in thread
From: jidanni @ 2007-12-11 19:02 UTC (permalink / raw)
  To: ding

OK, thanks. I put
(setq gnus-msg-keep-gcc-header t) ;will be in Debian sid gnus-msg.el 2008 hopefully
into my .gnus.el in anticipation.



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

* Re: keep Gcc: field in buffer after sending
  2007-12-11 16:31 ` Ted Zlatanov
  2007-12-11 19:02   ` jidanni
@ 2007-12-11 22:08   ` Reiner Steib
  2007-12-11 23:10     ` Ted Zlatanov
  1 sibling, 1 reply; 12+ messages in thread
From: Reiner Steib @ 2007-12-11 22:08 UTC (permalink / raw)
  To: ding

On Tue, Dec 11 2007, Ted Zlatanov wrote:

> Note it will leave the Gcc header in outgoing messages, which is not
> an optimal solution, but doing it right would require a lot more
> changes.

What's wrong with removing Gcc from `message-ignored-mail-headers'
and/or `message-ignored-news-headers'?

,----[ (info "(message)Mail Headers") ]
| `message-ignored-mail-headers'
|      Regexp of headers to be removed before mailing.  The default is
|      `^[GF]cc:\\|^Resent-Fcc:\\|^Xref:\\|^X-Draft-From:\\|
|      ^X-Gnus-Agent-Meta-Information:'.
`----

,----[ (info "(message)News Headers") ]
| `message-ignored-news-headers'
|      Regexp of headers to be removed before posting.  The default is
|      `^NNTP-Posting-Host:\\|^Xref:\\|^[BGF]cc:\\|^Resent-Fcc:\\|
|      ^X-Draft-From:\\|^X-Gnus-Agent-Meta-Information:'.
`----

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




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

* Re: keep Gcc: field in buffer after sending
  2007-12-11 19:02   ` jidanni
@ 2007-12-11 23:01     ` Ted Zlatanov
  2007-12-12  8:27       ` jidanni
  0 siblings, 1 reply; 12+ messages in thread
From: Ted Zlatanov @ 2007-12-11 23:01 UTC (permalink / raw)
  To: jidanni; +Cc: ding

On Wed, 12 Dec 2007 03:02:21 +0800 jidanni@jidanni.org wrote: 

j> OK, thanks. I put
j> (setq gnus-msg-keep-gcc-header t) ;will be in Debian sid gnus-msg.el 2008 hopefully
j> into my .gnus.el in anticipation.

That's good, but did you test the patch itself?  I won't commit it until
at least one user has tested it...

Ted



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

* Re: keep Gcc: field in buffer after sending
  2007-12-11 22:08   ` Reiner Steib
@ 2007-12-11 23:10     ` Ted Zlatanov
  0 siblings, 0 replies; 12+ messages in thread
From: Ted Zlatanov @ 2007-12-11 23:10 UTC (permalink / raw)
  To: ding

On Tue, 11 Dec 2007 23:08:18 +0100 Reiner Steib <reinersteib+gmane@imap.cc> wrote: 

RS> On Tue, Dec 11 2007, Ted Zlatanov wrote:
>> Note it will leave the Gcc header in outgoing messages, which is not
>> an optimal solution, but doing it right would require a lot more
>> changes.

RS> What's wrong with removing Gcc from `message-ignored-mail-headers'
RS> and/or `message-ignored-news-headers'?

RS> ,----[ (info "(message)Mail Headers") ]
RS> | `message-ignored-mail-headers'
RS> |      Regexp of headers to be removed before mailing.  The default is
RS> |      `^[GF]cc:\\|^Resent-Fcc:\\|^Xref:\\|^X-Draft-From:\\|
RS> |      ^X-Gnus-Agent-Meta-Information:'.
RS> `----

RS> ,----[ (info "(message)News Headers") ]
RS> | `message-ignored-news-headers'
RS> |      Regexp of headers to be removed before posting.  The default is
RS> |      `^NNTP-Posting-Host:\\|^Xref:\\|^[BGF]cc:\\|^Resent-Fcc:\\|
RS> |      ^X-Draft-From:\\|^X-Gnus-Agent-Meta-Information:'.
RS> `----

It looked to me from the source like the Gcc header is specifically
removed after the Gcc processing, no matter what those variables say.
This happens in gnus-msg.el:gnus-inews-do-gcc but those variables you
listed may also need to be adjusted.  Maybe gnus-inews-do-gcc works on a
temporary copy of the article, but I didn't see that.

Ted



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

* Re: keep Gcc: field in buffer after sending
  2007-12-11 23:01     ` Ted Zlatanov
@ 2007-12-12  8:27       ` jidanni
  2007-12-12 12:45         ` Ted Zlatanov
  0 siblings, 1 reply; 12+ messages in thread
From: jidanni @ 2007-12-12  8:27 UTC (permalink / raw)
  To: ding

TZ> That's good, but did you test the patch itself?  I won't commit it until
TZ> at least one user has tested it...

$ patch gnus-msg.el patch
patching file gnus-msg.el
Hunk #2 FAILED at 1635.
1 out of 2 hunks FAILED -- saving rejects to file gnus-msg.el.rej
$ apt-cache policy emacs22-el
  Installed: 22.1+1-2.2
        500 http://linux.cdpa.nsysu.edu.tw sid/main Packages

That's right, I have not implemented a cutting edge version test bed,
so, "I trust that your patch must work".



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

* Re: keep Gcc: field in buffer after sending
  2007-12-12  8:27       ` jidanni
@ 2007-12-12 12:45         ` Ted Zlatanov
  2007-12-12 13:16           ` Miles Bader
  0 siblings, 1 reply; 12+ messages in thread
From: Ted Zlatanov @ 2007-12-12 12:45 UTC (permalink / raw)
  To: jidanni; +Cc: ding

On Wed, 12 Dec 2007 16:27:57 +0800 jidanni@jidanni.org wrote: 

TZ> That's good, but did you test the patch itself?  I won't commit it until
TZ> at least one user has tested it...

j> $ patch gnus-msg.el patch
j> patching file gnus-msg.el
j> Hunk #2 FAILED at 1635.
j> 1 out of 2 hunks FAILED -- saving rejects to file gnus-msg.el.rej
j> $ apt-cache policy emacs22-el
j>   Installed: 22.1+1-2.2
j>         500 http://linux.cdpa.nsysu.edu.tw sid/main Packages

j> That's right, I have not implemented a cutting edge version test bed,
j> so, "I trust that your patch must work".

It's not a problem with me that you are not willing to test the latest
Gnus, but you must realize that the patch will not go into the CVS tree
until at least one user has tested it.  I tried testing it but the reply
buffer was killed after I hit `C-c C-c'; I don't know how to prevent
that and I didn't have the time to look into it further.

Also, Reiner's note about the ignored headers variables might make a
difference for the patch.

Ted



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

* Re: keep Gcc: field in buffer after sending
  2007-12-12 12:45         ` Ted Zlatanov
@ 2007-12-12 13:16           ` Miles Bader
  2007-12-12 13:26             ` Ted Zlatanov
  0 siblings, 1 reply; 12+ messages in thread
From: Miles Bader @ 2007-12-12 13:16 UTC (permalink / raw)
  To: ding; +Cc: jidanni

Ted Zlatanov <tzz@lifelogs.com> writes:
> I tried testing it but the reply buffer was killed after I hit `C-c
> C-c'

Are you sure?  Gnus renames reply buffers (from "*blah*" to "*sent blah*"),
but it doesn't seem to kill them until you exit Gnus...

-Miles

-- 
Americans are broad-minded people.  They'll accept the fact that a person can
be an alcoholic, a dope fiend, a wife beater, and even a newspaperman, but if a
man doesn't drive, there is something wrong with him.  -- Art Buchwald



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

* Re: keep Gcc: field in buffer after sending
  2007-12-12 13:16           ` Miles Bader
@ 2007-12-12 13:26             ` Ted Zlatanov
  2007-12-12 19:44               ` Reiner Steib
  0 siblings, 1 reply; 12+ messages in thread
From: Ted Zlatanov @ 2007-12-12 13:26 UTC (permalink / raw)
  To: Miles Bader; +Cc: ding, jidanni

On Wed, 12 Dec 2007 22:16:27 +0900 Miles Bader <miles@gnu.org> wrote: 

MB> Ted Zlatanov <tzz@lifelogs.com> writes:
>> I tried testing it but the reply buffer was killed after I hit `C-c
>> C-c'

MB> Are you sure?  Gnus renames reply buffers (from "*blah*" to "*sent blah*"),
MB> but it doesn't seem to kill them until you exit Gnus...

For some reason that's not happening for me.  Maybe I have something set
and forgot about it, but I didn't see sucha buffer  (I just checked my whole
gnus.el).  Weird.  I just tested it again, and no *sent ...* buffer was
created.

Ted



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

* Re: keep Gcc: field in buffer after sending
  2007-12-12 13:26             ` Ted Zlatanov
@ 2007-12-12 19:44               ` Reiner Steib
  2007-12-12 20:46                 ` Ted Zlatanov
  0 siblings, 1 reply; 12+ messages in thread
From: Reiner Steib @ 2007-12-12 19:44 UTC (permalink / raw)
  To: ding

On Wed, Dec 12 2007, Ted Zlatanov wrote:

> For some reason that's not happening for me.  Maybe I have something set
> and forgot about it, but I didn't see sucha buffer  (I just checked my whole
> gnus.el).  Weird.  I just tested it again, and no *sent ...* buffer was
> created.

,----[ (info "(message)Message Buffers") ]
| `message-kill-buffer-on-exit'
|      If non-`nil', kill the buffer immediately on exit.
`----

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




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

* Re: keep Gcc: field in buffer after sending
  2007-12-12 19:44               ` Reiner Steib
@ 2007-12-12 20:46                 ` Ted Zlatanov
  0 siblings, 0 replies; 12+ messages in thread
From: Ted Zlatanov @ 2007-12-12 20:46 UTC (permalink / raw)
  To: ding

On Wed, 12 Dec 2007 20:44:26 +0100 Reiner Steib <reinersteib+gmane@imap.cc> wrote: 

RS> On Wed, Dec 12 2007, Ted Zlatanov wrote:
>> For some reason that's not happening for me.  Maybe I have something set
>> and forgot about it, but I didn't see sucha buffer  (I just checked my whole
>> gnus.el).  Weird.  I just tested it again, and no *sent ...* buffer was
>> created.

RS> ,----[ (info "(message)Message Buffers") ]
RS> | `message-kill-buffer-on-exit'
RS> |      If non-`nil', kill the buffer immediately on exit.
RS> `----

C-h v tells me:
'message-kill-buffer-on-exit is a variable defined in `message.el'.
Its value is nil'

It's also not in my gnus.el file (I looked through it for suspicious
functions and variables and also used grep), and my Gnus checkout is
from yesterday.

I can dig further if you think this might be an actual bug; it doesn't
bother me and I actually thought it was the default behavior.

Ted



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

end of thread, other threads:[~2007-12-12 20:46 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-05  5:03 keep Gcc: field in buffer after sending jidanni
2007-12-11 16:31 ` Ted Zlatanov
2007-12-11 19:02   ` jidanni
2007-12-11 23:01     ` Ted Zlatanov
2007-12-12  8:27       ` jidanni
2007-12-12 12:45         ` Ted Zlatanov
2007-12-12 13:16           ` Miles Bader
2007-12-12 13:26             ` Ted Zlatanov
2007-12-12 19:44               ` Reiner Steib
2007-12-12 20:46                 ` Ted Zlatanov
2007-12-11 22:08   ` Reiner Steib
2007-12-11 23:10     ` Ted Zlatanov

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