Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* gnus 5.10.1:  message-kill-to-signature doesn't?
@ 2003-05-07  0:16 Benjamin Rutt
       [not found] ` <84fznm7meo.fsf@lucy.is.informatik.uni-duisburg.de>
  0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Rutt @ 2003-05-07  0:16 UTC (permalink / raw)


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

In gnus 5.10.1, is it true that the `message-kill-to-signature'
function has changed somehow?  If you place some text (like foo bar,
below) on the last line just before the signature, and then place some
text before it, like below, and leave the cursor where the exclamation
point is below, it kills most of the lines between the point and the
signature, but it leaves the 'foo bar'.  Is anyone else seeing this?
Or was it always like this?

Maybe it should be changed so it really does kill all text up to the
signature?  I've attached a patch that does this.

!blah
blah
blah 

foo bar
-- 
Benjamin

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

--- message.el.orig	2003-05-01 09:13:04.000000000 -0400
+++ message.el	2003-05-06 20:11:36.827783000 -0400
@@ -2627,7 +2627,7 @@
     (message-goto-signature)
     (unless (eobp)
       (forward-line -2))
-    (kill-region point (point))
+    (kill-region point (line-end-position))
     (unless (bolp)
       (insert "\n"))))
 

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

* Re: gnus 5.10.1:  message-kill-to-signature doesn't?
       [not found] ` <84fznm7meo.fsf@lucy.is.informatik.uni-duisburg.de>
@ 2003-05-10 18:30   ` Vasily Korytov
       [not found]   ` <m3fznmk3gn.fsf@defun.localdomain>
  1 sibling, 0 replies; 3+ messages in thread
From: Vasily Korytov @ 2003-05-10 18:30 UTC (permalink / raw)


On Sat, 10 May 2003 19:15:59 +0200, Kai Groъjohann wrote:

> Benjamin Rutt <rutt+news@cis.ohio-state.edu> writes:
>
>> Maybe it should be changed so it really does kill all text up to the
>> signature?  I've attached a patch that does this.
>
> No!  It would kill my name!
>
> (Actually, I stopped putting my name on the last line.  Not sure why.
> I've used the old style for this posting, for demonstration purposes.)

Maybe, we should apply this to the current CVS:

--8<------------------------schnipp------------------------->8---
2003-05-10  Vasily Korytov  <deskpot@myrealbox.com>

	* message.el (message-kill-to-signature): Use a [prefix] arg to
	determine, whether to delete the last line.

--- gnus/lisp/message.el	Sat May 10 19:05:12 2003
+++ lisp/message.el	Sat May 10 22:27:06 2003
@@ -2612,13 +2612,16 @@
   (when (message-goto-signature)
     (forward-line -2)))
 
-(defun message-kill-to-signature ()
-  "Deletes all text up to the signature."
+(defun message-kill-to-signature (&optional arg)
+  "Deletes all text up to the signature. If an argument or prefix arg is
+non-nil, leave the last line before the signature intact."
   (interactive)
   (let ((point (point)))
     (message-goto-signature)
     (unless (eobp)
-      (end-of-line -1))
+      (if (or arg current-prefix-arg)
+	  (forward-line -2)
+	(end-of-line -1)))
     (kill-region point (point))
     (unless (bolp)
       (insert "\n"))))
--8<------------------------schnapp------------------------->8---

So that C-u C-c C-z does the thing you want.

-- 
       I accept RFC3156 and RFC2440-compatible encrypted mail.
PGP key fingerprint: 123A 7CCE 6E26 6233 0D87 E01A A0F8 3524 FCD8 1841


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

* Re: gnus 5.10.1:  message-kill-to-signature doesn't?
       [not found]   ` <m3fznmk3gn.fsf@defun.localdomain>
@ 2003-05-10 20:11     ` Kai Großjohann
  0 siblings, 0 replies; 3+ messages in thread
From: Kai Großjohann @ 2003-05-10 20:11 UTC (permalink / raw)


Jesper Harder <harder@myrealbox.com> writes:

> But putting a name before the signature separator defeats the purpose
> of signature separators, i.e. that people are spared the trouble of
> removing the name manually in replies.

Thanks, that must have been the reason, then.
-- 
This line is not blank.


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

end of thread, other threads:[~2003-05-10 20:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-07  0:16 gnus 5.10.1: message-kill-to-signature doesn't? Benjamin Rutt
     [not found] ` <84fznm7meo.fsf@lucy.is.informatik.uni-duisburg.de>
2003-05-10 18:30   ` Vasily Korytov
     [not found]   ` <m3fznmk3gn.fsf@defun.localdomain>
2003-05-10 20:11     ` Kai Großjohann

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