all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#25365: 25.1; Coding system for bookmarks and desktop
@ 2017-01-05 12:37 Dmitri Paduchikh
  2017-01-06 14:56 ` Dmitri Paduchikh
  2017-01-07 12:46 ` Eli Zaretskii
  0 siblings, 2 replies; 9+ messages in thread
From: Dmitri Paduchikh @ 2017-01-05 12:37 UTC (permalink / raw)
  To: 25365

Hello,

It appears that all Cyrillic text in my bookmarks file has been
corrupted. I wasn't able to reproduce such a corruption using emacs -Q,
so probably this is due to interference with my settings which I will
have to investigate. But in my opinion there is a problem with
bookmark.el as well since it ignores completely coding system when
saving bookmarks. Thus I have written the following two advices to fix
its behavior. It seems that they work as needed.

(advice-add 'bookmark-write-file :around
            #'(lambda (f &rest args)
                (let ((coding-system-for-write (or coding-system-for-write 'utf-8-emacs)))
                  (apply f args)))
            '((name . "coding")))

(advice-add 'bookmark-insert-file-format-version-stamp :before
            #'(lambda (&rest args)
                (when coding-system-for-write
                  (insert (format "\
;;;; Emacs Bookmark Format Version %d ;;;;
;;; -*- coding: %S -*-\n"
                                  bookmark-file-format-version
                                  coding-system-for-write))))
            '((name . "coding")))

Besides, although desktop.el specifies coding system in its file, it is
old one - emacs-mule. Shouldn't this be utf-8-emacs these days instead?

With best regards
Dmitri Paduchikh

In GNU Emacs 25.1.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.22.5)
 of 2016-12-23 built on juergen





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

end of thread, other threads:[~2017-01-10 15:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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.