Discussion:
kill nested citation
Uwe Brauer
2015-03-08 13:59:00 UTC
Permalink
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
Ted Zlatanov
2015-04-17 20:08:40 UTC
Permalink
On Sun, 08 Mar 2015 14:59:00 +0100 Uwe Brauer <***@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

Loading...