emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug#25365: 25.1; Coding system for bookmarks and desktop


From: Eli Zaretskii
Subject: Re: bug#25365: 25.1; Coding system for bookmarks and desktop
Date: Sun, 08 Jan 2017 17:45:10 +0200

> From: Dmitri Paduchikh <address@hidden>
> Cc: address@hidden
> Date: Sun, 08 Jan 2017 14:39:26 +0500
> 
> As far as I understand bookmark.el may load bookmarks from several
> files. Using the coding system from last read file makes the choice
> of coding system for future write dependent on the order of bookmark
> load and thus difficult to keep track for user.

It's deterministic, at least.  And the user can now force the encoding
she likes with "C-x RET c M-x bookmark-save RET".  Finally, for user
to have a good reason for specifying an encoding of the bookmark file
is already a rare use case, since the default utf-8-emacs should be
good for everyone.

So I think we are okay, as even rare uses cases have a solution now.

> Also setting coding system through coding-system-for-write will make
> non-encodable characters replaced by spaces.

This option exists for users who really know what they are doing; the
default utf-8-emacs encoding is safe for any and all characters Emacs
supports.

> As I am concerned these complications are not needed at all.

Letting users override the encoding for any I/O us standard Emacs
operation, so I think saving bookmarks should provide it as well.

> Encoding arbitrary data when writing a file (i.e. with utf-8-emacs)
> and specifying coding system in the file header for the data to be
> correctly decoded back - is all that is needed in my opinion.

That's the default, which most users will have no reason to change, so
we are again okay.  But if there are users out there who had their
bookmark files encoded otherwise, Emacs will now honor their encoding,
instead of silently rewriting the file in utf-8-emacs.

> > I installed the patch below on the master branch.  Please try it
> > (after removing your advices) and see if it gives good results.  If
> > you see problems, please reopen this bug with the details.
> 
> Will check it out. Though I think that the situation will not repeat after I
> have fixed my configuration.

I'm more bothered by some unintended consequences in normal usage,
since I myself don't use bookmarks in my day-to-day use patterns.

> > I'm not sure how many users share the desktop files with older Emacs
> > versions that didn't support utf-8-emacs. There's nothing wrong with
> > using emacs-mule in recent Emacs versions, for files that aren't
> > supposed to be read by programs that are not Emacs.
> 
> I am worried by its ability to encode arbitrary characters after switch to
> UTF-8.

No worries: emacs-mule can encode any character supported by Emacs.
The fact that the internal encoding changed doesn't affect that.

> PS. Not sure whether it makes sense to send messages to a closed bug,

There's nothing wrong with that, the discussion is recorded even after
the bug is closed.

Thanks.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]