* Kill recipients in To/Cc headers
@ 2004-03-01 9:01 Kai Grossjohann
2004-03-01 9:12 ` Jonas Steverud
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: Kai Grossjohann @ 2004-03-01 9:01 UTC (permalink / raw)
I often have to edit recipients in To/Cc headers. For example, I
might wish to remove a recipient, or move a certain recipient from one
header to another.
But there is no convenient way to kill a recipient. Usually, I end up
doing C-M-SPC several times, or perhaps just C-SPC C-f C-f ... C-w.
WIBNI M-k or somesuch command would kill a recipient, when in a To/Cc
header?
Kai
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Kill recipients in To/Cc headers
2004-03-01 9:01 Kill recipients in To/Cc headers Kai Grossjohann
@ 2004-03-01 9:12 ` Jonas Steverud
2004-03-01 20:01 ` Karl Pflästerer
` (2 subsequent siblings)
3 siblings, 0 replies; 10+ messages in thread
From: Jonas Steverud @ 2004-03-01 9:12 UTC (permalink / raw)
Kai Grossjohann <kai@emptydomain.de> writes:
> WIBNI M-k or somesuch command would kill a recipient, when in a To/Cc
> header?
Wouldn't it be possible to implement something like kill-sexp?
(defun message-kill-recepient (NumOfRec)
"Blah blah"
(interactive)
(let ((opoint (point)))
(message-forward-receptient (or NumOfRec 1))
(kill-region opoint (point)))) ;; IMHO, delete-region should be an option
The trick is to implement message-forward-receptient (which is a nice
side-effect of this). Is it sufficent to look for a comma or is commas
allowed in the name?
Hmm. Now that I think of it I think I've seen commans in the name part
of the adresses.
I think this goes beyond me. :-(
--
( http://hem.bredband.net/steverud/ ! Wei Wu Wei )
( Meaning of U2 Lyrics, Roleplaying ! To Do Without Do )
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Kill recipients in To/Cc headers
2004-03-01 9:01 Kill recipients in To/Cc headers Kai Grossjohann
2004-03-01 9:12 ` Jonas Steverud
@ 2004-03-01 20:01 ` Karl Pflästerer
2004-05-16 16:59 ` Lars Magne Ingebrigtsen
2004-05-17 0:34 ` Lars Magne Ingebrigtsen
3 siblings, 0 replies; 10+ messages in thread
From: Karl Pflästerer @ 2004-03-01 20:01 UTC (permalink / raw)
On 1 Mar 2004, Kai Grossjohann <- kai@emptydomain.de wrote:
> WIBNI M-k or somesuch command would kill a recipient, when in a To/Cc
> header?
Good idea IMO. Perhaps we could think about using M-d as shortcut? I
wanted to post a solution but then thought about something I didn't knew
for sure at the moment: does Gnus fold addresses in the message buffer
in such a way that it splits not only between commata but also in
between one address?
KP
--
If you have nothing to say on a subject, replying with a line such as,
"I agree with this." puts you in the TO:'s for all future messages, and
establishes you as "one who really cares", if not an actual expert, on
the topic at hand. -- from the Symbolics Guidelines for Sending Mail
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Kill recipients in To/Cc headers
2004-03-01 9:01 Kill recipients in To/Cc headers Kai Grossjohann
2004-03-01 9:12 ` Jonas Steverud
2004-03-01 20:01 ` Karl Pflästerer
@ 2004-05-16 16:59 ` Lars Magne Ingebrigtsen
2004-05-17 7:45 ` Daniel Pittman
2004-05-17 0:34 ` Lars Magne Ingebrigtsen
3 siblings, 1 reply; 10+ messages in thread
From: Lars Magne Ingebrigtsen @ 2004-05-16 16:59 UTC (permalink / raw)
Kai Grossjohann <kai@emptydomain.de> writes:
> WIBNI M-k or somesuch command would kill a recipient, when in a To/Cc
> header?
Yes, it would. Hm; I wonder what's the correct approach to take.
Should the command delete the address under point, or should it
delete up till the next address?
For instance:
To: "Some, name" <larsi@netfonds.no>, larsi@netfonds.no (Lars),
ding@gnus.org
If I put point on "name", I could either delete the first address and
get
To: larsi@netfonds.no (Lars),
ding@gnus.org
or delete until the next address, which would give us
To: "Some, larsi@netfonds.no (Lars),
ding@gnus.org
which is spectacularly invalid.
Hm. I think that to do this correctly, you really have to parse
RFC2822 headers, which I really don't want to do. Again. :-)
Perhaps something could be done with `mail-header-parse-addresses'?
That'll give us a list of addresses, and then we "only" have to match
that to the address point in "in", and "then" remove "that" "address"
"from" "the" header.
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Kill recipients in To/Cc headers
2004-03-01 9:01 Kill recipients in To/Cc headers Kai Grossjohann
` (2 preceding siblings ...)
2004-05-16 16:59 ` Lars Magne Ingebrigtsen
@ 2004-05-17 0:34 ` Lars Magne Ingebrigtsen
3 siblings, 0 replies; 10+ messages in thread
From: Lars Magne Ingebrigtsen @ 2004-05-17 0:34 UTC (permalink / raw)
Kai Grossjohann <kai@emptydomain.de> writes:
> WIBNI M-k or somesuch command would kill a recipient, when in a To/Cc
> header?
It looks like my carefully considered followup to this message was
lost (twice; I reposted it, too), but I've made a stab at
implementing `message-delete-address', and it's total crap.
I really don't think there's any way to avoid doing Yet Another
rfc2822 parser if this has any hope of working in any sensible
manner.
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Kill recipients in To/Cc headers
2004-05-16 16:59 ` Lars Magne Ingebrigtsen
@ 2004-05-17 7:45 ` Daniel Pittman
2004-05-17 11:15 ` Kai Grossjohann
2004-05-17 11:54 ` Lars Magne Ingebrigtsen
0 siblings, 2 replies; 10+ messages in thread
From: Daniel Pittman @ 2004-05-17 7:45 UTC (permalink / raw)
On 17 May 2004, Lars Magne Ingebrigtsen wrote:
> Kai Grossjohann <kai@emptydomain.de> writes:
>
>> WIBNI M-k or somesuch command would kill a recipient, when in a To/Cc
>> header?
>
> Yes, it would. Hm; I wonder what's the correct approach to take.
> Should the command delete the address under point, or should it
> delete up till the next address?
It should act as much like 'kill-sentence' as possible, IMO, since that
is what it does over in a text-mode or fundamental-mode buffer. Which
is to say, it should delete the address under point.
[...]
> Perhaps something could be done with `mail-header-parse-addresses'?
> That'll give us a list of addresses, and then we "only" have to match
> that to the address point in "in", and "then" remove "that" "address"
> "from" "the" header.
Whee. Maybe it is easier to convince that function, or one like it, to
return a list of marks that represent the start and end of the address
components or something?
Daniel
--
Any attempt to curb user abuse will only result in more expensive abuse.
-- Garret Boer
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Kill recipients in To/Cc headers
2004-05-17 7:45 ` Daniel Pittman
@ 2004-05-17 11:15 ` Kai Grossjohann
2004-05-17 11:54 ` Lars Magne Ingebrigtsen
1 sibling, 0 replies; 10+ messages in thread
From: Kai Grossjohann @ 2004-05-17 11:15 UTC (permalink / raw)
Daniel Pittman <daniel@rimspace.net> writes:
> On 17 May 2004, Lars Magne Ingebrigtsen wrote:
>> Kai Grossjohann <kai@emptydomain.de> writes:
>>
>>> WIBNI M-k or somesuch command would kill a recipient, when in a To/Cc
>>> header?
>>
>> Yes, it would. Hm; I wonder what's the correct approach to take.
>> Should the command delete the address under point, or should it
>> delete up till the next address?
>
> It should act as much like 'kill-sentence' as possible, IMO, since that
> is what it does over in a text-mode or fundamental-mode buffer.
I think this is not a good idea -- it would create invalid addresses.
> Which is to say, it should delete the address under point.
M-k deletes from point to end of sentence...
Kai
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Kill recipients in To/Cc headers
2004-05-17 7:45 ` Daniel Pittman
2004-05-17 11:15 ` Kai Grossjohann
@ 2004-05-17 11:54 ` Lars Magne Ingebrigtsen
2004-05-17 21:47 ` Danny Siu
1 sibling, 1 reply; 10+ messages in thread
From: Lars Magne Ingebrigtsen @ 2004-05-17 11:54 UTC (permalink / raw)
Daniel Pittman <daniel@rimspace.net> writes:
> It should act as much like 'kill-sentence' as possible, IMO, since that
> is what it does over in a text-mode or fundamental-mode buffer. Which
> is to say, it should delete the address under point.
I've now implemented this.
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Kill recipients in To/Cc headers
2004-05-17 11:54 ` Lars Magne Ingebrigtsen
@ 2004-05-17 21:47 ` Danny Siu
2004-05-17 22:05 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 10+ messages in thread
From: Danny Siu @ 2004-05-17 21:47 UTC (permalink / raw)
I think "C-c ESC k message-kill-address" is using it, right?
Lars Magne Ingebrigtsen writes:
Lars> Daniel Pittman <daniel@rimspace.net> writes:
>> It should act as much like 'kill-sentence' as possible, IMO, since that
>> is what it does over in a text-mode or fundamental-mode buffer. Which
>> is to say, it should delete the address under point.
Lars> I've now implemented this.
Lars> -- (domestic pets only, the antidote for overdose, milk.)
Lars> larsi@gnus.org * Lars Magne Ingebrigtsen
--
Danny Dick-Fung Siu mailto:dsiu@adobe.com
Advanced Technology Group @ Adobe Systems Incorporated
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Kill recipients in To/Cc headers
2004-05-17 21:47 ` Danny Siu
@ 2004-05-17 22:05 ` Lars Magne Ingebrigtsen
0 siblings, 0 replies; 10+ messages in thread
From: Lars Magne Ingebrigtsen @ 2004-05-17 22:05 UTC (permalink / raw)
Danny Siu <dsiu@adobe.com> writes:
> I think "C-c ESC k message-kill-address" is using it, right?
Yup. `C-c M-k' isn't the easiest keystroke to use, though. Anybody
got a suggestion for a better key?
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2004-05-17 22:05 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-01 9:01 Kill recipients in To/Cc headers Kai Grossjohann
2004-03-01 9:12 ` Jonas Steverud
2004-03-01 20:01 ` Karl Pflästerer
2004-05-16 16:59 ` Lars Magne Ingebrigtsen
2004-05-17 7:45 ` Daniel Pittman
2004-05-17 11:15 ` Kai Grossjohann
2004-05-17 11:54 ` Lars Magne Ingebrigtsen
2004-05-17 21:47 ` Danny Siu
2004-05-17 22:05 ` Lars Magne Ingebrigtsen
2004-05-17 0:34 ` Lars Magne Ingebrigtsen
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).