* message mode, leading colons, and fake cited text
@ 2002-08-13 7:36 Ami Fischman
2002-08-13 8:38 ` Katsumi Yamaoka
0 siblings, 1 reply; 11+ messages in thread
From: Ami Fischman @ 2002-08-13 7:36 UTC (permalink / raw)
Hi there,
Using Oort 0.07 in a color X gnu emacs window, generally happy with it. The
only thing that gets to me is that if I start a line with a colon (for
instance, in the case of a smiley face), then that line is interpreted by
message mode as being a quote, so for instance if I do:
:) hello there blahdeblahblahblah
then the entire line above this one is in red (the color that quoted text
normally shows up as). I thought that the variable
message-cite-prefix-regexp would be the place to look to stop the colon from
acting as a cited-text-prefix, but no dice -- even setting it to the string
"XX" doesn't affect a mail or article buffer. Am I missing something? Is
there another variable to use for this? Do people just put up with red
lines every time they start a line w/ a smiley?
Thanks in advance,
--
Ami Fischman
usenet@fischman.org
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: message mode, leading colons, and fake cited text
2002-08-13 7:36 message mode, leading colons, and fake cited text Ami Fischman
@ 2002-08-13 8:38 ` Katsumi Yamaoka
2002-08-13 18:38 ` Ami Fischman
0 siblings, 1 reply; 11+ messages in thread
From: Katsumi Yamaoka @ 2002-08-13 8:38 UTC (permalink / raw)
>>>>> In <81sn1ji51m.fsf@zion.bpnetworks.com>
>>>>> Ami Fischman <usenet@fischman.org> wrote:
> Hi there,
> Using Oort 0.07 in a color X gnu emacs window, generally happy with it. The
> only thing that gets to me is that if I start a line with a colon (for
> instance, in the case of a smiley face), then that line is interpreted by
> message mode as being a quote, so for instance if I do:
> :) hello there blahdeblahblahblah
> then the entire line above this one is in red (the color that quoted text
> normally shows up as). I thought that the variable
> message-cite-prefix-regexp would be the place to look to stop the colon from
> acting as a cited-text-prefix, but no dice -- even setting it to the string
> "XX" doesn't affect a mail or article buffer. Am I missing something? Is
> there another variable to use for this? Do people just put up with red
> lines every time they start a line w/ a smiley?
Oops, here's a dirty hack for it:
(if (string-match "[^[]:[^]]" message-cite-prefix-regexp)
(progn
(setq message-cite-prefix-regexp
(concat (substring message-cite-prefix-regexp
0 (1+ (match-beginning 0)))
(substring message-cite-prefix-regexp
(1- (match-end 0)))))
(makunbound 'message-font-lock-keywords)
(load "message" nil t)))
The problem is that the value for `message-font-lock-keywords'
won't be changed even if a user customize the value for the user
option `message-cite-prefix-regexp'. Any smart ideas?
--
Katsumi Yamaoka <yamaoka@jpl.org>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: message mode, leading colons, and fake cited text
2002-08-13 8:38 ` Katsumi Yamaoka
@ 2002-08-13 18:38 ` Ami Fischman
2002-08-14 2:15 ` Katsumi Yamaoka
0 siblings, 1 reply; 11+ messages in thread
From: Ami Fischman @ 2002-08-13 18:38 UTC (permalink / raw)
Ah. Thanks. Added
(makunbound 'message-font-lock-keywords)
(load "message" nil t)
after the customization of -prefix, and all is well now. I can live with
the hacky nature of this, since I don't plan on modifying -prefix again
anytime soon :)
Thanks again,
--
Ami Fischman
usenet@fischman.org
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: message mode, leading colons, and fake cited text
2002-08-13 18:38 ` Ami Fischman
@ 2002-08-14 2:15 ` Katsumi Yamaoka
2002-08-14 15:57 ` Ami Fischman
2002-08-15 0:14 ` Benjamin Rutt
0 siblings, 2 replies; 11+ messages in thread
From: Katsumi Yamaoka @ 2002-08-14 2:15 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 271 bytes --]
>>>>> In <81lm7afvtz.fsf@zion.bpnetworks.com>
>>>>> Ami Fischman <usenet@fischman.org> wrote:
> Ah. Thanks. Added
> (makunbound 'message-font-lock-keywords)
> (load "message" nil t)
I've solved it in CVS. Here's a patch for the released version
of Oort Gnus v0.07:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 560 bytes --]
--- message.el~ 2002-07-27 21:04:10 +0000
+++ message.el 2002-08-14 02:12:38 +0000
@@ -1012,7 +1012,11 @@
`((,(concat "^\\(" (regexp-quote mail-header-separator) "\\)$")
1 'message-separator-face))
nil)
- (,(concat "^\\(" message-cite-prefix-regexp "\\).*")
+ (,(lambda (limit)
+ (re-search-forward (concat "^\\("
+ message-cite-prefix-regexp
+ "\\).*")
+ limit t))
(0 'message-cited-text-face))
("<#/?\\(multipart\\|part\\|external\\|mml\\|secure\\)[^>]*>"
(0 'message-mml-face))))
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: message mode, leading colons, and fake cited text
2002-08-14 2:15 ` Katsumi Yamaoka
@ 2002-08-14 15:57 ` Ami Fischman
2002-08-15 0:14 ` Benjamin Rutt
1 sibling, 0 replies; 11+ messages in thread
From: Ami Fischman @ 2002-08-14 15:57 UTC (permalink / raw)
Katsumi Yamaoka <yamaoka@jpl.org> writes:
> I've solved it in CVS. Here's a patch for the released version
> of Oort Gnus v0.07:
Works for me from CVS. Thanks :)
--
Ami Fischman
usenet@fischman.org
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: message mode, leading colons, and fake cited text
2002-08-14 2:15 ` Katsumi Yamaoka
2002-08-14 15:57 ` Ami Fischman
@ 2002-08-15 0:14 ` Benjamin Rutt
2002-08-15 1:03 ` Katsumi Yamaoka
1 sibling, 1 reply; 11+ messages in thread
From: Benjamin Rutt @ 2002-08-15 0:14 UTC (permalink / raw)
Cc: ding
Katsumi Yamaoka <yamaoka@jpl.org> writes:
> I've solved it in CVS. Here's a patch for the released version
> of Oort Gnus v0.07:
:( I wish your update solved it for me. But, this line is still red.
:What's worse, this line's 1st character became a colon. And this
:next line (this one) has the colon too, apparently this happens at
:fill time. (I use auto-fill-mode in message buffers so I can keep
:typing and avoid hitting RET).
--
Benjamin
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: message mode, leading colons, and fake cited text
2002-08-15 0:14 ` Benjamin Rutt
@ 2002-08-15 1:03 ` Katsumi Yamaoka
2002-08-15 1:59 ` Benjamin Rutt
0 siblings, 1 reply; 11+ messages in thread
From: Katsumi Yamaoka @ 2002-08-15 1:03 UTC (permalink / raw)
Hi,
>>>>> In <wc365ydyo4r.fsf@eta.cis.ohio-state.edu>
>>>>> Benjamin Rutt <rutt+news@cis.ohio-state.edu> wrote:
>> I've solved it in CVS. Here's a patch for the released version
>> of Oort Gnus v0.07:
Benjamin> :( I wish your update solved it for me. But, this line is still red.
Benjamin> :What's worse, this line's 1st character became a colon. And this
Benjamin> :next line (this one) has the colon too, apparently this happens at
Benjamin> :fill time. (I use auto-fill-mode in message buffers so I can keep
Benjamin> :typing and avoid hitting RET).
Did you customize the value for `message-cite-prefix-regexp'?
My change makes it possible to reflect that value to the
font-lock-keywords in the message buffer dynamically. Since the
default value for `message-cite-prefix-regexp' contains ":", the
default behavior won't be changed. You need to put something
like the following lines in your .gnus file:
(if (string-match "[^[]:[^]]" message-cite-prefix-regexp)
(setq message-cite-prefix-regexp
(concat (substring message-cite-prefix-regexp
0 (1+ (match-beginning 0)))
(substring message-cite-prefix-regexp
(1- (match-end 0))))))
;; or you may use the following lines for Emacs 21 instead.
(setq message-cite-prefix-regexp
"\\([ \t]*[-_.[:word:]]+>+\\|[ \t]*[]>»|}+]\\)+")
Otherwise, if you feel the color for those lines is too loud,
you can modify it as follows:
(set-face-foreground 'message-cited-text-face "DarkGreen")
Regards,
--
Katsumi Yamaoka <yamaoka@jpl.org>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: message mode, leading colons, and fake cited text
2002-08-15 1:03 ` Katsumi Yamaoka
@ 2002-08-15 1:59 ` Benjamin Rutt
2002-08-15 2:26 ` Jesper Harder
0 siblings, 1 reply; 11+ messages in thread
From: Benjamin Rutt @ 2002-08-15 1:59 UTC (permalink / raw)
Cc: ding
Katsumi Yamaoka <yamaoka@jpl.org> writes:
> Did you customize the value for `message-cite-prefix-regexp'? My
> change makes it possible to reflect that value to the
> font-lock-keywords in the message buffer dynamically. Since the
> default value for `message-cite-prefix-regexp' contains ":", the
> default behavior won't be changed.
[...]
I hadn't customized `message-cite-prefix-regexp' when I wrote my
previous message. But I used your suggested setq expression for emacs
21, and it works correctly now. Thanks for the help.
Should the default be changed to exclude ":"? In other words, do
enough people really use : as a citation prefix to avoid changing the
default?
--
Benjamin
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: message mode, leading colons, and fake cited text
2002-08-15 1:59 ` Benjamin Rutt
@ 2002-08-15 2:26 ` Jesper Harder
2002-08-15 2:35 ` Katsumi Yamaoka
0 siblings, 1 reply; 11+ messages in thread
From: Jesper Harder @ 2002-08-15 2:26 UTC (permalink / raw)
Benjamin Rutt <rutt+news@cis.ohio-state.edu> writes:
> Should the default be changed to exclude ":"?
Yes, IMHO. I also think » should be removed -- I often end up with that
character as the first on a line, and I don't think I've ever seen it
used for citations.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: message mode, leading colons, and fake cited text
2002-08-15 2:26 ` Jesper Harder
@ 2002-08-15 2:35 ` Katsumi Yamaoka
2002-08-15 10:33 ` Katsumi Yamaoka
0 siblings, 1 reply; 11+ messages in thread
From: Katsumi Yamaoka @ 2002-08-15 2:35 UTC (permalink / raw)
))))) In <m3lm783lit.fsf@defun.localdomain>
))))) Jesper Harder <harder@ifa.au.dk> wrote:
)) Should the default be changed to exclude ":"?
) Yes, IMHO. I also think » should be removed -- I often end up with that
) character as the first on a line, and I don't think I've ever seen it
) used for citations.
I completely agree on excluding ":" and "»". :)
--
Katsumi Yamaoka <yamaoka@jpl.org>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: message mode, leading colons, and fake cited text
2002-08-15 2:35 ` Katsumi Yamaoka
@ 2002-08-15 10:33 ` Katsumi Yamaoka
0 siblings, 0 replies; 11+ messages in thread
From: Katsumi Yamaoka @ 2002-08-15 10:33 UTC (permalink / raw)
>>>>> In <yotld6skyhki.fsf@jpl.org>
>>>>> Katsumi Yamaoka <yamaoka@jpl.org> wrote:
> ))))) In <m3lm783lit.fsf@defun.localdomain>
> ))))) Jesper Harder <harder@ifa.au.dk> wrote:
> )) Should the default be changed to exclude ":"?
> ) Yes, IMHO. I also think » should be removed -- I often end up with that
> ) character as the first on a line, and I don't think I've ever seen it
> ) used for citations.
> I completely agree on excluding ":" and "»". :)
I've done.
--
Katsumi Yamaoka <yamaoka@jpl.org>
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2002-08-15 10:33 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-13 7:36 message mode, leading colons, and fake cited text Ami Fischman
2002-08-13 8:38 ` Katsumi Yamaoka
2002-08-13 18:38 ` Ami Fischman
2002-08-14 2:15 ` Katsumi Yamaoka
2002-08-14 15:57 ` Ami Fischman
2002-08-15 0:14 ` Benjamin Rutt
2002-08-15 1:03 ` Katsumi Yamaoka
2002-08-15 1:59 ` Benjamin Rutt
2002-08-15 2:26 ` Jesper Harder
2002-08-15 2:35 ` Katsumi Yamaoka
2002-08-15 10:33 ` Katsumi Yamaoka
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).