all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Dmitri Paduchikh <dpaduchikh@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: bug#25365: 25.1; Coding system for bookmarks and desktop
Date: Sun, 08 Jan 2017 17:45:10 +0200	[thread overview]
Message-ID: <83k2a5blo9.fsf@gnu.org> (raw)
In-Reply-To: <87d1fxzy9d.fsf@gmail.com> (message from Dmitri Paduchikh on Sun,  08 Jan 2017 14:39:26 +0500)

> From: Dmitri Paduchikh <dpaduchikh@gmail.com>
> Cc: emacs-devel@gnu.org
> 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	other threads:[~2017-01-08 15:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-05 12:37 bug#25365: 25.1; Coding system for bookmarks and desktop Dmitri Paduchikh
2017-01-06 14:56 ` Dmitri Paduchikh
2017-01-07 12:46 ` Eli Zaretskii
2017-01-08  9:39   ` Dmitri Paduchikh
2017-01-08 15:45     ` Eli Zaretskii [this message]
2017-01-09 17:07       ` Dmitri Paduchikh
2017-01-09 18:49         ` Eli Zaretskii
2017-01-09 20:34           ` Dmitri Paduchikh
2017-01-10 15:49             ` Eli Zaretskii

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=83k2a5blo9.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=dpaduchikh@gmail.com \
    --cc=emacs-devel@gnu.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.