Gnus development mailing list
 help / color / mirror / Atom feed
* [Patch] Signature for format=flowed
@ 2014-10-13 16:29 Jorge A. Alfaro-Murillo
  2014-10-14 19:43 ` Ted Zlatanov
  0 siblings, 1 reply; 8+ messages in thread
From: Jorge A. Alfaro-Murillo @ 2014-10-13 16:29 UTC (permalink / raw)
  To: ding

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

Hi, 

This makes signatures respect hard-new-lines for people that like 
format=flowed.

Best,
-- 
Jorge.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Make-signature-respect-format-flowed.patch --]
[-- Type: text/x-diff, Size: 1178 bytes --]

From fd5076b8113cd683e3991537c59eed06c25a6941 Mon Sep 17 00:00:00 2001
From: "Jorge A. Alfaro Murillo" <jorge.alfaro-murillo@yale.edu>
Date: Mon, 13 Oct 2014 12:21:12 -0400
Subject: [PATCH] Make signature respect format=flowed

* lisp/gnus/message.el (message-insert-signature): Change (insert
"\n") for (newline)
---
 lisp/gnus/message.el | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index ca0280c..9f5da80 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -3531,15 +3531,16 @@ Message buffers and is not meant to be called directly."
       (goto-char (point-max))
       ;; Insert the signature.
       (unless (bolp)
-	(insert "\n"))
+	(newline))
       (when message-signature-insert-empty-line
-	(insert "\n"))
-      (insert "-- \n")
+	(newline))
+      (insert "-- ")
+      (newline)
       (if (eq signature t)
 	  (insert-file-contents signature-file)
 	(insert signature))
       (goto-char (point-max))
-      (or (bolp) (insert "\n")))))
+      (or (bolp) (newline)))))
 
 (defun message-insert-importance-high ()
   "Insert header to mark message as important."
-- 
2.1.0


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

* Re: [Patch] Signature for format=flowed
  2014-10-13 16:29 [Patch] Signature for format=flowed Jorge A. Alfaro-Murillo
@ 2014-10-14 19:43 ` Ted Zlatanov
  2014-10-14 19:52   ` Jorge A. Alfaro-Murillo
  0 siblings, 1 reply; 8+ messages in thread
From: Ted Zlatanov @ 2014-10-14 19:43 UTC (permalink / raw)
  To: ding

On Mon, 13 Oct 2014 12:29:08 -0400 jorge.alfaro-murillo@yale.edu (Jorge A. Alfaro-Murillo) wrote: 

JAA> This makes signatures respect hard-new-lines for people that like
JAA> format=flowed.

That seems reasonable; does `newline' work in all the supported Emacsen?

Ted




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

* Re: [Patch] Signature for format=flowed
  2014-10-14 19:43 ` Ted Zlatanov
@ 2014-10-14 19:52   ` Jorge A. Alfaro-Murillo
  2014-10-14 20:02     ` Ted Zlatanov
  0 siblings, 1 reply; 8+ messages in thread
From: Jorge A. Alfaro-Murillo @ 2014-10-14 19:52 UTC (permalink / raw)
  To: ding

Ted Zlatanov writes:

> That seems reasonable; does `newline' work in all the supported 
> Emacsen? 

It is used already in message.el in 
`message-newline-and-reformat', `message-add-archive-header', 
`message-insert-formatted-citation-line', 
`message-insert-citation-line' and a couple more places, so I 
suppose yes and, more importantly, it will not break anything that 
is already broken =)

Best,
-- 
Jorge.




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

* Re: [Patch] Signature for format=flowed
  2014-10-14 19:52   ` Jorge A. Alfaro-Murillo
@ 2014-10-14 20:02     ` Ted Zlatanov
  2014-10-14 20:48       ` Jorge A. Alfaro-Murillo
  0 siblings, 1 reply; 8+ messages in thread
From: Ted Zlatanov @ 2014-10-14 20:02 UTC (permalink / raw)
  To: ding

On Tue, 14 Oct 2014 15:52:49 -0400 jorge.alfaro-murillo@yale.edu (Jorge A. Alfaro-Murillo) wrote: 

JAA> Ted Zlatanov writes:
>> That seems reasonable; does `newline' work in all the supported
>> Emacsen? 

JAA> It is used already in message.el in `message-newline-and-reformat',
JAA> `message-add-archive-header',
JAA> `message-insert-formatted-citation-line',
JAA> `message-insert-citation-line' and a couple more places, so I suppose
JAA> yes and, more importantly, it will not break anything that is already
JAA> broken =)

All right, could you resubmit the patch with a proper ChangeLog entry?
It looks OK otherwise.

Ted




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

* Re: [Patch] Signature for format=flowed
  2014-10-14 20:02     ` Ted Zlatanov
@ 2014-10-14 20:48       ` Jorge A. Alfaro-Murillo
  2014-10-15 14:31         ` Ted Zlatanov
  0 siblings, 1 reply; 8+ messages in thread
From: Jorge A. Alfaro-Murillo @ 2014-10-14 20:48 UTC (permalink / raw)
  To: ding

Ted Zlatanov writes:

> All right, could you resubmit the patch with a proper ChangeLog 
> entry?  It looks OK otherwise. 

Sorry Ted, this is the first time that I send a patch to gnus. 
What do I have to do exactly? Is the description that I added to 
the patch not enough? I mean:

* lisp/gnus/message.el (message-insert-signature): Change (insert 
"\n") for (newline)  

Best,
-- 
Jorge.




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

* Re: [Patch] Signature for format=flowed
  2014-10-14 20:48       ` Jorge A. Alfaro-Murillo
