Gnus development mailing list
 help / color / mirror / Atom feed
* Recommendations for paragraph filling within Gnus.
@ 2000-09-13  1:38 Lloyd Zusman
  2000-09-13  1:44 ` Lloyd Zusman
  2000-09-13 10:21 ` Kai Großjohann
  0 siblings, 2 replies; 6+ messages in thread
From: Lloyd Zusman @ 2000-09-13  1:38 UTC (permalink / raw)


I'd like to make use of a unified method for paragraph filling when
I'm using Gnus.  For example, I'd like the `W w' command as issued in
the summary buffer and the `ESC \C-q' command in the message buffer to
use the exact, same algorithm.  I picked these two commands as
examples because I use them a lot.  But in addition, I'd also like all
the other, related filling commands to use this same, unified
algortihm for paragraph filling when I'm using Gnus.

Is there a recommended method for configuring Gnus to use a unified
method for paragraph filling that's consistent within all the various
places where paragraph filling is commonly performed?

By the way, I'm using a fairly recent 5.8.8 CVS version of Gnus.

Thanks in advance.

-- 
 Lloyd Zusman
 ljz@asfast.com



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

* Re: Recommendations for paragraph filling within Gnus.
  2000-09-13  1:38 Recommendations for paragraph filling within Gnus Lloyd Zusman
@ 2000-09-13  1:44 ` Lloyd Zusman
  2000-09-13 10:21 ` Kai Großjohann
  1 sibling, 0 replies; 6+ messages in thread
From: Lloyd Zusman @ 2000-09-13  1:44 UTC (permalink / raw)


OOPS!  See "CORRECTION" below:

Lloyd Zusman <ljz@asfast.com> writes:

> I'd like to make use of a unified method for paragraph filling when
> I'm using Gnus.  For example, I'd like the `W w' command as issued in
> the summary buffer and the `ESC \C-q' command in the message buffer to
*************** CORRECTION:  `ESC q'    
> use the exact, same algorithm.  I picked these two commands as
> examples because I use them a lot.  But in addition, I'd also like all
> the other, related filling commands to use this same, unified
> algortihm for paragraph filling when I'm using Gnus.
> 
> Is there a recommended method for configuring Gnus to use a unified
> method for paragraph filling that's consistent within all the various
> places where paragraph filling is commonly performed?
> 
> By the way, I'm using a fairly recent 5.8.8 CVS version of Gnus.
> 
> Thanks in advance.
> 
> -- 
>  Lloyd Zusman
>  ljz@asfast.com
> 
> 

-- 
 Lloyd Zusman
 ljz@asfast.com



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

* Re: Recommendations for paragraph filling within Gnus.
  2000-09-13  1:38 Recommendations for paragraph filling within Gnus Lloyd Zusman
  2000-09-13  1:44 ` Lloyd Zusman
@ 2000-09-13 10:21 ` Kai Großjohann
  2000-09-14  0:01   ` Lloyd Zusman
  2000-09-14 21:53   ` Dave Love
  1 sibling, 2 replies; 6+ messages in thread
From: Kai Großjohann @ 2000-09-13 10:21 UTC (permalink / raw)
  Cc: ding

On 12 Sep 2000, Lloyd Zusman wrote:

> I'd like to make use of a unified method for paragraph filling when
> I'm using Gnus.

This would be very useful to have.  Alas, I'm not sure how to go about
this.  Lots of things are hardwired in lots of places.  For example,
message-mode has a method for determining the citation prefix for
font-locking, and article-mode has a method for determining the
citation prefix for highlighting, and they are different.  And I'm
sure that there are even more methods when you take filling into
account and suchlike.

I guess the only way to go about this is to go search for two spots
where something like this happens, then try to unify them.  Keep doing
that until you have unified all spots.

kai
-- 
I like BOTH kinds of music.



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

* Re: Recommendations for paragraph filling within Gnus.
  2000-09-13 10:21 ` Kai Großjohann
@ 2000-09-14  0:01   ` Lloyd Zusman
  2000-09-14 21:53   ` Dave Love
  1 sibling, 0 replies; 6+ messages in thread
From: Lloyd Zusman @ 2000-09-14  0:01 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> On 12 Sep 2000, Lloyd Zusman wrote:
> 
> > I'd like to make use of a unified method for paragraph filling when
> > I'm using Gnus.
> 
> This would be very useful to have.  Alas, I'm not sure how to go about
> this.  Lots of things are hardwired in lots of places.  For example,
> message-mode has a method for determining the citation prefix for
> font-locking, and article-mode has a method for determining the
> citation prefix for highlighting, and they are different.  And I'm
> sure that there are even more methods when you take filling into
> account and suchlike.
> 
> I guess the only way to go about this is to go search for two spots
> where something like this happens, then try to unify them.  Keep doing
> that until you have unified all spots.

