Gnus development mailing list
 help / color / mirror / Atom feed
* supercite (sc-citation-leader "   ") kill indentation, in a intelligent way
@ 2020-07-07  7:45 Uwe Brauer
  2020-07-07 23:06 ` Dmitry Alexandrov
  0 siblings, 1 reply; 7+ messages in thread
From: Uwe Brauer @ 2020-07-07  7:45 UTC (permalink / raw)
  To: ding



Hi

I use supercite with the following setting

(sc-citation-leader "   ")
(setq sc-nested-citation-p t)

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. Is there a way only to kill the
indentation of the quoted text, which has a 
      >  prefix

Or a 

     RMS> prefix

Regards

Uwe Brauer 



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

* Re: supercite (sc-citation-leader "   ") kill indentation, in a intelligent way
  2020-07-07  7:45 supercite (sc-citation-leader " ") kill indentation, in a intelligent way Uwe Brauer
@ 2020-07-07 23:06 ` Dmitry Alexandrov
  2020-07-08  8:48   ` Uwe Brauer
  0 siblings, 1 reply; 7+ messages in thread
From: Dmitry Alexandrov @ 2020-07-07 23:06 UTC (permalink / raw)
  To: ding

[-- 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 --]

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

* Re: supercite (sc-citation-leader "   ") kill indentation, in a intelligent way
  2020-07-07 23:06 ` Dmitry Alexandrov
@ 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
  0 siblings, 1 reply; 7+ messages in thread
From: Uwe Brauer @ 2020-07-08  8:48 UTC (permalink / raw)
  To: ding

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

>>> "DA" == Dmitry Alexandrov <dag@gnui.org> writes:

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

Right it does, but this particular feature (the prefix UB) I usually
turn off, [1]

I only turn it on if I reply to several messages at once (which I use
from time to time) then it is very very useful.


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

Great it works like expected thanks a lot!!!

Regards

Uwe 


Footnotes:
[1]  the indent feature I regularly use (and so does RMS) because it
     makes the quotes more visible. Some mail readers have difficulties
     with this intention and that is why I turn it of in newsgroups and
     mailing list, and also want to have the freedom to delete if necessary in ordinary email.



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

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

