Elide behaviour in mu4e

15 views
Skip to first unread message

Eduardo Mercovich

unread,
Apr 12, 2017, 9:25:09 AM4/12/17
to mu-discuss
Dear all.

The message-elide-region function (C-c C-e) is one of the
fundamentals of good email netiquette along with fill region.

However, I have a doubt about it's supposed behaviour.

If I select a region and elide it, I assumed that mu4e would
replace the region with "[...]".
But what I see is that a line break is added, with I usually have
to delete by hand.

As an example, given this original text (taken from the great
Martin Luther King Jr. speech "I Have a Dream"):

--8<---------------cut here---------------start------------->8---

> But one hundred years later, the Negro still is not free. One
> hundred years later, the life of the Negro is still sadly
> crippled by the manacles of segregation and the chains of
> discrimination. One hundred years later, the Negro lives on a
> lonely island of poverty in the midst of a vast ocean of
> material prosperity. One hundred years later, the Negro is still
> languished in the corners of American society and finds himself
> an exile in his own land. And so we've come here today to
> dramatize a shameful condition.

--8<---------------cut here---------------end--------------->8---

I select an intermediate region (expressly marked here between
brackets "[]"):

--8<---------------cut here---------------start------------->8---

> But one hundred years later, the Negro still is not free. [One
> hundred years later, the life of the Negro is still sadly
> crippled by the manacles of segregation and the chains of
> discrimination. One hundred years later, the Negro lives on a
> lonely island of poverty in the midst of a vast ocean of
> material prosperity. One hundred years later, the Negro is still
> languished in the corners of American society and finds himself
> an exile in his own land.] And so we've come here today to
> dramatize a shameful condition.

--8<---------------cut here---------------end--------------->8---

And upon pressing message-elide-region I expect as a result:

--8<---------------cut here---------------start------------->8---

> But one hundred years later, the Negro still is not free. [...]
> And so we've come here today to dramatize a shameful condition.

--8<---------------cut here---------------end--------------->8---

Instead, I have:

--8<---------------cut here---------------start------------->8---

> But one hundred years later, the Negro still is not free.
[...]

And so we've come here today to dramatize a shameful condition.

--8<---------------cut here---------------end--------------->8---

At most, and as a electric/dazzling detail, it could add or
substract spaces depending on the exact boundaries to be sure that
there is 1 space on either side.

Is this behaviour the expected one?

Thanks a lot...


--
Eduardo Mercovich

Donde se cruzan tus talentos
con las necesidades del mundo,
ahí está tu vocación.
(Anónimo)

Christophe Troestler

unread,
Apr 12, 2017, 10:37:32 AM4/12/17
to mu-di...@googlegroups.com
Hi,

On 2017-04-12, Eduardo Mercovich wrote:
>
> The message-elide-region function (C-c C-e) is one of the fundamentals
> of good email netiquette along with fill region.
>
> However, I have a doubt about it's supposed behaviour.
>
> If I select a region and elide it, I assumed that mu4e would replace
> the region with "[...]". But what I see is that a line break is added,
> with I usually have to delete by hand. [...]

You can configure what the replacement text is using
message-elide-ellipsis. For your needs, try

(setq message-elide-ellipsis "[...]")

Best,
C.

Eduardo Mercovich

unread,
Apr 12, 2017, 1:56:23 PM4/12/17
to mu-di...@googlegroups.com
Hi Christophe.

[...]

>> If I select a region and elide it, I assumed that mu4e would
>> replace
>> the region with "[...]". But what I see is that a line break is
>> added,
>> with I usually have to delete by hand. [...]

> You can configure what the replacement text is using
> message-elide-ellipsis. For your needs, try
> (setq message-elide-ellipsis "[...]")

Beautiful, thank you very much. :)

I didn't knew it was configurable.
Emacs and it's community always manages to create worderful
surprises... ;D

Best regards...

Christophe Troestler

unread,
Apr 12, 2017, 6:10:34 PM4/12/17
to mu-di...@googlegroups.com

On 2017-04-12, Eduardo Mercovich wrote:
>
> Hi Christophe.
>
> [...]
>
> >> If I select a region and elide it, I assumed that mu4e would
> >> replace
> >> the region with "[...]". But what I see is that a line break is
> >> added, with I usually have to delete by hand. [...]
>
> > You can configure what the replacement text is using
> > message-elide-ellipsis. For your needs, try
> > (setq message-elide-ellipsis "[...]")
>
> Beautiful, thank you very much. :)
>
> I didn't knew it was configurable.

A way to discover that is to do

C-h f message-elide-region

Best,
C.

Eduardo Mercovich

unread,
Apr 13, 2017, 12:29:49 PM4/13/17
to mu-di...@googlegroups.com
Hi Christophe.

[...]
>> > You can configure what the replacement text is using
>> > message-elide-ellipsis. For your needs, try
>> > (setq message-elide-ellipsis "[...]")

>> Beautiful, thank you very much. :)
>> I didn't knew it was configurable.

> A way to discover that is to do
> C-h f message-elide-region

Thank you, I just learned to use that with helm too (I love helm),
so it's super simple to explore possibilities. :)

Best...
Reply all
Reply to author
Forward
0 new messages