From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: bug#25365: 25.1; Coding system for bookmarks and desktop Date: Sun, 08 Jan 2017 17:45:10 +0200 Message-ID: <83k2a5blo9.fsf@gnu.org> References: <87mvf57kdx.fsf@gmail.com> <83pojzavhg.fsf@gnu.org> <87d1fxzy9d.fsf@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1483890342 32001 195.159.176.226 (8 Jan 2017 15:45:42 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 8 Jan 2017 15:45:42 +0000 (UTC) Cc: emacs-devel@gnu.org To: Dmitri Paduchikh Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 08 16:45:38 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cQFew-0006lA-Ej for ged-emacs-devel@m.gmane.org; Sun, 08 Jan 2017 16:45:26 +0100 Original-Received: from localhost ([::1]:33811 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cQFf0-0005Bf-N5 for ged-emacs-devel@m.gmane.org; Sun, 08 Jan 2017 10:45:30 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51544) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cQFer-0005BG-Ro for emacs-devel@gnu.org; Sun, 08 Jan 2017 10:45:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cQFem-0000G5-IN for emacs-devel@gnu.org; Sun, 08 Jan 2017 10:45:21 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57857) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cQFem-0000Fz-F1; Sun, 08 Jan 2017 10:45:16 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4617 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cQFel-0005nB-34; Sun, 08 Jan 2017 10:45:15 -0500 In-reply-to: <87d1fxzy9d.fsf@gmail.com> (message from Dmitri Paduchikh on Sun, 08 Jan 2017 14:39:26 +0500) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:211164 Archived-At: > From: Dmitri Paduchikh > 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.