unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* enriched mode loses bold on save, version 26.1, debian 10.3
@ 2021-02-13  2:21 Dan Hitt
  2021-02-13  8:30 ` Jean Louis
  2021-02-13  8:37 ` Eli Zaretskii
  0 siblings, 2 replies; 12+ messages in thread
From: Dan Hitt @ 2021-02-13  2:21 UTC (permalink / raw)
  To: Help Gnu Emacs

I can copy text that has colors and some words bolded into a buffer showing
an enriched-text file.

For example, i can open an eshell, and do ls: the command prompt is bold
and orange, while the files i list that are directories come out bold and
blue, with black unbold text for regular files.

When i paste this text into an enriched-text file, all of the colors and
bolding show up.

When i close the file, and reopen it, the colors are still there, but the
bolding is gone.

This is in emacs version 26.1, on debian 10.3.

What i would like is for the bolding to be saved as well  --- if
enriched-text is not suitable for this, is there another mode anybody can
recommend?

TIA for any advice or info.

dan


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

* Re: enriched mode loses bold on save, version 26.1, debian 10.3
  2021-02-13  2:21 enriched mode loses bold on save, version 26.1, debian 10.3 Dan Hitt
@ 2021-02-13  8:30 ` Jean Louis
  2021-02-13  8:37 ` Eli Zaretskii
  1 sibling, 0 replies; 12+ messages in thread
From: Jean Louis @ 2021-02-13  8:30 UTC (permalink / raw)
  To: Dan Hitt; +Cc: Help Gnu Emacs

* Dan Hitt <dan.hitt@gmail.com> [2021-02-13 05:22]:
> I can copy text that has colors and some words bolded into a buffer showing
> an enriched-text file.
> 
> For example, i can open an eshell, and do ls: the command prompt is bold
> and orange, while the files i list that are directories come out bold and
> blue, with black unbold text for regular files.
> 
> When i paste this text into an enriched-text file, all of the colors and
> bolding show up.

I am not skilled in those Emacs technicalities, but from personal
pasting of text I know that various face or font settings may be
visually such in other buffer. Those are visual settings. Enriched
mode has some underlying settings and if no text was marked as bold in
the enriched mode then those visual settings would disappear.

For example I am looking at this email and your quoted text is
appearing something of orange color, but if I would copy and paste
that in Enriched mode, the orange color is not saved. That is because
it belongs rather to the theme or visual representation of text. It is
not saved because the true digital content of the text did not contain
the visual information, it is separate.

It is not a bug in my opinion.

Maybe there exists way to slurp or obtain those visual settings and
convert such into Enriched mode. I use Enriched mode for my notes.

Jean



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

* Re: enriched mode loses bold on save, version 26.1, debian 10.3
  2021-02-13  2:21 enriched mode loses bold on save, version 26.1, debian 10.3 Dan Hitt
  2021-02-13  8:30 ` Jean Louis
@ 2021-02-13  8:37 ` Eli Zaretskii
  2021-02-13 10:10   ` Jean Louis
  2021-02-14  2:09   ` Dan Hitt
  1 sibling, 2 replies; 12+ messages in thread
From: Eli Zaretskii @ 2021-02-13  8:37 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Dan Hitt <dan.hitt@gmail.com>
> Date: Fri, 12 Feb 2021 18:21:29 -0800
> 
> I can copy text that has colors and some words bolded into a buffer showing
> an enriched-text file.
> 
> For example, i can open an eshell, and do ls: the command prompt is bold
> and orange, while the files i list that are directories come out bold and
> blue, with black unbold text for regular files.
> 
> When i paste this text into an enriched-text file, all of the colors and
> bolding show up.
> 
> When i close the file, and reopen it, the colors are still there, but the
> bolding is gone.
> 
> This is in emacs version 26.1, on debian 10.3.
> 
> What i would like is for the bolding to be saved as well  --- if
> enriched-text is not suitable for this, is there another mode anybody can
> recommend?

I think this is a bug in enriched-mode, please report it together with
the recipe for reproducing the problem.



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

* Re: enriched mode loses bold on save, version 26.1, debian 10.3
  2021-02-13  8:37 ` Eli Zaretskii
@ 2021-02-13 10:10   ` Jean Louis
  2021-02-13 13:35     ` Eli Zaretskii
  2021-02-13 15:14     ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-02-14  2:09   ` Dan Hitt
  1 sibling, 2 replies; 12+ messages in thread
From: Jean Louis @ 2021-02-13 10:10 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

