Gnus development mailing list
 help / color / mirror / Atom feed
* 5.2.20 nits/fixes (with patches for most)
@ 1996-06-19 15:52 Christopher Davis
  1996-06-19 16:36 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 12+ messages in thread
From: Christopher Davis @ 1996-06-19 15:52 UTC (permalink / raw)


This is the 5.2.20 included with "19.14 XEmacs Lucid (beta26)", though the
only change relative to the "real" 5.2.20 is the removal of the (sit-for
0) that was so annoying me :)

gnus-vis.el:

- gnus-highlight-selected-summary is incorrectly highlighting the summary
  line; it's highlighting only the part that's within the %( and %) [this
  is fine, I can accept that] *except for the first and last characters*.

  This appears to be due to the change (in 5.2.20) to no longer use
  gnus-xmas-highlight-selected-summary on XEmacs 19.14 causing the section
  marked "Fix by Mike Dugan" to be run; that "1+" and "1-" look suspicious
  to me.  Is there some off-by-one incompatibility between Emacs and
  XEmacs here? [Argh.]

  [No patch; I don't understand the way the code works on Emacs, so I
  don't want to break it.]

message.el:

- I missed a spot when suggesting the addition of the signature separator
  to the paragraph fill code in message.el; it needs to be added to both
  paragraph-separate and paragraph-start.  [Oops.]

- message-insert-signature adds a gratuitous blank line at the end of the
  text if the text already ends in a newline.

- [semi-feature] message-insert-signature should accept a value for force
  of 'if-not-present, which would look for a signature separator line in
  the message and only insert a signature if that line is not present.
  This allows manually adding a signature to a message that would normally
  get one appended automatically by a hook.  I also think the interactive
  use of message-insert-signature should try to prevent the user from
  adding multiple signatures.

--- message.el.orig	Wed Jun 19 11:31:50 1996
+++ message.el	Wed Jun 19 11:50:34 1996
@@ -810,6 +810,7 @@
   (make-local-variable 'paragraph-start)
   (setq paragraph-start (concat (regexp-quote mail-header-separator)
 				"$\\|[ \t]*[-_][-_][-_]+$\\|"
+				"-- $\\|"
 				paragraph-start))
   (setq paragraph-separate (concat (regexp-quote mail-header-separator)
 				   "$\\|[ \t]*[-_][-_][-_]+$\\|"
@@ -939,9 +940,14 @@
 
 (defun message-insert-signature (&optional force)
   "Insert a signature.  See documentation for the `message-signature' variable."
-  (interactive (list t))
+  (interactive (list 'if-not-present))
   (let* ((signature 
 	  (cond ((and (null message-signature)
+		      (eq force 'if-not-present))
+		 (save-excursion
+		   (goto-char (point-max))
+		   (not (re-search-backward "^-- $" nil t))))
+		((and (null message-signature)
 		      force)
 		 t)
 		((message-functionp message-signature)
@@ -963,7 +969,8 @@
       (forward-line 1)
       (delete-region (point) (point-max))
       ;; Insert the signature.
-      (insert "\n-- \n")
+      (or (bolp) (insert "\n"))                ;start separator on new line
+      (insert "-- \n")
       (if (eq signature t)
 	  (insert-file-contents message-signature-file)
 	(insert signature))
-- 
Christopher Davis <ckd@kei.com> <URL: http://www.kei.com/homepages/ckd/ >
"I conclude that the CDA is unconstitutional and that the First Amendment
 denies Congress the power to regulate protected speech on the Internet."
                               -- Judge Stewart Dalzell in _ACLU v. Reno_


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

* Re: 5.2.20 nits/fixes (with patches for most)
  1996-06-19 15:52 5.2.20 nits/fixes (with patches for most) Christopher Davis
@ 1996-06-19 16:36 ` Lars Magne Ingebrigtsen
  1996-06-19 20:29   ` Christopher Davis
                     ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Lars Magne Ingebrigtsen @ 1996-06-19 16:36 UTC (permalink / raw)


Christopher Davis <ckd@loiosh.kei.com> writes:

> - gnus-highlight-selected-summary is incorrectly highlighting the summary
>   line; it's highlighting only the part that's within the %( and %) [this
>   is fine, I can accept that] *except for the first and last characters*.

That's intentional, actually.  :-)  It's bootiful!  :-P

> message.el:
> 
> - I missed a spot when suggesting the addition of the signature separator
>   to the paragraph fill code in message.el; it needs to be added to both
>   paragraph-separate and paragraph-start.  [Oops.]

Yup.  Fix in Gnus v5.2.22.

> - message-insert-signature adds a gratuitous blank line at the end of the
>   text if the text already ends in a newline.

An extra newline before the signature separator?  Hm, yes...  It
removes all whitespace at the end of the message before inserting the
signature, and it inserts a blank line before the separator.  This is
slightly fascist.  Should it do this or not?

> - [semi-feature] message-insert-signature should accept a value for force
>   of 'if-not-present, which would look for a signature separator line in
>   the message and only insert a signature if that line is not present.
>   This allows manually adding a signature to a message that would normally
>   get one appended automatically by a hook.  I also think the interactive
>   use of message-insert-signature should try to prevent the user from
>   adding multiple signatures.

Thanks; I've applied your patch to Gnus 5.2.22.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@ifi.uio.no * Lars Ingebrigtsen


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

* Re: 5.2.20 nits/fixes (with patches for most)
  1996-06-19 16:36 ` Lars Magne Ingebrigtsen
@ 1996-06-19 20:29   ` Christopher Davis
  1996-06-20  6:44     ` Lars Magne Ingebrigtsen
  1996-06-19 23:00   ` Edward J. Sabol
  1996-06-21 15:35   ` Christopher Davis
  2 siblings, 1 reply; 12+ messages in thread
From: Christopher Davis @ 1996-06-19 20:29 UTC (permalink / raw)


LMI> == Lars Magne Ingebrigtsen <larsi@ifi.uio.no>

 ckd> - message-insert-signature adds a gratuitous blank line at the end
 ckd>   of the text if the text already ends in a newline.

 LMI> An extra newline before the signature separator?  Hm, yes...  It
 LMI> removes all whitespace at the end of the message before inserting
 LMI> the signature, and it inserts a blank line before the separator.

Actually, it backs up over all the whitespace, moves forward a line (so if
there is a newline at the end of the text, point will be at the beginning
of the next line), and then deletes from there to point-max (preserving
said newline, if any).

So there are three possibilities:

- no newline at end of buffer.  forward-line will silently fail, and
  message-insert-signature will insert \n-- \n and the signature.

- one newline at end of buffer (my usual situation).  forward-line will
  move past that newline, message-insert-signature will delete from there
  (point-max) to point-max (a no-op), then message-insert-signature will
  add another newline, leaving a blank line between the last line of text
  and the .signature file.

- more than one newline (or other whitespace) at end of buffer.  (Trailing
  whitespace on the last line of text not included.)  forward-line will
  move past the first newline, the rest will be deleted, and then the
  scenario goes as for one newline (above).

In order to fix the second and third scenarios without breaking the first,
it suffices to check to make sure that you're not at bol before inserting
a newline before the signature separator (as my patch does).

 LMI> This is slightly fascist.  Should it do this or not?

Maybe it should be part of the syntax checks, but I say yes!  It should
zap the whitespace (by default, anyway).  Since so many people don't set
next-line-add-newlines to nil, lots of posts could otherwise go out with
20 blank lines at the end.
-- 
Christopher Davis <ckd@kei.com> <URL: http://www.kei.com/homepages/ckd/ >
"I conclude that the CDA is unconstitutional and that the First Amendment
 denies Congress the power to regulate protected speech on the Internet."
                               -- Judge Stewart Dalzell in _ACLU v. Reno_


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

* Re: 5.2.20 nits/fixes (with patches for most)
  1996-06-19 16:36 ` Lars Magne Ingebrigtsen
  1996-06-19 20:29   ` Christopher Davis
@ 1996-06-19 23:00   ` Edward J. Sabol
  1996-06-20  4:05     ` Firebeard
  1996-06-21 15:35   ` Christopher Davis
  2 siblings, 1 reply; 12+ messages in thread
From: Edward J. Sabol @ 1996-06-19 23:00 UTC (permalink / raw)


Excerpts from mail: (19-Jun-96) Re: 5.2.20 nits/fixes (with patches for most) by Lars Magne Ingebrigtsen
>> - message-insert-signature adds a gratuitous blank line at the end of the
>> text if the text already ends in a newline.
>
> An extra newline before the signature separator? Hm, yes... It removes
> all whitespace at the end of the message before inserting the
> signature, and it inserts a blank line before the separator. This is
> slightly fascist. Should it do this or not?

I like the blank line between the "^-- $" and the message text. I prefer to
think of the signature separator as "\n-- \n" as opposed to simply "-- \n".
YMMV, however.

Later,
Ed


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

* Re: 5.2.20 nits/fixes (with patches for most)
  1996-06-19 23:00   ` Edward J. Sabol
@ 1996-06-20  4:05     ` Firebeard
  0 siblings, 0 replies; 12+ messages in thread
From: Firebeard @ 1996-06-20  4:05 UTC (permalink / raw)


>>>>> Edward J Sabol writes:

EJS> Excerpts from mail: (19-Jun-96) Re: 5.2.20 nits/fixes (with
EJS> patches for most) by Lars Magne Ingebrigtsen
>>> - message-insert-signature adds a gratuitous blank line at the end
>>> of the text if the text already ends in a newline.
>>  An extra newline before the signature separator? Hm, yes... It
>> removes all whitespace at the end of the message before inserting
>> the signature, and it inserts a blank line before the
>> separator. This is slightly fascist. Should it do this or not?

EJS> I like the blank line between the "^-- $" and the message text. I
EJS> prefer to think of the signature separator as "\n-- \n" as
EJS> opposed to simply "-- \n".  YMMV, however.

	Agreed.  Please make a variable
message-blank-line-before-signature, with a default of nil. (;

-- 
#include <disclaimer.h>                               /* Sten Drescher */
ObCDABait:      For she doted upon their paramours, whose flesh is as the
flesh of asses, and whose issue is like the issue of horses.  [Eze 23:20]
Unsolicited solicitations will be proofread for a US$100/page fee.


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

* Re: 5.2.20 nits/fixes (with patches for most)
  1996-06-19 20:29   ` Christopher Davis
@ 1996-06-20  6:44     ` Lars Magne Ingebrigtsen
  1996-06-20 14:24       ` Hallvard B Furuseth
  0 siblings, 1 reply; 12+ messages in thread
From: Lars Magne Ingebrigtsen @ 1996-06-20  6:44 UTC (permalink / raw)


Christopher Davis <ckd@loiosh.kei.com> writes:

> Actually, it backs up over all the whitespace, moves forward a line (so if
> there is a newline at the end of the text, point will be at the beginning
> of the next line), and then deletes from there to point-max (preserving
> said newline, if any).

Well, not in Gnus 5.2.22.  To be consistent, it removes all trailing
whitespace and inserts two newlines before the signature.  So there's
always a blank line before the signature separator now, no matter what
the message looks like.

I'm not sure whether that's right or not, but at least it's
consistent.  And anyways -- the signature is added before composing
the message by default, so people can remove the extra blank line if
they want to...

-- 
  "Yes.  The journey through the human heart 
     would have to wait until some other time."


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

* Re: 5.2.20 nits/fixes (with patches for most)
  1996-06-20  6:44     ` Lars Magne Ingebrigtsen
@ 1996-06-20 14:24       ` Hallvard B Furuseth
  1996-06-20 14:37         ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 12+ messages in thread
From: Hallvard B Furuseth @ 1996-06-20 14:24 UTC (permalink / raw)
  Cc: ding

> Well, not in Gnus 5.2.22.  To be consistent, it removes all trailing
> whitespace and inserts two newlines before the signature.  So there's
> always a blank line before the signature separator now, no matter what
> the message looks like.
> 
> I'm not sure whether that's right or not,

Silently removing whitespace is *not* all right; the whitespace may be
part of the message.  It might, for example, be a blank diff line.  The
space on the line before '-- ' is signficiant:

--- foo.c.orig	Thu Jun 20 16:20:44 1996
+++ foo.c	Thu Jun 20 16:20:33 1996
@@ -1,5 +1,5 @@
 foo ()
 {
+   hi(there);
-   ho(there);
 }
 
-- 
Hallvard


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

* Re: 5.2.20 nits/fixes (with patches for most)
  1996-06-20 14:24       ` Hallvard B Furuseth
@ 1996-06-20 14:37         ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 12+ messages in thread
From: Lars Magne Ingebrigtsen @ 1996-06-20 14:37 UTC (permalink / raw)


Hallvard B Furuseth <h.b.furuseth@usit.uio.no> writes:

> Silently removing whitespace is *not* all right; the whitespace may be
> part of the message.  It might, for example, be a blank diff line. 

That's true.  The current `message-insert-signature' comes from
rnewpost.el, more or less.  I'll take the stripping code out.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@ifi.uio.no * Lars Ingebrigtsen


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

* Re: 5.2.20 nits/fixes (with patches for most)
  1996-06-19 16:36 ` Lars Magne Ingebrigtsen
  1996-06-19 20:29   ` Christopher Davis
  1996-06-19 23:00   ` Edward J. Sabol
@ 1996-06-21 15:35   ` Christopher Davis
  1996-06-21 15:50     ` Lars Magne Ingebrigtsen
  2 siblings, 1 reply; 12+ messages in thread
From: Christopher Davis @ 1996-06-21 15:35 UTC (permalink / raw)


LMI> == Lars Magne Ingebrigtsen <larsi@ifi.uio.no>

 ckd> - gnus-highlight-selected-summary is incorrectly highlighting the summary
 ckd>   line; it's highlighting only the part that's within the %( and %)
 ckd>   [this is fine, I can accept that] *except for the first and last
 ckd>   characters*.

 LMI> That's intentional, actually.  :-)  It's bootiful!  :-P

Yuchh.

Imagine the Subject of this message, with all but the final paren in bold
blue Courier, with the last character in light gray italic Courier.

Maybe a variable "gnus-highlight-selected-summary-whole-line"?
-- 
Christopher Davis <ckd@kei.com> <URL: http://www.kei.com/homepages/ckd/ >
"I conclude that the CDA is unconstitutional and that the First Amendment
 denies Congress the power to regulate protected speech on the Internet."
                               -- Judge Stewart Dalzell in _ACLU v. Reno_


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

* Re: 5.2.20 nits/fixes (with patches for most)
  1996-06-21 15:35   ` Christopher Davis
@ 1996-06-21 15:50     ` Lars Magne Ingebrigtsen
  1996-06-21 17:24       ` Christopher Davis
  0 siblings, 1 reply; 12+ messages in thread
From: Lars Magne Ingebrigtsen @ 1996-06-21 15:50 UTC (permalink / raw)


Christopher Davis <ckd@loiosh.kei.com> writes:

> Imagine the Subject of this message, with all but the final paren in bold
> blue Courier, with the last character in light gray italic Courier.

R +[  21: Christopher Davis   ] Re: 5.2.20 nits/fixes (with patches for most)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^

This part is underlined.  Or that's what supposed to happen, in any
case.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@ifi.uio.no * Lars Ingebrigtsen


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

* Re: 5.2.20 nits/fixes (with patches for most)
  1996-06-21 15:50     ` Lars Magne Ingebrigtsen
@ 1996-06-21 17:24       ` Christopher Davis
  1996-06-22  9:04         ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 12+ messages in thread
From: Christopher Davis @ 1996-06-21 17:24 UTC (permalink / raw)


LMI> == Lars Magne Ingebrigtsen <larsi@ifi.uio.no>

 ckd> Imagine the Subject of this message, with all but the final paren in
 ckd> bold blue Courier, with the last character in light gray italic
 ckd> Courier.

 LMI> R +[  21: Christopher Davis   ] Re: 5.2.20 nits/fixes (with patches for
 LMI>     ^^^^^^^^^^^^^^^^^^^^^^^^^^

 LMI> This part is underlined.  Or that's what supposed to happen, in any
 LMI> case.

No, that's what happens with the default settings.  Shouldn't the code be
able to make things look good (or at least not bad) with
other-than-default settings?

I use bold blue Courier for the summary-selection face (which is what I
use for selected messages in summary buffers).  I use darkseagreen2 as a
background for mouse-selectable areas.  I want the mouse-selection area to
encompass the bracketed lines+email address and the subject, because the
subject is easier to hit with the mouse.

I use "%U%R%z%I%(%[%3L: %-14,14A%] %s%)\n" as gnus-summary-line-format in
most newsgroups (some I tweak a bit, but in general that's what I use).

If gnus-highlight-selected-summary is going to highlight only part of the
line, the part it highlights should be orthagonal to the part highlighted
for mouse selection.  Maybe %< and %> could delimit it?


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

* Re: 5.2.20 nits/fixes (with patches for most)
  1996-06-21 17:24       ` Christopher Davis
@ 1996-06-22  9:04         ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 12+ messages in thread
From: Lars Magne Ingebrigtsen @ 1996-06-22  9:04 UTC (permalink / raw)


Christopher Davis <ckd@loiosh.kei.com> writes:

> No, that's what happens with the default settings.  Shouldn't the code be
> able to make things look good (or at least not bad) with
> other-than-default settings?

Yup.  I've added this to the Red Gnus todo list.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@ifi.uio.no * Lars Ingebrigtsen


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

end of thread, other threads:[~1996-06-22  9:04 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-06-19 15:52 5.2.20 nits/fixes (with patches for most) Christopher Davis
1996-06-19 16:36 ` Lars Magne Ingebrigtsen
1996-06-19 20:29   ` Christopher Davis
1996-06-20  6:44     ` Lars Magne Ingebrigtsen
1996-06-20 14:24       ` Hallvard B Furuseth
1996-06-20 14:37         ` Lars Magne Ingebrigtsen
1996-06-19 23:00   ` Edward J. Sabol
1996-06-20  4:05     ` Firebeard
1996-06-21 15:35   ` Christopher Davis
1996-06-21 15:50     ` Lars Magne Ingebrigtsen
1996-06-21 17:24       ` Christopher Davis
1996-06-22  9:04         ` 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).