@ 2014-10-15 14:31         ` Ted Zlatanov
  2014-10-16  1:42           ` Jorge A. Alfaro-Murillo
  0 siblings, 1 reply; 8+ messages in thread
From: Ted Zlatanov @ 2014-10-15 14:31 UTC (permalink / raw)
  To: ding

On Tue, 14 Oct 2014 16:48:26 -0400 jorge.alfaro-murillo@yale.edu (Jorge A. Alfaro-Murillo) wrote: 

JAA> Ted Zlatanov writes:
>> All right, could you resubmit the patch with a proper ChangeLog
>> entry?  It looks OK otherwise. 

JAA> Sorry Ted, this is the first time that I send a patch to gnus. What do
JAA> I have to do exactly? Is the description that I added to the patch not
JAA> enough? I mean:

JAA> * lisp/gnus/message.el (message-insert-signature): Change (insert
JAA> "\n") for (newline)  

Look at the existing ChangeLog and add your entry there, then send the
full diff.

I'd also reword, for clarity:

Use `newline' instead of inserting explicit "\n".

...but I don't feel strongly about it, so it's your call :)

Ted




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

* Re: [Patch] Signature for format=flowed
  2014-10-15 14:31         ` Ted Zlatanov
@ 2014-10-16  1:42           ` Jorge A. Alfaro-Murillo
  2014-10-16 12:46             ` Ted Zlatanov
  0 siblings, 1 reply; 8+ messages in thread
From: Jorge A. Alfaro-Murillo @ 2014-10-16  1:42 UTC (permalink / raw)
  To: ding

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

Ted Zlatanov writes:

> Look at the existing ChangeLog and add your entry there, then 
> send the full diff. 

Ok, let me know if this is okay.

Best,
-- 
Jorge.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Make-signature-respect-format-flowed.patch --]
[-- Type: text/x-diff, Size: 1632 bytes --]

From 563353b183fb05165ae6aeda27466683b927da16 Mon Sep 17 00:00:00 2001
From: "Jorge A. Alfaro Murillo" <jorge.alfaro-murillo@yale.edu>
Date: Wed, 15 Oct 2014 21:33:29 -0400
Subject: [PATCH] Make signature respect format=flowed

* lisp/message.el (message-insert-signature): Use `newline' instead of
inserting explicit "\n".
---
 lisp/ChangeLog  | 5 +++++
 lisp/message.el | 9 +++++----
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 214a8bf..d5fe1e5 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2014-10-15  Jorge A. Alfaro-Murillo  <jorge.alfaro-murillo@yale.edu> (tiny change)
+
+	* message.el (message-insert-signature): Use `newline' instead of
+	inserting explicit "\n".
+
 2014-10-14  Teodor Zlatanov  <tzz@lifelogs.com>
 
 	* gnus-start.el (gnus-save-newsrc-file-check-timestamp): New option to
diff --git a/lisp/message.el b/lisp/message.el
index 847652f..5ba42b1 100644
--- a/lisp/message.el
+++ b/lisp/message.el
@@ -3575,15 +3575,16 @@ Message buffers and is not meant to be called directly."
       (goto-char (point-max))
       ;; Insert the signature.
       (unless (bolp)
-	(insert "\n"))
+	(newline))
       (when message-signature-insert-empty-line
-	(insert "\n"))
-      (insert "-- \n")
+	(newline))
+      (insert "-- ")
+      (newline)
       (if (eq signature t)
 	  (insert-file-contents signature-file)
 	(insert signature))
       (goto-char (point-max))
-      (or (bolp) (insert "\n")))))
+      (or (bolp) (newline)))))
 
 (defun message-insert-importance-high ()
   "Insert header to mark message as important."
-- 
2.1.0


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

* Re: [Patch] Signature for format=flowed
  2014-10-16  1:42           ` Jorge A. Alfaro-Murillo
@ 2014-10-16 12:46             ` Ted Zlatanov
  0 siblings, 0 replies; 8+ messages in thread
From: Ted Zlatanov @ 2014-10-16 12:46 UTC (permalink / raw)
  To: ding

On Wed, 15 Oct 2014 21:42:20 -0400 jorge.alfaro-murillo@yale.edu (Jorge A. Alfaro-Murillo) wrote: 

JAA> Ted Zlatanov writes:
>> Look at the existing ChangeLog and add your entry there, then send
>> the full diff. 

JAA> Ok, let me know if this is okay.

It was great; applied.  Thank you for the patch.

Ted




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

end of thread, other threads:[~2014-10-16 12:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-13 16:29 [Patch] Signature for format=flowed Jorge A. Alfaro-Murillo
2014-10-14 19:43 ` Ted Zlatanov
2014-10-14 19:52   ` Jorge A. Alfaro-Murillo
2014-10-14 20:02     ` Ted Zlatanov
2014-10-14 20:48       ` Jorge A. Alfaro-Murillo
2014-10-15 14:31         ` Ted Zlatanov
2014-10-16  1:42           ` Jorge A. Alfaro-Murillo
2014-10-16 12:46             ` 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).