From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/25707 Path: main.gmane.org!not-for-mail From: Francisco Solsona Newsgroups: gmane.emacs.gnus.general Subject: Re: message-newline-and-reformat and supercite Date: 06 Oct 1999 19:22:20 -0500 Organization: División de Estudios Profesionales, FC, UNAM. Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1035163044 15435 80.91.224.250 (21 Oct 2002 01:17:24 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 01:17:24 +0000 (UTC) Cc: ding@gnus.org Return-Path: Original-Received: from spinoza.math.uh.edu (spinoza.math.uh.edu [129.7.128.18]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id UAA26392 for ; Wed, 6 Oct 1999 20:20:54 -0400 (EDT) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by spinoza.math.uh.edu (8.9.1/8.9.1) with ESMTP id TAB28429; Wed, 6 Oct 1999 19:19:50 -0500 (CDT) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Wed, 06 Oct 1999 19:20:51 -0500 (CDT) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id TAA26390 for ; Wed, 6 Oct 1999 19:20:40 -0500 (CDT) Original-Received: from abulafia.fciencias.unam.mx (root@abulafia.fciencias.unam.mx [132.248.28.60]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id UAA26383 for ; Wed, 6 Oct 1999 20:18:41 -0400 (EDT) Original-Received: from hp.fciencias.unam.mx (solsona@slip4.fciencias.unam.mx [132.248.28.161]) by abulafia.fciencias.unam.mx (8.8.7/8.8.7) with SMTP id TAA30224; Wed, 6 Oct 1999 19:24:48 -0500 Mail-Copies-To: never Original-To: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) In-Reply-To: Kai.Grossjohann@CS.Uni-Dortmund.DE's message of "06 Oct 1999 10:29:29 +0200" X-Home-Page: http://abulafia.fciencias.unam.mx/~solsona X-Face: "e<&PCSuDeI>Wnz0s(fk:UP((Y'&0**fKwX:LL\,e"-5AS4+1|fdTE!(r,"&eLI}x(aQy-j M(jT(KvDbG@:bC<#KFDy}}*'Y8V7@DGOy39Ze@8P@tN)a%m/+'#Z?[+V&XUibbO Vladimir Volovich writes: > > > (if (looking-at (sc-cite-regexp)) > > One potential problem with this is that it depends on Supercite. > Supercite already offers C-c C-p o which I used to use a lot when I > used Supercite. I don't use supercite either, though I found M-RET useful, so what about this modified version (based on Vladimir's): ,-------------------- | (defun message-newline-and-reformat (&optional no-fill) | "Insert four newlines, and then reformat if inside quoted text. If | called with a prefix argument it avoids filling the paragraph." | (interactive "P") | (let ((point (point)) | (gnus-prefix "[]>»|:}+ \t]*") ;; gnus-cite-prefix-regexp is more than we need. | (gnus-supercite-thing "[-._a-zA-Z0-9]*[>]+[ \t]*") | quoted) | (save-excursion | (beginning-of-line) | (if (looking-at (concat gnus-prefix | gnus-supercite-thing)) ;; (sc-cite-regexp) | (setq quoted (buffer-substring (match-beginning 0) (match-end 0))))) | (insert "\n\n\n\n") | (when (null no-fill) ;; No filling. | (delete-region (point) (re-search-forward "[ \t]*"))) | (when quoted | (insert quoted)) | (when (null no-fill) ;; I said: No filling!.. Thank you. | (setq fill-prefix quoted) ;; For me fill-paragraph sucks without this. :-( | (fill-paragraph nil)) | (goto-char point) | (forward-line 2))) `-------------------- which avoids using sc-cite-regexp (but mimics its functionality, of course). It also tries to solve: Laura Conrad writes: [...] > Vladimir> (re-search-forward "[ \t]*")) Vladimir> (when quoted > Vladimir> Vladimir> (insert quoted)) Vladimir> (fill-paragraph > Vladimir> nil) Vladimir> (goto-char point) Vladimir> > Vladimir> (forward-line 2))) > > > > > This is a bad example, since you wouldn't really want the lisp code > reformatted, but I frequently reply to correspondents who haven't > filled their lines any better than the lisp code did. The new message-newline-and-reformat avoids filling the paragraph if you pass it a prefix argument, like in: `C-u M-RET'. works for me, so hth, Francisco P.S. Thank yuo Vladimir. :-) -- Alcoholics Anonymous is when you get to drink under someone else's name.