* Re: Using idiosyncratic quoting styles in mail (was: supercite (sc-citation-leader "   ") kill indentation, in a intelligent way)
  2020-07-08  8:48   ` Uwe Brauer
@ 2020-07-09  4:21     ` Dmitry Alexandrov
  2020-07-09 17:53       ` Using idiosyncratic quoting styles in mail Uwe Brauer
  0 siblings, 1 reply; 7+ messages in thread
From: Dmitry Alexandrov @ 2020-07-09  4:21 UTC (permalink / raw)
  To: ding

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

Uwe Brauer <oub@mat.ucm.es> wrote:
> Great it works like expected thanks a lot!!!

You are welcome.


> [1]  the indent feature I regularly use (and so does RMS)

FWIW, until five years ago or so RMS had been using an ancient style of indent-only (no ‘>’), that is, he might be viewed as being in a prolonged transition to a conventional one.

> because it makes the quotes more visible.

Why do not you embed in your mail a CSS style, where quotes are highlighted with a favourite colour for quotes instead, I wonder? ;-)

Both approaches are equally fundamentally broken in their premise, but the latter is at least easy ignorable recipient-side.

> Some mail readers have difficulties with [recognizing idiosyncratic quoting styles]

Indeed.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

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

* Re: Using idiosyncratic quoting styles in mail
  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       ` Uwe Brauer
  2020-07-10 22:30         ` David Rogers
  0 siblings, 1 reply; 7+ messages in thread
From: Uwe Brauer @ 2020-07-09 17:53 UTC (permalink / raw)
  To: ding; +Cc: Dmitry Alexandrov

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

>>> "DA" == Dmitry Alexandrov <dag@gnui.org> writes:

> Uwe Brauer <oub@mat.ucm.es> wrote:
>> Great it works like expected thanks a lot!!!

> You are welcome.


>> [1]  the indent feature I regularly use (and so does RMS)

> FWIW, until five years ago or so RMS had been using an ancient style
> of indent-only (no ‘>’), that is, he might be viewed as being in a
> prolonged transition to a conventional one.

Ah right I forgot about that.

>> because it makes the quotes more visible.

> Why do not you embed in your mail a CSS style, where quotes are
> highlighted with a favourite colour for quotes instead, I wonder? ;-)

Well, there are people who hate html message so I try to keep a low
profile on that. On the other hand I am curious: When I use html it is
mostly when I use either

    1. Mathematical symbols, and equations or

    2. Tables 

I generate the corresponding html mail,  with org-mime-htmlize and I am not aware that this
function has such a highlighting functionality, which leads me to the question:

Do you know about a lisp function or package which indeed implements
that?

Another problem with this approach is, that still, not all mail reader
(most likely mutt) do not fully support html mail, at least last time I
tried, which was, I admit, some time ago.

> Both approaches are equally fundamentally broken in their premise, but
> the latter is at least easy ignorable recipient-side.

I am not sure I understand, why you consider the use case of replying to several
recipient with the same mail, as fundamentally broken?

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

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

* Re: Using idiosyncratic quoting styles in mail
  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
  0 siblings, 1 reply; 7+ messages in thread
From: David Rogers @ 2020-07-10 22:30 UTC (permalink / raw)
  To: ding

Uwe Brauer <oub@mat.ucm.es> writes:

>>>> "DA" == Dmitry Alexandrov <dag@gnui.org> writes:

>> Both approaches are equally fundamentally broken in their 
>> premise, but
>> the latter is at least easy ignorable recipient-side.
>
> I am not sure I understand, why you consider the use case of 
> replying to several
> recipient with the same mail, as fundamentally broken?

I believe there may have been sarcasm involved, and I believe the 
point was something similar to "Using any kind of quoting marks 
that are not handled automatically by everyone's email client, is 
almost as bad as sending them html - so in the same way that you 
kindly send plain text instead of html, please also kindly use 
built-in automatic quoting marks only".

-- 
David


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

* Re: Using idiosyncratic quoting styles in mail
  2020-07-10 22:30         ` David Rogers
@ 2020-07-11  6:56           ` Uwe Brauer
  0 siblings, 0 replies; 7+ messages in thread
From: Uwe Brauer @ 2020-07-11  6:56 UTC (permalink / raw)
  To: ding

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

>>> "DR" == David Rogers <davidandrewrogers@gmail.com> writes:

> Uwe Brauer <oub@mat.ucm.es> writes:
>>>>> "DA" == Dmitry Alexandrov <dag@gnui.org> writes:

>>> Both approaches are equally fundamentally broken in their premise,
>>> but
>>> the latter is at least easy ignorable recipient-side.
>> 
>> I am not sure I understand, why you consider the use case of
>> replying to several
>> recipient with the same mail, as fundamentally broken?

> I believe there may have been sarcasm involved, and I believe the
> point was something similar to "Using any kind of quoting marks 
> that are not handled automatically by everyone's email client, is
> almost as bad as sending them html - so in the same way that you 
> kindly send plain text instead of html, please also kindly use
> built-in automatic quoting marks only".

I thought that, but then I hoped he had some magic lisp code hidden
somewhere. BTW talking about idiosyncratic styles: 

Wouldn't that cover the use of *very long (more than 80 chars) lines* which
some client, such as gnus, rather prefer not to send, at least they emit
a warning. Just a thought.....

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

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

end of thread, other threads:[~2020-07-11  6:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-07  7:45 supercite (sc-citation-leader " ") kill indentation, in a intelligent way Uwe Brauer
2020-07-07 23:06 ` Dmitry Alexandrov
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

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