From: Dmitry Alexandrov <dag@gnui.org>
To: ding@gnus.org
Subject: Re: supercite (sc-citation-leader " ") kill indentation, in a intelligent way
Date: Wed, 08 Jul 2020 02:06:13 +0300 [thread overview]
Message-ID: <wo3fvsbe.dag@gnui.org> (raw)
In-Reply-To: <875zazdazv.fsf@mat.ucm.es> (Uwe Brauer's message of "Tue, 07 Jul 2020 09:45:24 +0200")
[-- Attachment #1: Type: text/plain, Size: 1593 bytes --]
Uwe Brauer <oub@mat.ucm.es> wrote:
> I use supercite
¿Thatʼs a package, that formats citations in mail like that, right:
UB> I use supercite
If so, let me advise you against using it, and any idiosyncratic citation styles in general.
> But sometimes I want to delte indentation of the quoted text:
>
> So I wrote that small funktion
>
> (defun my-delete-indentation-msg ()
> "Small hack to delete indentention of quotes caused by `sc-citation-leader'."
> (interactive)
> (save-excursion
> (mail-text)
> (indent-rigidly (point) (point-max) -50 -50)))
>
> But of course it kills all indentation.
Only that is less than 50 chars wide, IIUC.
> Is there a way only to kill the indentation of the quoted text, which has a
> > prefix
>
> Or a
>
> RMS> prefix
Why there should not be? What youʼve just described does not feature anything ‘supercite’-specific and translates to Elisp straightforwardly. Interpreting your ‘RMS’ as any word (in a sense of syntax tables):
(defun oub-mail-unindent (&optional beg end)
(interactive (when (use-region-p)
(list (region-beginning) (region-end))))
(setq beg (or beg (mail-text-start))
end (or end (point-max)))
(save-excursion
(goto-char end) (forward-line 0)
(while (<= beg (point))
(when (looking-at
(rx (seq (one-or-more (literal sc-citation-leader))
(group (zero-or-more word) ">"))))
(replace-match "\\1" t))
(forward-line -1))))
(Not tested.)
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]
next prev parent reply other threads:[~2020-07-07 23:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-07 7:45 Uwe Brauer
2020-07-07 23:06 ` Dmitry Alexandrov [this message]
2020-07-08 8:48 ` Uwe Brauer
2020-07-09 4:21 ` Using idiosyncratic quoting styles in mail (was: supercite (sc-citation-leader " ") kill indentation, in a intelligent way) Dmitry Alexandrov
2020-07-09 17:53 ` Using idiosyncratic quoting styles in mail Uwe Brauer
2020-07-10 22:30 ` David Rogers
2020-07-11 6:56 ` Uwe Brauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=wo3fvsbe.dag@gnui.org \
--to=dag@gnui.org \
--cc=ding@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).