* Preformatting features of Emacs @ 1997-02-28 10:35 Hrvoje Niksic 1997-02-28 11:32 ` Per Abrahamsen ` (2 more replies) 0 siblings, 3 replies; 36+ messages in thread From: Hrvoje Niksic @ 1997-02-28 10:35 UTC (permalink / raw) The vim preformatting features described in the attached Eli's post really do make me drool. Are there any plans to write something like that for message-mode, as `fill-paragraph' is obviously insufficient, even in its advanced versions, like filladapt. I'd like to start hacking on a good preformatting routine written in Lisp (specifically for preformatting news articles), so if someone is also doing work on this, please let me know. -- Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia --------------------------------+-------------------------------- Ask not for whom the <CONTROL-G> tolls. ------- Start of forwarded message ------- From: Eli the Bearded <usenet-tag@qz.little-neck.ny.us> Newsgroups: news.software.readers,alt.fan.e-t-b Subject: Re: Details On: How To Read News With Netscape :-> Date: 25 Feb 1997 17:13:48 GMT Organization: Some absurd concept Message-ID: <5ev6kc$98$1@news.netusa.net> References: <5efe4k$352@prometheus.acsu.buffalo.edu> <01bc201c$98b800a0$89ca57c6@robo> <vxkrai9rfmc.fsf@pocari-sweat.jprc.com> <E65L3u.5qq@serval.net.wsu.edu> Keywords: quotation thread point text people original line Posted and mailed. Michael Warner <warner@wsu.edu> wrote: >I'm using trn 4.0-test50-something, and vi. Before Pnews >asks me if I want to Send, Abort, etc., it tells me when the >article has over-length lines. My practice has been to go >back and re-wrap the lines by hand, fixing the >>>'s as I >go. Should I just be letting it go, trusting to my >software, or yours, or fate, to take care of it? Or should >I write Wayne a note demanding my money back for his free >software? I use vim, a free vi clone (see URL below) with trn. In vim the new "gq" command applied with the new "p" movement will properly refold > indented lines. Before: > > This is some test text to illustrate the vim folding feature. for this > > test I am using vim 4.5, :set tw=55 and the gqp command applied to the > > first line of the paragraph. Let's see how it works. > > Neato! Spiffy reformat, huh? Make sure you are using at least version 4.5 > (4.6 is now in beta), however. After: > > This is some test text to illustrate the vim > > folding feature. for this test I am using vim 4.5, > > :set tw=55 and the gqp command applied to the first > > line of the paragraph. Let's see how it works. > > Neato! Spiffy reformat, huh? Make sure you are using > at least version 4.5 (4.6 is now in beta), however. One and only one action to reformat the whole thing. Elijah ------ <URL:http://www.math.fu-berlin.de/~guckes/vim/> The Vim Pages ------- End of forwarded message ------- ^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: Preformatting features of Emacs 1997-02-28 10:35 Preformatting features of Emacs Hrvoje Niksic @ 1997-02-28 11:32 ` Per Abrahamsen 1997-02-28 14:12 ` Steinar Bang 1997-02-28 16:31 ` Hrvoje Niksic 1997-02-28 15:37 ` David Blacka 1997-02-28 20:37 ` Paul Franklin 2 siblings, 2 replies; 36+ messages in thread From: Per Abrahamsen @ 1997-02-28 11:32 UTC (permalink / raw) Cc: ding, xemacs-beta-discuss One ought to be able to readjust `gnus-article-fill-cited-article' for use in message-mode. This is much more powerful than VIM's wimpy filling. To do it cleanly, the parsing part of `gnus-cite.el' should be made independent of gnus. This would be a good idea anyway. The good news is that this is already on my projects list. The bad news is that it had been there for a long time. ^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: Preformatting features of Emacs 1997-02-28 11:32 ` Per Abrahamsen @ 1997-02-28 14:12 ` Steinar Bang 1997-03-03 9:31 ` Robert Bihlmeyer 1997-02-28 16:31 ` Hrvoje Niksic 1 sibling, 1 reply; 36+ messages in thread From: Steinar Bang @ 1997-02-28 14:12 UTC (permalink / raw) >>>>> Per Abrahamsen <abraham@dina.kvl.dk>: > One ought to be able to readjust `gnus-article-fill-cited-article' for > use in message-mode. This is much more powerful than VIM's wimpy > filling. To do it cleanly, the parsing part of `gnus-cite.el' should > be made independent of gnus. This would be a good idea anyway. > The good news is that this is already on my projects list. > The bad news is that it had been there for a long time. Hm... when you're at it,... will it be possible to handle "other-peoples-quoted-text-broken-by-netscape"? Ie. the results of long quoted lines hitting Netscape's break-at-72-chars-when-sending, something like this: >> afsdf adsdsfdasf asdf asdfadsf asdfasdf adsf adsf addfasf fasdfad >> sfdasdfa dasfadsf fdsfafd afdf fadsfa > asdfadsfadfadsf dfsadsf dsf asdfadfkjf;kljf;kjhf asfajhjh fdshkashjd > dsfhaksdfhakf ^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: Preformatting features of Emacs 1997-02-28 14:12 ` Steinar Bang @ 1997-03-03 9:31 ` Robert Bihlmeyer 0 siblings, 0 replies; 36+ messages in thread From: Robert Bihlmeyer @ 1997-03-03 9:31 UTC (permalink / raw) Cc: ding Hi, >>>>> On 28 Feb 1997 15:12:04 +0100 >>>>> Steinar Bang <sb@metis.no> said: Steinar> Hm... when you're at it,... will it be possible to handle Steinar> "other-peoples-quoted-text-broken-by-netscape"? Ie. the Steinar> results of long quoted lines hitting Netscape's Steinar> break-at-72-chars-when-sending, something like this: >>> afsdf adsdsfdasf asdf asdfadsf asdfasdf adsf adsf addfasf Steinar> fasdfad >>> sfdasdfa dasfadsf fdsfafd afdf Steinar> fadsfa >> asdfadsfadfadsf dfsadsf dsf asdfadfkjf;kljf;kjhf asfajhjh Steinar> fdshkashjd >> dsfhaksdfhakf This is impossible, since "fasdfad" could as well be a comment to the quoted text, rather than part of it. Yea, Gnus could analyze the quoted text grammatically, ... But then it could as well write the reply itself. Not to be expected before Aleph Gnus, though. The best thing, IMHO, would be to pop up the question "Encountered broken quoting-style, report to <bug@netscape.com> ?" if such lines are found and X-Newsreader has the right value (Mozilla something). Robbe ^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: Preformatting features of Emacs 1997-02-28 11:32 ` Per Abrahamsen 1997-02-28 14:12 ` Steinar Bang @ 1997-02-28 16:31 ` Hrvoje Niksic 1 sibling, 0 replies; 36+ messages in thread From: Hrvoje Niksic @ 1997-02-28 16:31 UTC (permalink / raw) Per Abrahamsen <abraham@dina.kvl.dk> writes: > One ought to be able to readjust `gnus-article-fill-cited-article' for > use in message-mode. This is much more powerful than VIM's wimpy > filling. Do you mean `W w' in Summary buffer? I don't it does a better job than VIM in Eli's example. It could probably be improved, though. > The good news is that this is already on my projects list. > The bad news is that it had been there for a long time. Oh please, give it a push upwards! :-) -- Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia --------------------------------+-------------------------------- * Vi is the God of editors. * Emacs is the editor of Gods. ^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: Preformatting features of Emacs 1997-02-28 10:35 Preformatting features of Emacs Hrvoje Niksic 1997-02-28 11:32 ` Per Abrahamsen @ 1997-02-28 15:37 ` David Blacka 1997-03-03 11:51 ` Lars Balker Rasmussen 1997-02-28 20:37 ` Paul Franklin 2 siblings, 1 reply; 36+ messages in thread From: David Blacka @ 1997-02-28 15:37 UTC (permalink / raw) Isn't this vim "preformatting" functionally equivalent to using filladapt and hitting M-q? I do this will supercited lines all the time, and it seems to work similarly. -- David Blacka Software Engineer Directory Services/ davidb@rwhois.net Network Solutions, Inc. RWhois Development ^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: Preformatting features of Emacs 1997-02-28 15:37 ` David Blacka @ 1997-03-03 11:51 ` Lars Balker Rasmussen 0 siblings, 0 replies; 36+ messages in thread From: Lars Balker Rasmussen @ 1997-03-03 11:51 UTC (permalink / raw) David Blacka <davidb@rwhois.net> writes: > Isn't this vim "preformatting" functionally equivalent to using > filladapt and hitting M-q? I do this will supercited lines all the > time, and it seems to work similarly. Well, it should be. > > Quoted quoted example text. Yadda yadda. Blah blah. Ahem. Yadda yadda yadda. > > Blah blah blah. > > Yadda? M-q: > > Quoted quoted example text. Yadda yadda. Blah blah. Ahem. Yadda > yadda yadda. > Blah blah blah. Yadda? Sub optimal :-) -- Lars Balker Rasmussen <URL:http://www.daimi.aau.dk/~gnort/> Watch me not care. ^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: Preformatting features of Emacs 1997-02-28 10:35 Preformatting features of Emacs Hrvoje Niksic 1997-02-28 11:32 ` Per Abrahamsen 1997-02-28 15:37 ` David Blacka @ 1997-02-28 20:37 ` Paul Franklin 1997-02-28 22:17 ` Hrvoje Niksic 1997-02-28 22:22 ` Sudish Joseph 2 siblings, 2 replies; 36+ messages in thread From: Paul Franklin @ 1997-02-28 20:37 UTC (permalink / raw) >>>>> Hrvoje Niksic writes: > The vim preformatting features described in the attached Eli's post > really do make me drool. Are there any plans to write something like > that for message-mode, as `fill-paragraph' is obviously insufficient, > even in its advanced versions, like filladapt. Hmm. I've been really happy with filladapt. It seems to do a better job than either gnus-article-fill-cited-article or message-fill-yanked-message, but it only does one paragraph at a time. The real win is that it's smart enough to notice changes in citation levels and treat them as paragraph boundaries even if there's no line separating them. Will changing gnus-article-fill-cited-article and message-fill-yanked-message to use filladapt if it's present address your concerns? If not, could you be more specific as to why this is insufficient? --Paul ^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: Preformatting features of Emacs 1997-02-28 20:37 ` Paul Franklin @ 1997-02-28 22:17 ` Hrvoje Niksic 1997-02-28 23:26 ` Stainless Steel Rat 1997-03-01 0:29 ` Sudish Joseph 1997-02-28 22:22 ` Sudish Joseph 1 sibling, 2 replies; 36+ messages in thread From: Hrvoje Niksic @ 1997-02-28 22:17 UTC (permalink / raw) Paul Franklin <paul@cs.washington.edu> writes: > Hmm. I've been really happy with filladapt. You mean that filladapt can fill this: > > This is a text containing quite long lines, but with a killer *double* > > quotation. These things tend to murder various fill-algorithms, which > > often includes `W w', as well as filladapt. I wasn't able to fill the above paragraph correctly in Emacs (with or without filladapt). If it's possible, then please tell me how to do it. -- Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia --------------------------------+-------------------------------- The end of the world is coming... SAVE YOUR BUFFERS! ^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: Preformatting features of Emacs 1997-02-28 22:17 ` Hrvoje Niksic @ 1997-02-28 23:26 ` Stainless Steel Rat 1997-02-28 23:58 ` Jason L Tibbitts III 1997-03-01 5:52 ` Preformatting features of Emacs Hrvoje Niksic 1997-03-01 0:29 ` Sudish Joseph 1 sibling, 2 replies; 36+ messages in thread From: Stainless Steel Rat @ 1997-02-28 23:26 UTC (permalink / raw) -----BEGIN PGP SIGNED MESSAGE----- >>>>> "Hrv" == Hrvoje Niksic <hniksic@srce.hr> writes: Hrv> You mean that filladapt can fill this: >> > This is a text containing quite long lines, but with a killer *double* >> > quotation. These things tend to murder various fill-algorithms, which >> > often includes `W w', as well as filladapt. As a matter of fact, yes: >> > This is a text containing quite long lines, but with a >> > killer *double* quotation. These things tend to >> > murder various fill-algorithms, which often includes >> > `W w', as well as filladapt. How was that? You might want to get a current version, like 2.08. -----BEGIN PGP SIGNATURE----- Version: 2.6.3 Charset: cp850 iQCVAwUBMxdpqZ6VRH7BJMxHAQGeVQQAy0tbt3sHnzNO/HJR415BHq7JkQuSSmEI UfZImE8LfCHLjuNxXa7DfkkD4qP9EbiXiI3iutonUd0UGWnG+C7hyftwY4vWuB1v uv06Pmzrx6XD5lrKzf3+SS8RjlX0mBvb7is5ZqsEhbyBSs7RkIcZl4hwlFYDh3vk Ezl9neU8lkc= =+sS8 -----END PGP SIGNATURE----- -- Rat <ratinox@peorth.gweep.net> \ Warning: pregnant women, the elderly, and PGP Key: at a key server near you! \ children under 10 should avoid prolonged \ exposure to Happy Fun Ball. ^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: Preformatting features of Emacs 1997-02-28 23:26 ` Stainless Steel Rat @ 1997-02-28 23:58 ` Jason L Tibbitts III 1997-03-01 0:57 ` Sudish Joseph 1997-03-01 3:02 ` filladapt.el Stainless Steel Rat 1997-03-01 5:52 ` Preformatting features of Emacs Hrvoje Niksic 1 sibling, 2 replies; 36+ messages in thread From: Jason L Tibbitts III @ 1997-02-28 23:58 UTC (permalink / raw) >>>>> "Rat" == Stainless Steel Rat <ratinox@peorth.gweep.net> writes: [Filladapt] Rat> You might want to get a current version, like 2.08. I give up. Where? I've tracked down every match (300+) from the two search engines I tried and came up with 2.06, which is better than the unversioned copy I have from '89 which coincidentally is the same copy that the xemacs.org lisp code directory search comes up with. There doesn't seem to be anything at wonderworks.com (Kyle's site); FTP is denied and the web page just says "nothing yet". Have I done penance? Can we have a location? - J< ^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: Preformatting features of Emacs 1997-02-28 23:58 ` Jason L Tibbitts III @ 1997-03-01 0:57 ` Sudish Joseph 1997-03-01 2:05 ` Alan Shutko 1997-03-01 3:02 ` filladapt.el Stainless Steel Rat 1 sibling, 1 reply; 36+ messages in thread From: Sudish Joseph @ 1997-03-01 0:57 UTC (permalink / raw) Jason L Tibbitts writes: > I give up. Where? I've tracked down every match (300+) from the two I think it was posted on g.e.s a while back. It's distributed with XEmacs 20.0, FWIW. Many of us should be able to mail you a copy. There's a site out there that archives all g.e.s postings, I came across it via an archie search. Can't remember the URL, though. -Sudish ^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: Preformatting features of Emacs 1997-03-01 0:57 ` Sudish Joseph @ 1997-03-01 2:05 ` Alan Shutko 1997-03-01 2:53 ` Paul Franklin 0 siblings, 1 reply; 36+ messages in thread From: Alan Shutko @ 1997-03-01 2:05 UTC (permalink / raw) >>>>> "Sudish" == Sudish Joseph <sj@eng.mindspring.net> writes: Sudish> Jason L Tibbitts writes: >> I give up. Where? I've tracked down every match (300+) from the >> two Sudish> I think it was posted on g.e.s a while back. It's distributed Sudish> with XEmacs 20.0, FWIW. Many of us should be able to mail you Sudish> a copy. There's a site out there that archives all g.e.s Sudish> postings, I came across it via an archie search. Can't Sudish> remember the URL, though. wuarchive.wustl.edu Unfortunately, twhen they moved wuarchive over to an Ultrasparc, they broke the script. While it's now archiving, it missed a fair bit, including filladapt 2.08. -- Alan Shutko <ats@hubert.wustl.edu> - By consent of the corrupted Can't open /usr/fortunes. Lid stuck on cookie jar. ^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: Preformatting features of Emacs 1997-03-01 2:05 ` Alan Shutko @ 1997-03-01 2:53 ` Paul Franklin 1997-03-01 21:45 ` Jason L Tibbitts III 0 siblings, 1 reply; 36+ messages in thread From: Paul Franklin @ 1997-03-01 2:53 UTC (permalink / raw) I have no idea what version I have. But it correctly fills the examples presented in this group. I've placed it at http://www.cs.washington.edu/homes/paul/tmp/filladapt.el "for a limited time only." --Paul ^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: Preformatting features of Emacs 1997-03-01 2:53 ` Paul Franklin @ 1997-03-01 21:45 ` Jason L Tibbitts III 1997-03-01 23:15 ` C. R. Oldham 0 siblings, 1 reply; 36+ messages in thread From: Jason L Tibbitts III @ 1997-03-01 21:45 UTC (permalink / raw) >>>>> "PF" == Paul Franklin <paul@cs.washington.edu> writes: PF> I've placed it at PF> http://www.cs.washington.edu/homes/paul/tmp/filladapt.el "for a limited PF> time only." Thanks; that's 2.08. Odd how it comes with XEmacs, but going to xemacs.org and using their search engine comes up with an ancient version. I guess the Ohio State LCD is mostly dead now. Also thanks to all who offered to mail it to me. It shouldn't have been this difficult to get it. - J< ^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: Preformatting features of Emacs 1997-03-01 21:45 ` Jason L Tibbitts III @ 1997-03-01 23:15 ` C. R. Oldham 1997-03-02 23:24 ` Alan Shutko 0 siblings, 1 reply; 36+ messages in thread From: C. R. Oldham @ 1997-03-01 23:15 UTC (permalink / raw) On 1 Mar 1997, Jason L Tibbitts III wrote: > I guess the Ohio State LCD is mostly dead now. I know this isn't entirely on-topic for this group, but what about the LCD? I know it's not being maintained, but it's such a useful thing it seems a shame to see it die. Is anything going to replace it? Is it a matter of finding a moderator and a host site for the directory? -- | Charles R. (C. R.) Oldham | North Central Association | | cro@nca.asu.edu | Commission on Schools | | cro@asu.edu | Arizona State University, Box 873011, _ | | Voice: 602/965-8700 | Tempe, AZ 85287-3011 X_>| | Fax: 602/965-9423 | #include "disclaimer.h" | ^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: Preformatting features of Emacs 1997-03-01 23:15 ` C. R. Oldham @ 1997-03-02 23:24 ` Alan Shutko 0 siblings, 0 replies; 36+ messages in thread From: Alan Shutko @ 1997-03-02 23:24 UTC (permalink / raw) The following message is a courtesy copy of an article that has been posted as well. >>>>> "C" == C R Oldham <cro@nca.asu.edu> writes: C> On 1 Mar 1997, Jason L Tibbitts III wrote: >> I guess the Ohio State LCD is mostly dead now. C> I know this isn't entirely on-topic for this group, but what about C> the LCD? I know it's not being maintained, but it's such a useful C> thing it seems a shame to see it die. It kind of looks like it's being maintained now: -rw-r--r-- 1 5019 274 47686 Jan 21 15:29 LCD-datafile.gz The auctex list had someone ask for an updated entry... anybody know more about this? Crossposting to some emacs groups. -- Alan Shutko <ats@hubert.wustl.edu> - By consent of the corrupted DM Advice: The rules shouldn't. ^ permalink raw reply [flat|nested] 36+ messages in thread
* filladapt.el 1997-02-28 23:58 ` Jason L Tibbitts III 1997-03-01 0:57 ` Sudish Joseph @ 1997-03-01 3:02 ` Stainless Steel Rat 1997-03-05 15:58 ` Disabling scoring for a group C. R. Oldham 1 sibling, 1 reply; 36+ messages in thread From: Stainless Steel Rat @ 1997-03-01 3:02 UTC (permalink / raw) -----BEGIN PGP SIGNED MESSAGE----- >>>>> "JLT" == Jason L Tibbitts <tibbs@hpc.uh.edu> writes: JLT> There doesn't seem to be anything at wonderworks.com (Kyle's site); JLT> FTP is denied and the web page just says "nothing yet". Weird... then again, I got mine directly from Kyle (the wonders of being on a beta test team :). Code follows. -----BEGIN PGP SIGNATURE----- Version: 2.6.3 Charset: cp850 iQCVAwUBMxecQJ6VRH7BJMxHAQH/1AP/RYUP/5RcY7rN8JHqOGUolxpZksJa/OmN 4ICxGbNlpn9Gr+GKonzPyK4A3TivryXljLpDD4vvGULhVdT5Ez242yZn76UscAfh WMfJlSKmBRhSSD/QVWSd4tlQYIygMzjzHUp3A0qy1+i2Nkejk9wNqJ0HnNc01S4x AFOAbeKcIYg= =uxgT -----END PGP SIGNATURE----- -- Rat <ratinox@peorth.gweep.net> \ If Happy Fun Ball begins to smoke, get PGP Key: at a key server near you! \ away immediately. Seek shelter and cover \ head. ;;; Adaptive fill ;;; Copyright (C) 1989, 1995, 1996 Kyle E. Jones ;;; ;;; This program is free software; you can redistribute it and/or modify ;;; it under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 2, or (at your option) ;;; any later version. ;;; ;;; This program is distributed in the hope that it will be useful, ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; A copy of the GNU General Public License can be obtained from this ;;; program's author (send electronic mail to kyle@uunet.uu.net) or from ;;; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA ;;; 02139, USA. ;;; ;;; Send bug reports to kyle@wonderworks.com ;; LCD Archive Entry: ;; filladapt|Kyle Jones|kyle_jones@wonderworks.com| ;; Minor mode to adaptively set fill-prefix and overload filling functions| ;; 10-June-1996|2.08|~/packages/filladapt.el| ;; These functions enhance the default behavior of Emacs' Auto Fill ;; mode and the commands fill-paragraph, lisp-fill-paragraph and ;; fill-region-as-paragraph. ;; ;; The chief improvement is that the beginning of a line to be ;; filled is examined and, based on information gathered, an ;; appropriate value for fill-prefix is constructed. Also the ;; boundaries of the current paragraph are located. This occurs ;; only if the fill prefix is not already non-nil. ;; ;; The net result of this is that blurbs of text that are offset ;; from left margin by asterisks, dashes, and/or spaces, numbered ;; examples, included text from USENET news articles, etc. are ;; generally filled correctly with no fuss. ;; ;; Since this package replaces existing Emacs functions, it cannot ;; be autoloaded. Save this in a file named filladapt.el in a ;; Lisp directory that Emacs knows about, byte-compile it and put ;; (require 'filladapt) ;; in your .emacs file. ;; ;; Note that in this release Filladapt mode is a minor mode and it is ;; _off_ by default. If you want it to be on by default, use ;; (setq-default filladapt-mode t) ;; ;; M-x filladapt-mode toggles Filladapt mode on/off in the current ;; buffer. ;; ;; Use ;; (add-hook 'text-mode-hook 'turn-on-filladapt-mode) ;; to have Filladapt always enabled in Text mode. ;; ;; Use ;; (add-hook 'c-mode-hook 'turn-off-filladapt-mode) ;; to have Filladapt always disabled in C mode. ;; ;; In many cases, you can extend Filladapt by adding appropriate ;; entries to the following three `defvar's. See `postscript-comment' ;; or `texinfo-comment' as a sample of what needs to be done. ;; ;; filladapt-token-table ;; filladapt-token-match-table ;; filladapt-token-conversion-table (provide 'filladapt) (defvar filladapt-version "2.08" "Version string for filladapt.") (defvar filladapt-mode nil "*Non-nil means that Filladapt minor mode is enabled. Use the filladapt-mode command to toggle the mode on/off.") (make-variable-buffer-local 'filladapt-mode) (defvar filladapt-mode-line-string " Filladapt" "*String to display in the modeline when Filladapt mode is active. Set this to nil if you don't want a modeline indicator for Filladapt.") ;; install on minor-mode-alist (or (assq 'filladapt-mode minor-mode-alist) (setq minor-mode-alist (cons (list 'filladapt-mode 'filladapt-mode-line-string) minor-mode-alist))) (defvar filladapt-token-table '( ;; Included text in news or mail replies (">+" . citation->) ;; Included text generated by SUPERCITE. We can't hope to match all ;; the possible variations, your mileage may vary. ("[A-Za-z0-9][^'`\"< \t\n]*>[ \t]*" . supercite-citation) ;; Lisp comments (";+" . lisp-comment) ;; UNIX shell comments ("#+" . sh-comment) ;; Postscript comments ("%+" . postscript-comment) ;; C++ comments ("///*" . c++-comment) ;; Texinfo comments ("@c[ \t]" . texinfo-comment) ("@comment[ \t]" . texinfo-comment) ;; Bullet types. ;; ;; 1. xxxxx ;; xxxxx ;; ("[0-9]+\\.[ \t]" . bullet) ;; ;; 2.1.3 xxxxx xx x xx x ;; xxx ;; ("[0-9]+\\(\\.[0-9]+\\)+[ \t]" . bullet) ;; ;; a. xxxxxx xx ;; xxx xxx ;; ("[A-Za-z]\\.[ \t]" . bullet) ;; ;; 1) xxxx x xx x xx or (1) xx xx x x xx xx ;; xx xx xxxx xxx xx x x xx x ;; ("(?[0-9]+)[ \t]" . bullet) ;; ;; a) xxxx x xx x xx or (a) xx xx x x xx xx ;; xx xx xxxx xxx xx x x xx x ;; ("(?[A-Za-z])[ \t]" . bullet) ;; ;; 2a. xx x xxx x x xxx ;; xxx xx x xx x ;; ("[0-9]+[A-Za-z]\\.[ \t]" . bullet) ;; ;; 1a) xxxx x xx x xx or (1a) xx xx x x xx xx ;; xx xx xxxx xxx xx x x xx x ;; ("(?[0-9]+[A-Za-z])[ \t]" . bullet) ;; ;; - xx xxx xxxx or * xx xx x xxx xxx ;; xxx xx xx x xxx x xx x x x ;; ("[-~*+]+[ \t]" . bullet) ;; ;; o xx xxx xxxx xx x xx xxx x xxx xx x xxx ;; xxx xx xx ;; ("o[ \t]" . bullet) ;; don't touch ("[ \t]+" . space) ("$" . end-of-line) ) "Table of tokens filladapt knows about. Format is ((REGEXP . SYM) ...) filladapt uses this table to build a tokenized representation of the beginning of the current line. Each REGEXP is matched against the beginning of the line until a match is found. Matching is done case-sensitively. The corresponding SYM is added to the list, point is moved to (match-end 0) and the process is repeated. The process ends when there is no REGEXP in the table that matches what is at point.") (defvar filladapt-not-token-table '( "[Ee].g." "[Ii].e." ;; end-of-line isn't a token if whole line is empty "^$" ) "List of regexps that can never be a token. Before trying the regular expressions in filladapt-token-table, the regexps in this list are tried. If any regexp in this list matches what is at point then the token generator gives up and doesn't try any of the regexps in filladapt-token-table. Regexp matching is done case-sensitively.") (defvar filladapt-token-match-table '( (citation-> citation->) (supercite-citation supercite-citation) (lisp-comment lisp-comment) (sh-comment sh-comment) (postscript-comment postscript-comment) (c++-comment c++-comment) (texinfo-comment texinfo-comment) (bullet) (space bullet space) ) "Table describing what tokens a certain token will match. To decide whether a line belongs in the current paragraph, filladapt creates a token list for the fill prefix of both lines. Tokens and the columns where tokens end are compared. This table specifies what a certain token will match. Table format is (SYM [SYM1 [SYM2 ...]]) The first symbol SYM is the token, subsequent symbols are the tokens that SYM will match.") (defvar filladapt-token-match-many-table '( space ) "List of tokens that can match multiple tokens. If one of these tokens appears in a token list, it will eat all matching tokens in a token list being matched against it until it encounters a token that doesn't match or a token that ends on a greater column number.") (defvar filladapt-token-paragraph-start-table '( bullet ) "List of tokens that indicate the start of a paragraph. If parsing a line generates a token list containing one of these tokens, then the line is considered to be the start of a paragraph.") (defvar filladapt-token-conversion-table '( (citation-> . exact) (supercite-citation . exact) (lisp-comment . exact) (sh-comment . exact) (postscript-comment . exact) (c++-comment . exact) (texinfo-comment . exact) (bullet . spaces) (space . exact) (end-of-line . exact) ) "Table that specifies how to convert a token into a fill prefix. Table format is ((SYM . HOWTO) ...) SYM is the symbol naming the token to be converted. HOWTO specifies how to do the conversion. `exact' means copy the token's string directly into the fill prefix. `spaces' means convert all characters in the token string that are not a TAB or a space into spaces and copy the resulting string into the fill prefix.") (defvar filladapt-function-table (let ((assoc-list (list (cons 'fill-paragraph (symbol-function 'fill-paragraph)) (cons 'fill-region-as-paragraph (symbol-function 'fill-region-as-paragraph)) (cons 'do-auto-fill (symbol-function 'do-auto-fill))))) ;; v18 Emacs doesn't have lisp-fill-paragraph (if (fboundp 'lisp-fill-paragraph) (nconc assoc-list (list (cons 'lisp-fill-paragraph (symbol-function 'lisp-fill-paragraph))))) assoc-list ) "Table containing the old function definitions that filladapt usurps.") (defvar filladapt-fill-paragraph-post-hook nil "Hooks run after filladapt runs fill-paragraph.") (defvar filladapt-inside-filladapt nil "Non-nil if the filladapt version of a fill function executing. Currently this is only checked by the filladapt version of fill-region-as-paragraph to avoid this infinite recursion: fill-region-as-paragraph -> fill-paragraph -> fill-region-as-paragraph ...") (defvar filladapt-debug nil "Non-nil means filladapt debugging is enabled. Use the filladapt-debug command to turn on debugging. With debugging enabled, filladapt will a. display the proposed indentation with the tokens highlighted using filladapt-debug-indentation-face-1 and filladapt-debug-indentation-face-2. b. display the current paragraph using the face specified by filladapt-debug-paragraph-face.") (if filladapt-debug (add-hook 'post-command-hook 'filladapt-display-debug-info-maybe)) (defvar filladapt-debug-indentation-face-1 'highlight "Face used to display the indentation when debugging is enabled.") (defvar filladapt-debug-indentation-face-2 'secondary-selection "Another face used to display the indentation when debugging is enabled.") (defvar filladapt-debug-paragraph-face 'bold "Face used to display the current paragraph when debugging is enabled.") (defvar filladapt-debug-indentation-extents nil) (make-variable-buffer-local 'filladapt-debug-indentation-extents) (defvar filladapt-debug-paragraph-extent nil) (make-variable-buffer-local 'filladapt-debug-paragraph-extent) ;; kludge city, see references in code. (defvar filladapt-old-line-prefix) (defun do-auto-fill () (catch 'done (if (and filladapt-mode (null fill-prefix)) (save-restriction (let ((paragraph-ignore-fill-prefix nil) ;; if the user wanted this stuff, they probably ;; wouldn't be using filladapt-mode. (adaptive-fill-mode nil) (adaptive-fill-regexp nil) ;; need this or Emacs 19 ignores fill-prefix when ;; inside a comment. (comment-multi-line t) (filladapt-inside-filladapt t) fill-prefix retval) (if (filladapt-adapt nil nil) (progn (setq retval (filladapt-funcall 'do-auto-fill)) (throw 'done retval)))))) (filladapt-funcall 'do-auto-fill))) (defun filladapt-fill-paragraph (function arg) (catch 'done (if (and filladapt-mode (null fill-prefix)) (save-restriction (let ((paragraph-ignore-fill-prefix nil) ;; if the user wanted this stuff, they probably ;; wouldn't be using filladapt-mode. (adaptive-fill-mode nil) (adaptive-fill-regexp nil) ;; need this or Emacs 19 ignores fill-prefix when ;; inside a comment. (comment-multi-line t) fill-prefix retval) (if (filladapt-adapt t nil) (progn (setq retval (filladapt-funcall function arg)) (run-hooks 'filladapt-fill-paragraph-post-hook) (throw 'done retval)))))) ;; filladapt-adapt failed, so do fill-paragraph normally. (filladapt-funcall function arg))) (defun fill-paragraph (arg) (interactive "*P") (let ((filladapt-inside-filladapt t)) (filladapt-fill-paragraph 'fill-paragraph arg))) (defun lisp-fill-paragraph (&optional arg) (interactive "*P") (let ((filladapt-inside-filladapt t)) (filladapt-fill-paragraph 'lisp-fill-paragraph arg))) (defun fill-region-as-paragraph (beg end &optional justify nosqueeze squeeze-after) (interactive "*r\nP") (if (and filladapt-mode (not filladapt-inside-filladapt)) (save-restriction (narrow-to-region beg end) (let ((filladapt-inside-filladapt t) line-start last-token) (goto-char beg) (end-of-line) (while (zerop (forward-line)) (if (setq last-token (car (filladapt-tail (filladapt-parse-prefixes)))) (progn (setq line-start (point)) (move-to-column (nth 1 last-token)) (delete-region line-start (point)))) ;; Dance... ;; ;; Do this instead of (delete-char -1) to keep ;; markers on the correct side of the whitespace. (goto-char (1- (point))) (insert " ") (delete-char 1) (end-of-line)) (goto-char beg) (fill-paragraph justify)) ;; In XEmacs 19.12 and Emacs 18.59 fill-region relies on ;; fill-region-as-paragraph to do this. If we don't do ;; it, fill-region will spin in an endless loop. (goto-char (point-max))) (condition-case nil ;; five args for Emacs 19.31 (filladapt-funcall 'fill-region-as-paragraph beg end justify nosqueeze squeeze-after) (wrong-number-of-arguments (condition-case nil ;; four args for Emacs 19.29 (filladapt-funcall 'fill-region-as-paragraph beg end justify nosqueeze) ;; three args for the rest of the world. (wrong-number-of-arguments (filladapt-funcall 'fill-region-as-paragraph beg end justify))))))) (defvar zmacs-region-stays) ; for XEmacs (defun filladapt-mode (&optional arg) "Toggle Filladapt minor mode. With arg, turn Filladapt mode on iff arg is positive. When Filladapt mode is enabled, auto-fill-mode and the fill-paragraph command are both smarter about guessing a proper fill-prefix and finding paragraph boundaries when bulleted and indented lines and paragraphs are used." (interactive "P") ;; don't deactivate the region. (setq zmacs-region-stays t) (setq filladapt-mode (or (and arg (> (prefix-numeric-value arg) 0)) (and (null arg) (null filladapt-mode)))) (if (fboundp 'force-mode-line-update) (force-mode-line-update) (set-buffer-modified-p (buffer-modified-p)))) (defun turn-on-filladapt-mode () "Unconditionally turn on Filladapt mode in the current buffer." (filladapt-mode 1)) (defun turn-off-filladapt-mode () "Unconditionally turn off Filladapt mode in the current buffer." (filladapt-mode -1)) (defun filladapt-funcall (function &rest args) "Call the old definition of a function that filladapt has usurped." (apply (cdr (assoc function filladapt-function-table)) args)) (defun filladapt-paragraph-start (list) "Returns non-nil if LIST contains a paragraph starting token. LIST should be a token list as returned by filladapt-parse-prefixes." (catch 'done (while list (if (memq (car (car list)) filladapt-token-paragraph-start-table) (throw 'done t)) (setq list (cdr list))))) (defun filladapt-parse-prefixes () "Parse all the tokens after point and return a list of them. The tokens regular expressions are specified in filladapt-token-table. The list returned is of this form ((SYM COL STRING) ...) SYM is a token symbol as found in filladapt-token-table. COL is the column at which the token ended. STRING is the token's text." (save-excursion (let ((token-list nil) (done nil) (old-point (point)) (case-fold-search nil) token-table not-token-table) (catch 'done (while (not done) (setq not-token-table filladapt-not-token-table) (while not-token-table (if (looking-at (car not-token-table)) (throw 'done t)) (setq not-token-table (cdr not-token-table))) (setq token-table filladapt-token-table done t) (while token-table (if (null (looking-at (car (car token-table)))) (setq token-table (cdr token-table)) (goto-char (match-end 0)) (setq token-list (cons (list (cdr (car token-table)) (current-column) (buffer-substring (match-beginning 0) (match-end 0))) token-list) token-table nil done (eq (point) old-point) old-point (point)))))) (nreverse token-list)))) (defun filladapt-tokens-match-p (list1 list2) "Compare two token lists and return non-nil if they match, nil otherwise. The lists are walked through in lockstep, comparing tokens. When two tokens A and B are compared, they are considered to match if 1. A appears in B's list of matching tokens or B appears in A's list of matching tokens and 2. A and B both end at the same column or A can match multiple tokens and ends at a column > than B or B can match multiple tokens and ends at a column > than A In the case where the end columns differ the list pointer for the token with the greater end column is not moved forward, which allows its current token to be matched against the next token in the other list in the next iteration of the matching loop. All tokens must be matched in order for the lists to be considered matching." (let ((matched t) (done nil)) (while (and (not done) list1 list2) (let* ((token1 (car (car list1))) (token1-matches-many-p (memq token1 filladapt-token-match-many-table)) (token1-matches (cdr (assq token1 filladapt-token-match-table))) (token1-endcol (nth 1 (car list1))) (token2 (car (car list2))) (token2-matches-many-p (memq token2 filladapt-token-match-many-table)) (token2-matches (cdr (assq token2 filladapt-token-match-table))) (token2-endcol (nth 1 (car list2))) (tokens-match (or (memq token1 token2-matches) (memq token2 token1-matches)))) (cond ((not tokens-match) (setq matched nil done t)) ((and token1-matches-many-p token2-matches-many-p) (cond ((= token1-endcol token2-endcol) (setq list1 (cdr list1) list2 (cdr list2))) ((< token1-endcol token2-endcol) (setq list1 (cdr list1))) (t (setq list2 (cdr list2))))) (token1-matches-many-p (cond ((= token1-endcol token2-endcol) (setq list1 (cdr list1) list2 (cdr list2))) ((< token1-endcol token2-endcol) (setq matched nil done t)) (t (setq list2 (cdr list2))))) (token2-matches-many-p (cond ((= token1-endcol token2-endcol) (setq list1 (cdr list1) list2 (cdr list2))) ((< token2-endcol token1-endcol) (setq matched nil done t)) (t (setq list1 (cdr list1))))) ((= token1-endcol token2-endcol) (setq list1 (cdr list1) list2 (cdr list2))) (t (setq matched nil done t))))) (and matched (null list1) (null list2)) )) (defun filladapt-make-fill-prefix (list) "Build a fill-prefix for a token LIST. filladapt-token-conversion-table specifies how this is done." (let ((prefix-list nil) (conversion-spec nil)) (while list (setq conversion-spec (cdr (assq (car (car list)) filladapt-token-conversion-table))) (cond ((eq conversion-spec 'spaces) (setq prefix-list (cons (filladapt-convert-to-spaces (nth 2 (car list))) prefix-list))) ((eq conversion-spec 'exact) (setq prefix-list (cons (nth 2 (car list)) prefix-list)))) (setq list (cdr list))) (apply (function concat) (nreverse prefix-list)) )) (defun filladapt-convert-to-spaces (string) "Return a copy of STRING, with all non-tabs and non-space changed to spaces." (let ((i 0) (space-list '(?\ ?\t)) (space ?\ ) (lim (length string))) (setq string (copy-sequence string)) (while (< i lim) (if (not (memq (aref string i) space-list)) (aset string i space)) (setq i (1+ i))) string )) (defun filladapt-adapt (paragraph debugging) "Set fill-prefix based on the contents of the current line. If the first arg PARAGRAPH is non-nil, also set a clipping region around the current paragraph. If the second arg DEBUGGING is non-nil, don't do the kludge that's necessary to make certain paragraph fills work properly." (save-excursion (beginning-of-line) (let ((token-list (filladapt-parse-prefixes)) curr-list done) (if (null token-list) nil (setq fill-prefix (filladapt-make-fill-prefix token-list)) (if paragraph (let (beg end) (if (filladapt-paragraph-start token-list) (setq beg (point)) (save-excursion (setq done nil) (while (not done) (cond ((not (= 0 (forward-line -1))) (setq done t beg (point))) ((not (filladapt-tokens-match-p token-list (setq curr-list (filladapt-parse-prefixes)))) (forward-line 1) (setq done t beg (point))) ((filladapt-paragraph-start curr-list) (setq done t beg (point))))))) (save-excursion (setq done nil) (while (not done) (cond ((not (= 0 (progn (end-of-line) (forward-line 1)))) (setq done t end (point))) ((not (filladapt-tokens-match-p token-list (setq curr-list (filladapt-parse-prefixes)))) (setq done t end (point))) ((filladapt-paragraph-start curr-list) (setq done t end (point)))))) (narrow-to-region beg end) ;; Multiple spaces after the bullet at the start of ;; a hanging list paragraph get squashed by ;; fill-paragraph. We kludge around this by ;; replacing the line prefix with the fill-prefix ;; used by the rest of the lines in the paragraph. ;; fill-paragraph will not alter the fill prefix so ;; we win. The post hook restores the old line prefix ;; after fill-paragraph has been called. (if (and paragraph (not debugging)) (let (col) (setq col (nth 1 (car (filladapt-tail token-list)))) (goto-char (point-min)) (move-to-column col) (setq filladapt-old-line-prefix (buffer-substring (point-min) (point))) (delete-region (point-min) (point)) (insert fill-prefix) (add-hook 'filladapt-fill-paragraph-post-hook 'filladapt-cleanup-kludge-at-point-min))))) t )))) (defun filladapt-cleanup-kludge-at-point-min () "Cleanup the paragraph fill kludge. See filladapt-adapt." (save-excursion (goto-char (point-min)) (insert filladapt-old-line-prefix) (delete-char (length fill-prefix)) (remove-hook 'filladapt-fill-paragraph-post-hook 'filladapt-cleanup-kludge-at-point-min))) (defun filladapt-tail (list) "Returns the last cons in LIST." (if (null list) nil (while (consp (cdr list)) (setq list (cdr list))) list )) (defun filladapt-delete-extent (e) (if (fboundp 'delete-extent) (delete-extent e) (delete-overlay e))) (defun filladapt-make-extent (beg end) (if (fboundp 'make-extent) (make-extent beg end) (make-overlay beg end))) (defun filladapt-set-extent-endpoints (e beg end) (if (fboundp 'set-extent-endpoints) (set-extent-endpoints e beg end) (move-overlay e beg end))) (defun filladapt-set-extent-property (e prop val) (if (fboundp 'set-extent-property) (set-extent-property e prop val) (overlay-put e prop val))) (defun filladapt-debug () "Toggle filladapt debugging on/off in the current buffer." ;; (interactive) (make-local-variable 'filladapt-debug) (setq filladapt-debug (not filladapt-debug)) ;; make sure these faces exist at least (make-face 'filladapt-debug-indentation-face-1) (make-face 'filladapt-debug-indentation-face-2) (make-face 'filladapt-debug-paragraph-face) (if (null filladapt-debug) (progn (mapcar (function (lambda (e) (filladapt-set-extent-endpoints e 1 1))) filladapt-debug-indentation-extents) (if filladapt-debug-paragraph-extent (progn (filladapt-delete-extent filladapt-debug-paragraph-extent) (setq filladapt-debug-paragraph-extent nil))))) (add-hook 'post-command-hook 'filladapt-display-debug-info-maybe)) (defun filladapt-display-debug-info-maybe () (cond ((null filladapt-debug) nil) (fill-prefix nil) (t (if (null filladapt-debug-paragraph-extent) (let ((e (filladapt-make-extent 1 1))) (filladapt-set-extent-property e 'detachable nil) (filladapt-set-extent-property e 'evaporate nil) (filladapt-set-extent-property e 'face filladapt-debug-paragraph-face) (setq filladapt-debug-paragraph-extent e))) (save-excursion (save-restriction (let ((ei-list filladapt-debug-indentation-extents) (ep filladapt-debug-paragraph-extent) (face filladapt-debug-indentation-face-1) fill-prefix token-list) (if (null (filladapt-adapt t t)) (progn (filladapt-set-extent-endpoints ep 1 1) (while ei-list (filladapt-set-extent-endpoints (car ei-list) 1 1) (setq ei-list (cdr ei-list)))) (filladapt-set-extent-endpoints ep (point-min) (point-max)) (beginning-of-line) (setq token-list (filladapt-parse-prefixes)) (message "(%s)" (mapconcat (function (lambda (q) (symbol-name (car q)))) token-list " ")) (while token-list (if ei-list (setq e (car ei-list) ei-list (cdr ei-list)) (setq e (filladapt-make-extent 1 1)) (filladapt-set-extent-property e 'detachable nil) (filladapt-set-extent-property e 'evaporate nil) (setq filladapt-debug-indentation-extents (cons e filladapt-debug-indentation-extents))) (filladapt-set-extent-property e 'face face) (filladapt-set-extent-endpoints e (point) (progn (move-to-column (nth 1 (car token-list))) (point))) (if (eq face filladapt-debug-indentation-face-1) (setq face filladapt-debug-indentation-face-2) (setq face filladapt-debug-indentation-face-1)) (setq token-list (cdr token-list))) (while ei-list (filladapt-set-extent-endpoints (car ei-list) 1 1) (setq ei-list (cdr ei-list)))))))))) ^ permalink raw reply [flat|nested] 36+ messages in thread
* Disabling scoring for a group 1997-03-01 3:02 ` filladapt.el Stainless Steel Rat @ 1997-03-05 15:58 ` C. R. Oldham 1997-03-05 17:15 ` Hrvoje Niksic 0 siblings, 1 reply; 36+ messages in thread From: C. R. Oldham @ 1997-03-05 15:58 UTC (permalink / raw) I've created an nndoc group to read a mailing list archive that I processed into individual files with a Perl script. I don't want to score the group, so I went into the group parameters and entered (gnus-use-scoring nil) However, scoring still takes place. What am I missing? Thanks, -- | Charles R. (C. R.) Oldham | NCA Commission on Schools | | cro@nca.asu.edu | Arizona St. Univ., PO Box 873011 | | V:602/965-8700 F:602/965-9423 |________ Tempe, AZ 85287-3011_ | | "I like it!"--Citizen G'Kar, Babylon 5 | #include <disclaimer.h>X_>| ^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: Disabling scoring for a group 1997-03-05 15:58 ` Disabling scoring for a group C. R. Oldham @ 1997-03-05 17:15 ` Hrvoje Niksic 1997-03-05 19:08 ` C. R. Oldham 0 siblings, 1 reply; 36+ messages in thread From: Hrvoje Niksic @ 1997-03-05 17:15 UTC (permalink / raw) "C. R. Oldham" <cro@nca.asu.edu> writes: > I've created an nndoc group to read a mailing list archive that I > processed into individual files with a Perl script. I don't want to score > the group, so I went into the group parameters and entered > > (gnus-use-scoring nil) > > However, scoring still takes place. What am I missing? Is this verbatim, and that the only parameter? Remember that group parameters is a list of lists, so the correct form would be: ((gnus-use-scoring nil)) -- Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia --------------------------------+-------------------------------- Good pings come in small packets. ^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: Disabling scoring for a group 1997-03-05 17:15 ` Hrvoje Niksic @ 1997-03-05 19:08 ` C. R. Oldham 1997-03-06 13:41 ` Per Abrahamsen 0 siblings, 1 reply; 36+ messages in thread From: C. R. Oldham @ 1997-03-05 19:08 UTC (permalink / raw) On 5 Mar 1997, Hrvoje Niksic wrote: > "C. R. Oldham" <cro@nca.asu.edu> writes: > > However, scoring still takes place. What am I missing? > > Is this verbatim, and that the only parameter? Remember that group > parameters is a list of lists, so the correct form would be: > > ((gnus-use-scoring nil)) GAH! Yes, that was it. Thank you very much. -- | Charles R. (C. R.) Oldham | NCA Commission on Schools | | cro@nca.asu.edu | Arizona St. Univ., PO Box 873011 | | V:602/965-8700 F:602/965-9423 |________ Tempe, AZ 85287-3011_ | | "I like it!"--Citizen G'Kar, Babylon 5 | #include <disclaimer.h>X_>| ^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: Disabling scoring for a group 1997-03-05 19:08 ` C. R. Oldham @ 1997-03-06 13:41 ` Per Abrahamsen 1997-03-07 7:48 ` Wes Hardaker 0 siblings, 1 reply; 36+ messages in thread From: Per Abrahamsen @ 1997-03-06 13:41 UTC (permalink / raw) Cc: ding COMMERCIAL BREAK -- COMMERCIAL BREAK -- COMMERCIAL BREAK -- COMMERCIAL BREAK A> Oh no, now I have again wasted an evening trying to set group A> parameters in Gnus! B> I know! I used to have the same problem, but then I found `G c'! B> Did you know that using `G c' in the group buffer to set group B> parameters, will avoid most of these silly syntactical errors? A> No, really? I must try that! <next day> A> Hi B! Thank you! After I started using `G c' my laundry is whiter A> than the whitest... COMMERCIAL BREAK -- COMMERCIAL BREAK -- COMMERCIAL BREAK -- COMMERCIAL BREAK ^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: Disabling scoring for a group 1997-03-06 13:41 ` Per Abrahamsen @ 1997-03-07 7:48 ` Wes Hardaker 1997-03-07 12:41 ` Per Abrahamsen 0 siblings, 1 reply; 36+ messages in thread From: Wes Hardaker @ 1997-03-07 7:48 UTC (permalink / raw) >>>>> In article <rj3eu9yw62.fsf@zuse.dina.kvl.dk>, Per Abrahamsen <abraham@dina.kvl.dk> writes: Per> COMMERCIAL BREAK -- COMMERCIAL BREAK -- COMMERCIAL BREAK -- COMMERCIAL BREAK A> Oh no, now I have again wasted an evening trying to set group A> parameters in Gnus! B> I know! I used to have the same problem, but then I found `G c'! B> Did you know that using `G c' in the group buffer to set group B> parameters, will avoid most of these silly syntactical errors? A> No, really? I must try that! Per> <next day> A> Hi B! Thank you! After I started using `G c' my laundry is whiter A> than the whitest... Per> COMMERCIAL BREAK -- COMMERCIAL BREAK -- COMMERCIAL BREAK -- COMMERCIAL BREAK DEVILS ADVOCATE BREAK -- DEVILS ADVOCATE BREAK -- DEVILS ADVOCATE BREAK But: Unknown entries: [INS] [DEL] Lisp expression: (total-expire) [INS] This entry should have been a specifically turned off total-expire (say, if you have the total-expire variable turned on or the total-expire param in a topic the group is in. This should turn it off). Also, for that matter, how do you edit the topic parameters??? You're customize thing only works on groups. DEVILS ADVOCATE BREAK -- DEVILS ADVOCATE BREAK -- DEVILS ADVOCATE BREAK ;-) Wes ^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: Disabling scoring for a group 1997-03-07 7:48 ` Wes Hardaker @ 1997-03-07 12:41 ` Per Abrahamsen 0 siblings, 0 replies; 36+ messages in thread From: Per Abrahamsen @ 1997-03-07 12:41 UTC (permalink / raw) Cc: ding Wes Hardaker <Wesley.Hardaker@sphys.unil.ch> writes: > [INS] [DEL] Lisp expression: (total-expire) That is not documented in the manual. I implemented all the documented options with their documented legal values, and only those. > Also, for that matter, how do you edit the topic parameters??? Yes, what about them? ^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: Preformatting features of Emacs 1997-02-28 23:26 ` Stainless Steel Rat 1997-02-28 23:58 ` Jason L Tibbitts III @ 1997-03-01 5:52 ` Hrvoje Niksic 1 sibling, 0 replies; 36+ messages in thread From: Hrvoje Niksic @ 1997-03-01 5:52 UTC (permalink / raw) Stainless Steel Rat <ratinox@peorth.gweep.net> writes: > As a matter of fact, yes: [...] Yes, yes, you are all right. Oh, what an idiot I am -- I forgot to `(setq-default filladapt-mode t)'. In fact, filladapt seems to do a better job than `W w' on the `> > >'-prefixed things. > How was that? > You might want to get a current version, like 2.08. I have 2.08 with XEmacs 19.14. -- Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia --------------------------------+-------------------------------- Oh lord won't you buy me a color TV... ^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: Preformatting features of Emacs 1997-02-28 22:17 ` Hrvoje Niksic 1997-02-28 23:26 ` Stainless Steel Rat @ 1997-03-01 0:29 ` Sudish Joseph 1 sibling, 0 replies; 36+ messages in thread From: Sudish Joseph @ 1997-03-01 0:29 UTC (permalink / raw) Hrvoje Niksic writes: > You mean that filladapt can fill this: As others have pointed out, filladapt handles really nasty quoted text, including the example you posted. The only problems I've had are in it's interaction with "W w" and with changelog-mode. Both those arise from paragraph handling problesm. -Sudish ^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: Preformatting features of Emacs 1997-02-28 20:37 ` Paul Franklin 1997-02-28 22:17 ` Hrvoje Niksic @ 1997-02-28 22:22 ` Sudish Joseph 1997-02-28 22:47 ` Per Abrahamsen 1 sibling, 1 reply; 36+ messages in thread From: Sudish Joseph @ 1997-02-28 22:22 UTC (permalink / raw) Paul Franklin writes: > Hmm. I've been really happy with filladapt. It seems to do a better > job than either gnus-article-fill-cited-article or > message-fill-yanked-message, but it only does one paragraph at a > time. The real win is that it's smart enough to notice changes in > citation levels and treat them as paragraph boundaries even if there's > no line separating them. The problem is that it's paragraph-oriented. It craps out when fed a region containing blank lines, by converting the blank line preceding a paragraph into a space(!). Try putting the region across the next 3 lines and filling it. This is paragraph a. This is paragraph b. This is paragraph c. This gets filled as: This is paragraph a. This is paragraph b. This is paragraph c. This makes "W w" an ugly transform for most messages I read. This is because it wasn't a paragraph to begin with, of course. I have a patch that "fixes" this, but Kyle Jones sez we shouldn't be calling it that way in the first place. > Will changing gnus-article-fill-cited-article and > message-fill-yanked-message to use filladapt if it's present address > your concerns? If not, could you be more specific as to why this is > insufficient? IMO, The Right Thing to do is exactly what Per stated. His cite stuff is far, far, far, far (etc, you get the idea) more knowledgeable about mail and news citation boundaries (which is what we need, not paragraphs in the usual sense) than filladapt is. It can mark such regions (I expect it already does this) and stuff like "W w" should be iterating over such regions and feeding each region separately to the fill functions. -Sudish ^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: Preformatting features of Emacs 1997-02-28 22:22 ` Sudish Joseph @ 1997-02-28 22:47 ` Per Abrahamsen 1997-02-28 23:56 ` Sudish Joseph 1997-02-28 23:59 ` Sudish Joseph 0 siblings, 2 replies; 36+ messages in thread From: Per Abrahamsen @ 1997-02-28 22:47 UTC (permalink / raw) Sudish Joseph <sj@eng.mindspring.net> writes: > It can mark such regions (I expect it already does this) and stuff > like "W w" should be iterating over such regions and feeding each > region separately to the fill functions. This is what `W w' does, and it fills the example you gave correctly. The only glitch I can see, it that it doesn't preserve a terminating space in the prefix. ^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: Preformatting features of Emacs 1997-02-28 22:47 ` Per Abrahamsen @ 1997-02-28 23:56 ` Sudish Joseph 1997-03-01 0:21 ` Stephen Peters 1997-02-28 23:59 ` Sudish Joseph 1 sibling, 1 reply; 36+ messages in thread From: Sudish Joseph @ 1997-02-28 23:56 UTC (permalink / raw) Per Abrahamsen writes: > Sudish Joseph <sj@eng.mindspring.net> writes: >> It can mark such regions (I expect it already does this) and stuff >> like "W w" should be iterating over such regions and feeding each >> region separately to the fill functions. > This is what `W w' does, and it fills the example you gave correctly. After you turn off filladapt-mode, yes. Enable filladapt in the article buffer and have another shot at it. My only point was that filladapt breaks badly with "W w". -Sudish ^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: Preformatting features of Emacs 1997-02-28 23:56 ` Sudish Joseph @ 1997-03-01 0:21 ` Stephen Peters 0 siblings, 0 replies; 36+ messages in thread From: Stephen Peters @ 1997-03-01 0:21 UTC (permalink / raw) Cc: ding Sudish Joseph <sj@eng.mindspring.net> writes: > Per Abrahamsen writes: > > Sudish Joseph <sj@eng.mindspring.net> writes: > > >> It can mark such regions (I expect it already does this) and stuff > >> like "W w" should be iterating over such regions and feeding each > >> region separately to the fill functions. > > > This is what `W w' does, and it fills the example you gave correctly. > > After you turn off filladapt-mode, yes. Enable filladapt in the > article buffer and have another shot at it. My only point was that > filladapt breaks badly with "W w". This jibes with my experience. Apparently, I even put the following in my .gnus lo those many moons ago... ;;; filladapt can screw up the word-wrapping for articles. (add-hook 'gnus-article-mode-hook 'turn-off-filladapt-mode) However, filladapt works wonderfully for me when I'm dealing with sending messages and want to fill cited paragraphs. Between the default word wrapping for `W w', and filladapt for message-mode, I haven't had any complaints. -- Stephen L. Peters speters@cygnus.com PGP fingerprint: BFA4 D0CF 8925 08AE 0CA5 CCDD 343D 6AC6 "What, do you think soup is a biped?" -- Crow, MST3K ^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: Preformatting features of Emacs 1997-02-28 22:47 ` Per Abrahamsen 1997-02-28 23:56 ` Sudish Joseph @ 1997-02-28 23:59 ` Sudish Joseph 1997-03-01 1:04 ` Lars Magne Ingebrigtsen 1 sibling, 1 reply; 36+ messages in thread From: Sudish Joseph @ 1997-02-28 23:59 UTC (permalink / raw) Per Abrahamsen writes: > This is what `W w' does, and it fills the example you gave correctly. I just had to show an example of the extent of the bad karma between filladapt and "W w". :-) -Sudish Paul Franklin writes: Hmm. I've been really happy with filladapt. It seems to do a better >job than either gnus-article-fill-cited-article or >message-fill-yanked-message, but it only does one paragraph at a >time. The real win is that it's smart enough to notice changes in >citation levels and treat them as paragraph boundaries even if >there's no line separating them. The problem is that it's paragraph-oriented. It craps out when fed a region containing blank lines, by converting the blank line preceding a paragraph into a space(!). Try putting the region across the next 3 lines and filling it. This is paragraph a. This is paragraph b. This is paragraph c. This gets filled as: This is paragraph a. This is paragraph b. This is paragraph c. This makes "W w" an ugly transform for most messages I read. This is because it wasn't a paragraph to begin with, of course. I have a patch that "fixes" this, but Kyle Jones sez we shouldn't be calling it that way in the first place. > Will changing gnus-article-fill-cited-article and >message-fill-yanked-message to use filladapt if it's present address >your concerns? If not, could you be more specific as to why this is >insufficient? IMO, The Right Thing to do is exactly what Per stated. His cite stuff is far, far, far, far (etc, you get the idea) more knowledgeable about mail and news citation boundaries (which is what we need, not paragraphs in the usual sense) than filladapt is. It can mark such regions (I expect it already does this) and stuff like "W w" should be iterating over such regions and feeding each region separately to the fill functions. -Sudish ^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: Preformatting features of Emacs 1997-02-28 23:59 ` Sudish Joseph @ 1997-03-01 1:04 ` Lars Magne Ingebrigtsen 1997-03-01 1:53 ` Sudish Joseph ` (2 more replies) 0 siblings, 3 replies; 36+ messages in thread From: Lars Magne Ingebrigtsen @ 1997-03-01 1:04 UTC (permalink / raw) Sudish Joseph <sj@eng.mindspring.net> writes: > I just had to show an example of the extent of the bad karma between > filladapt and "W w". :-) `gnus-article-fill-cited-article' does bind `adaptive-fill-mode' to nil before filling anything... -- (domestic pets only, the antidote for overdose, milk.) larsi@ifi.uio.no * Lars Ingebrigtsen ^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: Preformatting features of Emacs 1997-03-01 1:04 ` Lars Magne Ingebrigtsen @ 1997-03-01 1:53 ` Sudish Joseph 1997-03-01 2:13 ` Sudish Joseph 1997-03-01 2:17 ` Steven L Baur 2 siblings, 0 replies; 36+ messages in thread From: Sudish Joseph @ 1997-03-01 1:53 UTC (permalink / raw) Lars Magne Ingebrigtsen writes: > Sudish Joseph <sj@eng.mindspring.net> writes: >> I just had to show an example of the extent of the bad karma between >> filladapt and "W w". :-) > `gnus-article-fill-cited-article' does bind `adaptive-fill-mode' to > nil before filling anything... But, adaptive-fill-mode is a Good Thing. :) Ok, my rambling's starting to confuse me as well, so here's another go at it: I *like* filladapt. I want it to be used to fill news and mail messages. I like "W w" as well. I'd like to be able to use it all the time. The problem is the combination of the two. Filladapt + "W w" = the mess you saw. But, I don't want to turn off filladapt for article filling coz it does a great job of analysing complex prefixes. -Sudish ^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: Preformatting features of Emacs 1997-03-01 1:04 ` Lars Magne Ingebrigtsen 1997-03-01 1:53 ` Sudish Joseph @ 1997-03-01 2:13 ` Sudish Joseph 1997-03-01 2:17 ` Steven L Baur 2 siblings, 0 replies; 36+ messages in thread From: Sudish Joseph @ 1997-03-01 2:13 UTC (permalink / raw) Lars Magne Ingebrigtsen writes: > `gnus-article-fill-cited-article' does bind `adaptive-fill-mode' to > nil before filling anything... Stopped being lazy and took a look at the source. The problem was that a) g-a-f-c-a wasn't skipping blank lines at the start of paras when using it's marks-based feeding of fill-region and b) it also needs to skip "blank" quoted lines, since filladapt correctly sees them as blank lines once it drops the prefix. LongSentencesAreCoolerThanLongWords. Anyways, the patch below fixes this...BUT, this is still not quite the right thing, IMO. Currently, gnus-cite groks the prefix and feeds it to fill-region. This loses for filladapt users coz some weird voodoo causes filladapt to get confused and drop a few leading spaces. The alternative is to let filladapt users simply use that alone and not set fill-prefix at all. This could be auto-grokked by checking adaptive-fill-mode (i think?) or made a variable. I'll play with it later. -Sudish --- gnus-cite.el~ Fri Feb 28 21:04:41 1997 +++ gnus-cite.el Fri Feb 28 21:04:41 1997 @@ -424,7 +424,13 @@ (let ((adaptive-fill-regexp (concat "^" (regexp-quote (cdar marks)) " *")) (fill-prefix (cdar marks))) - (fill-region (point-min) (point-max))) + (fill-region (progn + (skip-chars-forward "\n\t ") + (beginning-of-line) + (while (looking-at (concat "^" fill-prefix " *$")) + (forward-line)) + (point)) + (point-max))) (set-marker (caar marks) nil) (setq marks (cdr marks))) (when marks ^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: Preformatting features of Emacs 1997-03-01 1:04 ` Lars Magne Ingebrigtsen 1997-03-01 1:53 ` Sudish Joseph 1997-03-01 2:13 ` Sudish Joseph @ 1997-03-01 2:17 ` Steven L Baur 1997-03-01 3:06 ` Lars Magne Ingebrigtsen 2 siblings, 1 reply; 36+ messages in thread From: Steven L Baur @ 1997-03-01 2:17 UTC (permalink / raw) Lars Magne Ingebrigtsen writes: > Sudish Joseph <sj@eng.mindspring.net> writes: >> I just had to show an example of the extent of the bad karma between >> filladapt and "W w". :-) > `gnus-article-fill-cited-article' does bind `adaptive-fill-mode' to > nil before filling anything... Perhaps it should bind `filladapt-mode' to nil as well. -- steve@miranova.com baur Unsolicited commercial e-mail will be billed at $250/message. ^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: Preformatting features of Emacs 1997-03-01 2:17 ` Steven L Baur @ 1997-03-01 3:06 ` Lars Magne Ingebrigtsen 0 siblings, 0 replies; 36+ messages in thread From: Lars Magne Ingebrigtsen @ 1997-03-01 3:06 UTC (permalink / raw) Steven L Baur <steve@miranova.com> writes: > Perhaps it should bind `filladapt-mode' to nil as well. Ok; I'll do so in Gnus 5.4.17. -- (domestic pets only, the antidote for overdose, milk.) larsi@ifi.uio.no * Lars Ingebrigtsen ^ permalink raw reply [flat|nested] 36+ messages in thread
end of thread, other threads:[~1997-03-07 12:41 UTC | newest] Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 1997-02-28 10:35 Preformatting features of Emacs Hrvoje Niksic 1997-02-28 11:32 ` Per Abrahamsen 1997-02-28 14:12 ` Steinar Bang 1997-03-03 9:31 ` Robert Bihlmeyer 1997-02-28 16:31 ` Hrvoje Niksic 1997-02-28 15:37 ` David Blacka 1997-03-03 11:51 ` Lars Balker Rasmussen 1997-02-28 20:37 ` Paul Franklin 1997-02-28 22:17 ` Hrvoje Niksic 1997-02-28 23:26 ` Stainless Steel Rat 1997-02-28 23:58 ` Jason L Tibbitts III 1997-03-01 0:57 ` Sudish Joseph 1997-03-01 2:05 ` Alan Shutko 1997-03-01 2:53 ` Paul Franklin 1997-03-01 21:45 ` Jason L Tibbitts III 1997-03-01 23:15 ` C. R. Oldham 1997-03-02 23:24 ` Alan Shutko 1997-03-01 3:02 ` filladapt.el Stainless Steel Rat 1997-03-05 15:58 ` Disabling scoring for a group C. R. Oldham 1997-03-05 17:15 ` Hrvoje Niksic 1997-03-05 19:08 ` C. R. Oldham 1997-03-06 13:41 ` Per Abrahamsen 1997-03-07 7:48 ` Wes Hardaker 1997-03-07 12:41 ` Per Abrahamsen 1997-03-01 5:52 ` Preformatting features of Emacs Hrvoje Niksic 1997-03-01 0:29 ` Sudish Joseph 1997-02-28 22:22 ` Sudish Joseph 1997-02-28 22:47 ` Per Abrahamsen 1997-02-28 23:56 ` Sudish Joseph 1997-03-01 0:21 ` Stephen Peters 1997-02-28 23:59 ` Sudish Joseph 1997-03-01 1:04 ` Lars Magne Ingebrigtsen 1997-03-01 1:53 ` Sudish Joseph 1997-03-01 2:13 ` Sudish Joseph 1997-03-01 2:17 ` Steven L Baur 1997-03-01 3:06 ` 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).