Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* fill long lines in article
@ 2009-05-14 14:16 William Xu
  2009-05-14 23:44 ` Rob Weir
  0 siblings, 1 reply; 5+ messages in thread
From: William Xu @ 2009-05-14 14:16 UTC (permalink / raw)
  To: info-gnus-english

Hi, 

Suppose there is one long line in the article buffer: 

    >> In 2007, Wired ran another article about GTD and Allen,[15] quoting him as saying "the workings of an automatictransmission are more complicated than a manual transmission,

Now, try `W Q' (or M-x gnus-article-fill-long-lines), it will filled as: 

    >> In 2007, Wired ran another article about GTD and
Allen,[15] quoting him as saying "the workings of an
automatictransmission are more complicated than a manual
transmission,

This doesn't look beautiful, right? Especially when there are other
following replies.  It would be better to format it like this: 

    >> In 2007, Wired ran another article about GTD and
    >> Allen,[15] quoting him as saying "the workings of an
    >> automatictransmission are more complicated than a manual
    >> transmission,

What do you think? 


Patch: 

*** /var/folders/5L/5Lqwwr4OEeyej3oIBAFBiU+++TI/-Tmp-/ediff253FJo	2009-05-14 22:14:26.000000000 +0800
--- /Users/william/repo/git/emacs/lisp/gnus/gnus-art.el	2009-05-14 22:11:37.000000000 +0800
***************
*** 2288,2293 ****
--- 2288,2296 ----
  	      (narrow-to-region (min (1+ (point)) (point-max))
  				(point-at-bol))
                (let ((goback (point-marker)))
+                 (back-to-indentation)
+                 (skip-chars-forward "> ")
+                 (set-fill-prefix)
                  (fill-paragraph nil)
                  (goto-char (marker-position goback)))
  	      (widen))

-- 
William

http://xwl.appspot.com

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

* Re: fill long lines in article
  2009-05-14 14:16 fill long lines in article William Xu
@ 2009-05-14 23:44 ` Rob Weir
  2009-05-15  0:21   ` Rob Weir
  0 siblings, 1 reply; 5+ messages in thread
From: Rob Weir @ 2009-05-14 23:44 UTC (permalink / raw)
  To: info-gnus-english

On 15 May 2009, William Xu wrote:
>>> In 2007, Wired ran another article about GTD and Allen,[15]
>>> quoting him as saying "the workings of an automatictransmission
>>> are more complicated than a manual transmission,
>
> Now, try `W Q' (or M-x gnus-article-fill-long-lines), it will filled
> as:

What version of gnus are you using?  It works for me (actual wrapping
above) with a CVS snapshot from 20090423.

-- 
-rob

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

* Re: fill long lines in article
  2009-05-14 23:44 ` Rob Weir
@ 2009-05-15  0:21   ` Rob Weir
  2009-05-15  7:26     ` Reiner Steib
  0 siblings, 1 reply; 5+ messages in thread
From: Rob Weir @ 2009-05-15  0:21 UTC (permalink / raw)
  To: info-gnus-english

On 15 May 2009, Rob Weir wrote:
> On 15 May 2009, William Xu wrote:
>>>> In 2007, Wired ran another article about GTD and Allen,[15]
>>>> quoting him as saying "the workings of an automatictransmission
>>>> are more complicated than a manual transmission,
>>
>> Now, try `W Q' (or M-x gnus-article-fill-long-lines), it will filled
>> as:
>
> What version of gnus are you using?  It works for me (actual wrapping
> above) with a CVS snapshot from 20090423.

Ah, apologies - I'm using trivial-cite.

-- 
-rob

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

* Re: fill long lines in article
  2009-05-15  0:21   ` Rob Weir
@ 2009-05-15  7:26     ` Reiner Steib
  0 siblings, 0 replies; 5+ messages in thread
From: Reiner Steib @ 2009-05-15  7:26 UTC (permalink / raw)
  To: info-gnus-english

On Fri, May 15 2009, Rob Weir wrote:

> On 15 May 2009, Rob Weir wrote:
>> On 15 May 2009, William Xu wrote:
>>>>> In 2007, Wired ran another article about GTD and Allen,[15]
>>>>> quoting him as saying "the workings of an automatictransmission
>>>>> are more complicated than a manual transmission,
>>>
>>> Now, try `W Q' (or M-x gnus-article-fill-long-lines), it will filled
>>> as:
>>
>> What version of gnus are you using?  It works for me (actual wrapping
>> above) with a CVS snapshot from 20090423.
>
> Ah, apologies - I'm using trivial-cite.

I guess you mean filling in a message mode buffer.  William's patch is
about the display in the article buffer.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

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

* Re: fill long lines in article
       [not found] <mailman.7158.1242310834.31690.info-gnus-english@gnu.org>
@ 2009-05-14 23:13 ` yamaoka
  0 siblings, 0 replies; 5+ messages in thread
From: yamaoka @ 2009-05-14 23:13 UTC (permalink / raw)
  To: info-gnus-english

>>>>> William Xu wrote:
> Hi,

> Suppose there is one long line in the article buffer:

>>> In 2007, Wired ran another article about GTD and Allen,[15] quoting him as saying "the workings of an automatictransmission are more complicated than a manual transmission,

> Now, try `W Q' (or M-x gnus-article-fill-long-lines), it will filled as:

>>> In 2007, Wired ran another article about GTD and
> Allen,[15] quoting him as saying "the workings of an
> automatictransmission are more complicated than a manual
> transmission,

> This doesn't look beautiful, right? Especially when there are other
> following replies.  It would be better to format it like this:

>>> In 2007, Wired ran another article about GTD and
>>> Allen,[15] quoting him as saying "the workings of an
>>> automatictransmission are more complicated than a manual
>>> transmission,

> What do you think?

> Patch:

[...]

That's very good!  But it should be done after the Emacs 23.1
release, I think.

BTW, I tried another one:

(defadvice article-fill-long-lines (around fill-cited-lines activate)
  "Use `fill-cited-region' instead of `fill-paragraph'."
  (let ((fp (symbol-function 'fill-paragraph)))
    (fset 'fill-paragraph
	  (lambda (&rest args)
	    (fill-cited-region (point-min) (point-max))))
    (unwind-protect
	ad-do-it
      (fset 'fill-paragraph fp))))

Where `fill-cited-region' is the function that the MU-CITE package
provides.  It will fill long lines cited with a name as follows

    Name> In 2007, Wired ran another article about GTD and Allen,[15]
quoting him as saying "the workings of an automatictransmission are
more complicated than a manual transmission,

into:

    Name> In 2007, Wired ran another article about GTD and Allen,[15]
    Name> quoting him as saying "the workings of an
    Name> automatictransmission are more complicated than a manual
    Name> transmission,

Though MU-CITE[1] requires APEL[2] and FLIM[3].  Those are too
wasteful only for the use of that function. :<

[1] ftp://ftp.jpl.org/pub/elisp/mu/snapshots/mu-cite-200905142258.tar.gz
[2] ftp://ftp.jpl.org/pub/elisp/apel/snapshots/apel-200809061531.tar.gz
[3] ftp://ftp.jpl.org/pub/m17n/flim-1_14-200811252332.tar.gz

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

end of thread, other threads:[~2009-05-15  7:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-14 14:16 fill long lines in article William Xu
2009-05-14 23:44 ` Rob Weir
2009-05-15  0:21   ` Rob Weir
2009-05-15  7:26     ` Reiner Steib
     [not found] <mailman.7158.1242310834.31690.info-gnus-english@gnu.org>
2009-05-14 23:13 ` 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).