* Eli Zaretskii <eliz@gnu.org> [2021-02-13 11:37]:
> > From: Dan Hitt <dan.hitt@gmail.com>
> > Date: Fri, 12 Feb 2021 18:21:29 -0800
> > 
> > I can copy text that has colors and some words bolded into a buffer showing
> > an enriched-text file.
> > 
> > For example, i can open an eshell, and do ls: the command prompt is bold
> > and orange, while the files i list that are directories come out bold and
> > blue, with black unbold text for regular files.
> > 
> > When i paste this text into an enriched-text file, all of the colors and
> > bolding show up.
> > 
> > When i close the file, and reopen it, the colors are still there, but the
> > bolding is gone.
> > 
> > This is in emacs version 26.1, on debian 10.3.
> > 
> > What i would like is for the bolding to be saved as well  --- if
> > enriched-text is not suitable for this, is there another mode anybody can
> > recommend?
> 
> I think this is a bug in enriched-mode, please report it together with
> the recipe for reproducing the problem.

Let us say I have M-x shell in one window, and my prompt symbol "$" is
green color or bold, and in other window file in enriched mode.

Then I move to buffer *shell* and copy this:

,----
| $ ls
`----

I can see visually that $ is green in color or bold, and when I insert
it into enriched mode file, I can see the same color. When I save it,
it is not there, this is because propertized text was copied and
pasted.

Is enriched mode supposed to understand propertized text and convert
such into enriched mode?

Jean



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

* Re: enriched mode loses bold on save, version 26.1, debian 10.3
  2021-02-13 10:10   ` Jean Louis
@ 2021-02-13 13:35     ` Eli Zaretskii
  2021-02-13 14:31       ` Jean Louis
  2021-02-13 15:14     ` Emanuel Berg via Users list for the GNU Emacs text editor
  1 sibling, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2021-02-13 13:35 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Sat, 13 Feb 2021 13:10:39 +0300
> From: Jean Louis <bugs@gnu.support>
> Cc: help-gnu-emacs@gnu.org
> 
> > I think this is a bug in enriched-mode, please report it together with
> > the recipe for reproducing the problem.
> 
> Let us say I have M-x shell in one window, and my prompt symbol "$" is
> green color or bold, and in other window file in enriched mode.
> 
> Then I move to buffer *shell* and copy this:
> 
> ,----
> | $ ls
> `----
> 
> I can see visually that $ is green in color or bold, and when I insert
> it into enriched mode file, I can see the same color. When I save it,
> it is not there, this is because propertized text was copied and
> pasted.
> 
> Is enriched mode supposed to understand propertized text and convert
> such into enriched mode?

Well, it did understand the foreground color in the OP's recipe,
didn't it?  it did save the color, but not the bold attribute So then
answer appears to be YES, and there's something Enriched mode should
have done but didn't.

(And there's no reason to "convert to enriched mode", since what
Enriched mode offers is a mechanism to save and restore text
properties.  It's not like it invents some new text attributes or
something, they are just text properties.)



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

* Re: enriched mode loses bold on save, version 26.1, debian 10.3
  2021-02-13 13:35     ` Eli Zaretskii
@ 2021-02-13 14:31       ` Jean Louis
  0 siblings, 0 replies; 12+ messages in thread
From: Jean Louis @ 2021-02-13 14:31 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

* Eli Zaretskii <eliz@gnu.org> [2021-02-13 16:36]:
> > Date: Sat, 13 Feb 2021 13:10:39 +0300
> > From: Jean Louis <bugs@gnu.support>
> > Cc: help-gnu-emacs@gnu.org
> > 
> > > I think this is a bug in enriched-mode, please report it together with
> > > the recipe for reproducing the problem.
> > 
> > Let us say I have M-x shell in one window, and my prompt symbol "$" is
> > green color or bold, and in other window file in enriched mode.
> > 
> > Then I move to buffer *shell* and copy this:
> > 
> > ,----
> > | $ ls
> > `----
> > 
> > I can see visually that $ is green in color or bold, and when I insert
> > it into enriched mode file, I can see the same color. When I save it,
> > it is not there, this is because propertized text was copied and
> > pasted.
> > 
> > Is enriched mode supposed to understand propertized text and convert
> > such into enriched mode?
> 
> Well, it did understand the foreground color in the OP's recipe,
> didn't it?

Now when inspecting that it should save the color I can see it does
save the color, that I did not know.

> it did save the color, but not the bold attribute So then answer
> appears to be YES, and there's something Enriched mode should have
> done but didn't.

That is right and also clarified to me.

> (And there's no reason to "convert to enriched mode", since what
> Enriched mode offers is a mechanism to save and restore text
> properties.  It's not like it invents some new text attributes or
> something, they are just text properties.)

Aha. That I did not know.





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

* Re: enriched mode loses bold on save, version 26.1, debian 10.3
  2021-02-13 10:10   ` Jean Louis
  2021-02-13 13:35     ` Eli Zaretskii
@ 2021-02-13 15:14     ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-02-13 15:27       ` Jean Louis
  1 sibling, 1 reply; 12+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-02-13 15:14 UTC (permalink / raw)
  To: help-gnu-emacs

