emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] [PATCH] Add new keyword :coding for #+include directive


From: Nicolas Goaziou
Subject: Re: [O] [PATCH] Add new keyword :coding for #+include directive
Date: Tue, 08 May 2018 19:31:03 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Hello,

address@hidden (Pierre Téchoueyres) writes:

> Hello Nicolas,
> Did you have time to review the patches ?

Sorry for the delay, I have been sidetracked.

I admit I don't fully understand your bugfix patch, i.e., "[PATCH]
Correctly convert encoding of included files".

For the record, here is the change:

   (with-temp-buffer
-    (insert-file-contents file)
+    (let ((org-buffer-coding-system buffer-file-coding-system))
+      (insert-file-contents file)
+      (unless (eq org-buffer-coding-system buffer-file-coding-system)
+       (set-buffer-file-coding-system org-buffer-coding-system)))


You pretend `org-buffer-coding-system' is storing coding-system from the
Org buffer, but the let-binding happens from within `with-temp-buffer'.
So the coding system comes from the temporary buffer instead. 

Also, `insert-file-contents' is not supposed to change coding system, or
is it? So when would the `unless' be triggered?

Could you explain a bit the issue you are fixing here?

Thank you.

Regards,

-- 
Nicolas Goaziou                                                0x80A93738



reply via email to

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