Yep, that's the obvious way to do it, but I was hoping for something
better.  Oh well ... <sigh> ...


-- 
 Lloyd Zusman
 ljz@asfast.com



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

* Re: Recommendations for paragraph filling within Gnus.
  2000-09-13 10:21 ` Kai Großjohann
  2000-09-14  0:01   ` Lloyd Zusman
@ 2000-09-14 21:53   ` Dave Love
  2000-09-14 22:51     ` Kai Großjohann
  1 sibling, 1 reply; 6+ messages in thread
From: Dave Love @ 2000-09-14 21:53 UTC (permalink / raw)


>>>>> "KG" == Kai Großjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> writes:

 KG> For example, message-mode has a method for determining the
 KG> citation prefix for font-locking, and article-mode has a method
 KG> for determining the citation prefix for highlighting, and they
 KG> are different.

Is it clear whether or why this can't be done straightforwardly with
adaptive filling?



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

* Re: Recommendations for paragraph filling within Gnus.
  2000-09-14 21:53   ` Dave Love
@ 2000-09-14 22:51     ` Kai Großjohann
  0 siblings, 0 replies; 6+ messages in thread
From: Kai Großjohann @ 2000-09-14 22:51 UTC (permalink / raw)
  Cc: ding

On Thu, 14 Sep 2000, Dave Love wrote:

>>>>>> "KG" == Kai Großjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>
>>>>>> writes:
> 
>  KG> For example, message-mode has a method for determining the
>  KG> citation prefix for font-locking, and article-mode has a method
>  KG> for determining the citation prefix for highlighting, and they
>  KG> are different.
> 
> Is it clear whether or why this can't be done straightforwardly with
> adaptive filling?

Hm.  I think the issue at hand is font-locking, which can't be done
with filling.  But of course, the adaptive fill regexp should be the
same as the other regexps.

I found these two snippets from gnus-cite.el and message.el,
respectively:

/----
| (defcustom gnus-cite-prefix-regexp
|   "^[]>»|:}+ ]*[]>»|:}+]\\(.*>»\\)?\\|^.*>"
|   "*Regexp matching the longest possible citation prefix on a line."
|   :group 'gnus-cite
|   :type 'regexp)
\----

/----
| (defvar message-font-lock-keywords
|   (let* ((cite-prefix "A-Za-z")
| 	 (cite-suffix (concat cite-prefix "0-9_.@-"))
| 	 (content "[ \t]*\\(.+\\(\n[ \t].*\\)*\\)"))
|     `(
| [...]
|       (,(concat "^[ \t]*"
| 		"\\([" cite-prefix "]+[" cite-suffix "]*\\)?"
| 		"[:>|}].*")
|        (0 'message-cited-text-face))
|       ("<#/?\\(multipart\\|part\\|external\\|mml\\).*>"
|        (0 'message-mml-face))))
|   "Additional expressions to highlight in Message mode.")
\----

/----[ from the function message-mode ]
|   (setq adaptive-fill-regexp
| 	(concat "[ \t]*[-a-z0-9A-Z]*\\(>[ \t]*\\)+[ \t]*\\|" adaptive-fill-regexp))
\----


A large number of questions arise:

* Why is » included in one but not the other regexp?
* Suppose the citation prefix is `foo>', then gnus-cite allows a lot
  of characters before the `>', but message only allows letters and
  numbers and a few others.  Why is this so?
* The whole structure of the regexps is different.  Wonder why?
* Why is the set of characters `:>|}' not customizable (easily) in
  message.el? 
* Why does message-mode assume that adaptive-fill-regexp will be fine
  for most citations and only adds to it for supercite-style
  citations?

I'm sure that we could come up with more questions.

This seems to be one of the dustier corners of Gnus...

kai
-- 
I like BOTH kinds of music.



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

end of thread, other threads:[~2000-09-14 22:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-09-13  1:38 Recommendations for paragraph filling within Gnus Lloyd Zusman
2000-09-13  1:44 ` Lloyd Zusman
2000-09-13 10:21 ` Kai Großjohann
2000-09-14  0:01   ` Lloyd Zusman
2000-09-14 21:53   ` Dave Love
2000-09-14 22:51     ` 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).