Jean Louis wrote:

> I can see visually that $ is green in color or bold, and
> when I insert it into enriched mode file, I can see the same
> color. When I save it, it is not there, this is because
> propertized text was copied and pasted.

(add-to-list 'yank-excluded-properties 'face)

or

(setq yank-excluded-properties t)

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




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

* Re: enriched mode loses bold on save, version 26.1, debian 10.3
  2021-02-13 15:14     ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-02-13 15:27       ` Jean Louis
  0 siblings, 0 replies; 12+ messages in thread
From: Jean Louis @ 2021-02-13 15:27 UTC (permalink / raw)
  To: help-gnu-emacs

* Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> [2021-02-13 18:15]:
> Jean Louis wrote:
> 
> > I can see visually that $ is green in color or bold, and
> > when I insert it into enriched mode file, I can see the same
> > color. When I save it, it is not there, this is because
> > propertized text was copied and pasted.
> 
> (add-to-list 'yank-excluded-properties 'face)
> 
> or
> 
> (setq yank-excluded-properties t)

Good setting for future.

I think I have never had any use of yanking text properties (unless I
would be in enriched mode).





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

* Re: enriched mode loses bold on save, version 26.1, debian 10.3
  2021-02-13  8:37 ` Eli Zaretskii
  2021-02-13 10:10   ` Jean Louis
@ 2021-02-14  2:09   ` Dan Hitt
  2021-02-14  2:29     ` Emanuel Berg via Users list for the GNU Emacs text editor
  1 sibling, 1 reply; 12+ messages in thread
From: Dan Hitt @ 2021-02-14  2:09 UTC (permalink / raw)
  To: Help Gnu Emacs

On Sat, Feb 13, 2021 at 12:37 AM Eli Zaretskii <eliz@gnu.org> wrote:

> > From: Dan Hitt <dan.hitt@gmail.com>
> > Date: Fri, 12 Feb 2021 18:21:29 -0800
> >
> > I can copy text that has colors and some words bolded into a buffer
> showing
> > an enriched-text file.
> >
> > For example, i can open an eshell, and do ls: the command prompt is bold
> > and orange, while the files i list that are directories come out bold and
> > blue, with black unbold text for regular files.
> >
> > When i paste this text into an enriched-text file, all of the colors and
> > bolding show up.
> >
> > When i close the file, and reopen it, the colors are still there, but the
> > bolding is gone.
> >
> > This is in emacs version 26.1, on debian 10.3.
> >
> > What i would like is for the bolding to be saved as well  --- if
> > enriched-text is not suitable for this, is there another mode anybody can
> > recommend?
>
> I think this is a bug in enriched-mode, please report it together with
> the recipe for reproducing the problem.
>
>
Thanks Eli!

I sent mail to  bug-gnu-emac at gnu dot org including detailed instructions
starting from emacs -Q on how to reproduce the bug.  If i get a reply or a
tracking number of some sort i'll post it here.

dan


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

* Re: enriched mode loses bold on save, version 26.1, debian 10.3
  2021-02-14  2:09   ` Dan Hitt
@ 2021-02-14  2:29     ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-02-15  2:15       ` Dan Hitt
  0 siblings, 1 reply; 12+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-02-14  2:29 UTC (permalink / raw)
  To: help-gnu-emacs

Dan Hitt wrote:

> I sent mail to bug-gnu-emac at gnu dot org including
> detailed instructions starting from emacs -Q on how to
> reproduce the bug. If i get a reply or a tracking number of
> some sort i'll post it here.

You can also use `report-emacs-bug' as you know, I'm sure.
A tracking number looks like this - bug#46339 - and yours will
be mailed to you before long. Subsequent discussion takes
place at gmane.emacs.bugs but please do as you say and post
the bug number here as often problems reappear and get googled
and then it is good that everything is complete and
interconnected for people to follow up on them easily :)

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




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

