* Feature request for ox.el: add input-buffer attribute to INFO list
@ 2013-11-02 12:42 Thorsten Jolitz
2013-11-02 13:39 ` Nicolas Goaziou
0 siblings, 1 reply; 3+ messages in thread
From: Thorsten Jolitz @ 2013-11-02 12:42 UTC (permalink / raw)
To: emacs-orgmode
Hi List,
in ox.el I find
#+begin_src emacs-lisp
(defun org-export--get-buffer-attributes ()
"Return properties related to buffer attributes, as a plist."
;; Store full path of input file name, or nil. For internal use.
(list :input-file (buffer-file-name (buffer-base-buffer))))
#+end_src
and consequently :input-file is nil if I export a buffer without an
associated file (what I do quite often for some reason).
Wouldn't it make sense to call this attribute :input-buffer-or-file or
so and store 'full path of input file name' if there is an associated
file, and the buffer name otherwise (instead of just nil)?
Obviously, this extra information did not seem useful for the default
use case of the Org exporter so it wasn't included in the communication
channel. However, for other use cases it might be necessary to e.g. tag
headlines with a unique ID of the original parse-tree they belonged to,
and using the input-file (or input-buffer) name when creating this unique
ID seems only logical.
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Feature request for ox.el: add input-buffer attribute to INFO list
2013-11-02 12:42 Feature request for ox.el: add input-buffer attribute to INFO list Thorsten Jolitz
@ 2013-11-02 13:39 ` Nicolas Goaziou
2013-11-02 14:04 ` Thorsten Jolitz
0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Goaziou @ 2013-11-02 13:39 UTC (permalink / raw)
To: Thorsten Jolitz; +Cc: emacs-orgmode
Hello,
Thorsten Jolitz <tjolitz@gmail.com> writes:
> in ox.el I find
>
> #+begin_src emacs-lisp
> (defun org-export--get-buffer-attributes ()
> "Return properties related to buffer attributes, as a plist."
> ;; Store full path of input file name, or nil. For internal use.
> (list :input-file (buffer-file-name (buffer-base-buffer))))
> #+end_src
>
> and consequently :input-file is nil if I export a buffer without an
> associated file (what I do quite often for some reason).
>
> Wouldn't it make sense to call this attribute :input-buffer-or-file or
> so and store 'full path of input file name' if there is an associated
> file, and the buffer name otherwise (instead of just nil)?
>
> Obviously, this extra information did not seem useful for the default
> use case of the Org exporter so it wasn't included in the communication
> channel. However, for other use cases it might be necessary to e.g. tag
> headlines with a unique ID of the original parse-tree they belonged to,
> and using the input-file (or input-buffer) name when creating this unique
> ID seems only logical.
I added :input-buffer to the communication channel.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Feature request for ox.el: add input-buffer attribute to INFO list
2013-11-02 13:39 ` Nicolas Goaziou
@ 2013-11-02 14:04 ` Thorsten Jolitz
0 siblings, 0 replies; 3+ messages in thread
From: Thorsten Jolitz @ 2013-11-02 14:04 UTC (permalink / raw)
To: emacs-orgmode
Nicolas Goaziou <n.goaziou@gmail.com> writes:
>> Wouldn't it make sense to call this attribute :input-buffer-or-file or
>> so and store 'full path of input file name' if there is an associated
>> file, and the buffer name otherwise (instead of just nil)?
>
> I added :input-buffer to the communication channel.
Thanks for the quick response! Helps me to avoid inventing some
workaround ...
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-11-02 14:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-02 12:42 Feature request for ox.el: add input-buffer attribute to INFO list Thorsten Jolitz
2013-11-02 13:39 ` Nicolas Goaziou
2013-11-02 14:04 ` Thorsten Jolitz
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).