[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: |
Mon, 23 Apr 2018 12:27:45 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
Hello,
address@hidden (Pierre Téchoueyres) writes:
> I did my homework : found a fix for a) and rebased previous patch on
> master.
Thank you. Some comments follow.
> * lisp/ox.el (org-export-expand-include-keyword): Add new keyword
> `:coding' for specify the file encoding whith the `#+include:'
> directive.
>
> This allow to use somting like :
> #+include: "./myfile" :coding cp850-dos
> when your org-file is encoded in utf-8 for example.
Nitpick: Org file
> ** New features
> +*** New keyword for ~#+include:~ directive
> +Add ~:coding "codign-system"~ keyword to allow include of files from
=~:coding coding-system=
> +different codign system than the main org-file.
Org file.
> +For example:
> +#+begin_example
> +,#+INCLUDE: "myfile.cmd" src cmd :coding cp850-dos
> +#+end_example
Note that we are freezing Org 9.2 right now. This will go into master
once 9.2 is out.
> + (coding
> + (intern (or (and (string-match
> + ":coding +\\<\\([a-z0-9\\-]+\\)\\>" value)
> + (prog1 (match-string 1 value)
> + (setq value (replace-match "" nil nil
> value))))
> + (symbol-name coding-system-for-read))))
(coding
(or (and (string-match ":coding +\\([a-z0-9\\-]+\\)" value)
(prog1 (intern (match-string 1 value))
(setq value (replace-match "" nil nil value))))
coding-system-for-read))
In Lisp, symbol constituents are all words plus $&*+-_<>
We might want to update the regexp accordingly.
> +Subject: [PATCH] Correctly convert encoding of included files
> +
> +* lisp/ox.el (org-export--prepare-file-contents): convert temporary
> + buffer encoding to org buffer's encoding.
Org buffer's encoding.
Could you send an updated patch?
Regards,
--
Nicolas Goaziou 0x80A93738
- [O] [PATCH] Add new keyword :coding for #+include directive, Pierre Téchoueyres, 2018/04/16
- Re: [O] [PATCH] Add new keyword :coding for #+include directive, Pierre Téchoueyres, 2018/04/16
- Re: [O] [PATCH] Add new keyword :coding for #+include directive, Nicolas Goaziou, 2018/04/17
- Re: [O] [PATCH] Add new keyword :coding for #+include directive, Pierre Téchoueyres, 2018/04/18
- Re: [O] [PATCH] Add new keyword :coding for #+include directive, Pierre Téchoueyres, 2018/04/20
- Re: [O] [PATCH] Add new keyword :coding for #+include directive,
Nicolas Goaziou <=
- Re: [O] [PATCH] Add new keyword :coding for #+include directive, Pierre Téchoueyres, 2018/04/23
- Re: [O] [PATCH] Add new keyword :coding for #+include directive, Nicolas Goaziou, 2018/04/24
- Re: [O] [PATCH] Add new keyword :coding for #+include directive, Pierre Téchoueyres, 2018/04/24