Gnus development mailing list
 help / color / mirror / Atom feed
* kill nested citation
@ 2015-03-08 13:59 Uwe Brauer
  2015-04-17 20:08 ` Ted Zlatanov
  0 siblings, 1 reply; 2+ messages in thread
From: Uwe Brauer @ 2015-03-08 13:59 UTC (permalink / raw)
  To: ding

[-- Attachment #1: Type: text/plain, Size: 552 bytes --]

Hi

I often receive message in which I want to kill nested citations
such as 

>>> bl bla

>> this that

> this should be replied to

So only  lines with the prefix of the last line should remain. I could
not find any function which seems to do this. The following very basic
function satisfies my needs.

(defun my-cleanup-nested-citations ()
  (interactive)
  (save-excursion
	(message-goto-body)
	(delete-matching-lines ">>\\|> >\\|>>>\\|> > >")))

I wounder whether there are other better solutions.

regards

Uwe Brauer 

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 6007 bytes --]

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

* Re: kill nested citation
  2015-03-08 13:59 kill nested citation Uwe Brauer
@ 2015-04-17 20:08 ` Ted Zlatanov
  0 siblings, 0 replies; 2+ messages in thread
From: Ted Zlatanov @ 2015-04-17 20:08 UTC (permalink / raw)
  To: ding

On Sun, 08 Mar 2015 14:59:00 +0100 Uwe Brauer <oub@mat.ucm.es> wrote: 

UB> I often receive message in which I want to kill nested citations
...
UB> I wounder whether there are other better solutions.

Supercite has:

sc-guess-nesting is a compiled Lisp function in `supercite.el'.

(sc-guess-nesting &optional STRING)

Guess the citation nesting on the current line.
If nesting cannot be guessed, nil is returned.  Optional STRING if
supplied, is used instead of the line point is on in the current
buffer.

You may have to customize the regexps that it uses, but it seems like it
might work for you.

Ted




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

end of thread, other threads:[~2015-04-17 20:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-08 13:59 kill nested citation Uwe Brauer
2015-04-17 20:08 ` Ted Zlatanov

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).