* Re: enriched mode loses bold on save, version 26.1, debian 10.3
  2021-02-14  2:29     ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-02-15  2:15       ` Dan Hitt
  2021-03-14  7:43         ` Dan Hitt
  0 siblings, 1 reply; 12+ messages in thread
From: Dan Hitt @ 2021-02-15  2:15 UTC (permalink / raw)
  To: Help Gnu Emacs

On Sat, Feb 13, 2021 at 6:30 PM Emanuel Berg via Users list for the GNU
Emacs text editor <help-gnu-emacs@gnu.org> wrote:

> Dan Hitt wrote:
>
> > I sent mail to bug-gnu-emac at gnu dot org including
> > detailed instructions starting from emacs -Q on how to
> > reproduce the bug. If i get a reply or a tracking number of
> > some sort i'll post it here.
>
> You can also use `report-emacs-bug' as you know, I'm sure.
> A tracking number looks like this - bug#46339 - and yours will
> be mailed to you before long. Subsequent discussion takes
> place at gmane.emacs.bugs but please do as you say and post
> the bug number here as often problems reappear and get googled
> and then it is good that everything is complete and
> interconnected for people to follow up on them easily :)
>

Thanks Emanuel.

The bug identifier is  bug#46507

I received it about 10 hours after i sent in the report.

The function report-emacs-bug is indeed helpful, at least for confirming
the right address to mail the report to.

The enriched mode does make it pretty easy to bold text, so i can rebold
before saving, although it would be more convenient if this were not
necessary.  :) :)

dan

>
> --
> underground experts united
> http://user.it.uu.se/~embe8573
> https://dataswamp.org/~incal
>
>
>


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

* Re: enriched mode loses bold on save, version 26.1, debian 10.3
  2021-02-15  2:15       ` Dan Hitt
@ 2021-03-14  7:43         ` Dan Hitt
  0 siblings, 0 replies; 12+ messages in thread
From: Dan Hitt @ 2021-03-14  7:43 UTC (permalink / raw)
  To: Help Gnu Emacs

On Sun, Feb 14, 2021 at 6:15 PM Dan Hitt <dan.hitt@gmail.com> wrote:

>
>
> On Sat, Feb 13, 2021 at 6:30 PM Emanuel Berg via Users list for the GNU
> Emacs text editor <help-gnu-emacs@gnu.org> wrote:
>
>> Dan Hitt wrote:
>>
>> > I sent mail to bug-gnu-emac at gnu dot org including
>> > detailed instructions starting from emacs -Q on how to
>> > reproduce the bug. If i get a reply or a tracking number of
>> > some sort i'll post it here.
>>
>> You can also use `report-emacs-bug' as you know, I'm sure.
>> A tracking number looks like this - bug#46339 - and yours will
>> be mailed to you before long. Subsequent discussion takes
>> place at gmane.emacs.bugs but please do as you say and post
>> the bug number here as often problems reappear and get googled
>> and then it is good that everything is complete and
>> interconnected for people to follow up on them easily :)
>>
>
> Thanks Emanuel.
>
> The bug identifier is  bug#46507
>
> I received it about 10 hours after i sent in the report.
>
> The function report-emacs-bug is indeed helpful, at least for confirming
> the right address to mail the report to.
>
> The enriched mode does make it pretty easy to bold text, so i can rebold
> before saving, although it would be more convenient if this were not
> necessary.  :) :)
>
> dan
>

As a folowup here, Eli Zaretskii produced a solution.  The details are in
the thread for bug 46507.  There's  a patch in there for enriched.el which
i imagine will eventually work its way into debian, but anybody who wants
to patch their own system can just copy the lines he modified into their
enriched.el.

dan


>
>> --
>> underground experts united
>> http://user.it.uu.se/~embe8573
>> https://dataswamp.org/~incal
>>
>>
>>


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

end of thread, other threads:[~2021-03-14  7:43 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-13  2:21 enriched mode loses bold on save, version 26.1, debian 10.3 Dan Hitt
2021-02-13  8:30 ` Jean Louis
2021-02-13  8:37 ` Eli Zaretskii
2021-02-13 10:10   ` Jean Louis
2021-02-13 13:35     ` Eli Zaretskii
2021-02-13 14:31       ` Jean Louis
2021-02-13 15:14     ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-02-13 15:27       ` Jean Louis
2021-02-14  2:09   ` Dan Hitt
2021-02-14  2:29     ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-02-15  2:15       ` Dan Hitt
2021-03-14  7:43         ` Dan Hitt

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 read-only IMAP folder(s) and NNTP newsgroup(s).