emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: alain.cochard@unistra.fr
Cc: emacs-orgmode@gnu.org
Subject: Re: Confused about what the COMMENT keyword means
Date: Tue, 27 Sep 2022 09:55:31 +0800	[thread overview]
Message-ID: <87leq5pomk.fsf@localhost> (raw)
In-Reply-To: <25393.61240.135445.401251@gargle.gargle.HOWL>

Alain.Cochard@unistra.fr writes:

> Hello.  I have the file:
>
>    * COMMENT foo
>    #+EXPORT_FILE_NAME: foo.pdf
>    #+TITLE: foot
>    fofoo
>    * bar
>    #+EXPORT_FILE_NAME: bar.pdf
>    #+TITLE: bart
>    babar

#+EXPORT_FILE_NAME is an in-buffer export setting with global effect.
According to 13.2 Export Settings section of the Org manual,

       In-buffer settings may appear anywhere in the file, either directly
    or indirectly through a file included using ‘#+SETUPFILE: filename or
    URL’ syntax.

Because export settings are global, they have higher priority over the
COMMENTed heading.

Further, you have two instances of the #+EXPORT_FILE_NAME in your
buffer. The behaviour of Org is undefined in such scenario, but the
current implementation detail makes Org use the first instance found in
the file during export.

Do note that usage of #+EXPORT_FILE_NAME and #+TITLE like in your
example is erroneous - they do not apply to their subtrees. Please use
heading properties instead for the desired effect.

> By contrast, with this file
> 
>    # * foo
>    # #+EXPORT_FILE_NAME: foo.pdf
>    # #+TITLE: foot
>    # fofoo
>    * bar
>    #+EXPORT_FILE_NAME: bar.pdf
>    #+TITLE: bart
>    babar

This file contains no export settings.
# #+EXPORT_FILE_NAME: foo.pdf
line is not an export setting. It does not matter that it is a comment,
blah#+EXPORT_FILE_NAME: foo.pdf
would not work either.

--------

I think that the manual is not clear enough about applying in-buffer
settings and keywords. We may want to clarify this detail.

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92


  reply	other threads:[~2022-09-27  1:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-26 18:28 Confused about what the COMMENT keyword means Alain.Cochard
2022-09-27  1:55 ` Ihor Radchenko [this message]
2022-09-27  7:00   ` Alain.Cochard
2022-09-27  7:40     ` Ihor Radchenko
2022-09-30  8:57       ` Alain.Cochard
2022-10-02  4:48         ` [BUG] EXPORT_FILE_NAME keyword is used by `org-export-output-file-name' before macro expansion/INCLUDEs/removing COMMENTed trees (was: Confused about what the COMMENT keyword means) Ihor Radchenko
2022-10-11 14:42           ` Alain.Cochard
2022-10-18  8:53             ` Alain.Cochard
2022-11-10  1:56               ` Ihor Radchenko
2022-11-10  2:03             ` [FR] Allow TITLE to be used as default export file name (was: [BUG] EXPORT_FILE_NAME keyword is used by `org-export-output-file-name' before macro expansion/INCLUDEs/removing COMMENTed trees (was: Confused about what the COMMENT keyword means)) Ihor Radchenko
2022-11-10  7:53               ` Alain.Cochard
2022-11-10  8:04                 ` Ihor Radchenko
2022-11-10  1:51           ` [BUG] EXPORT_FILE_NAME keyword is used by `org-export-output-file-name' before macro expansion/INCLUDEs/removing COMMENTed trees (was: Confused about what the COMMENT keyword means) Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87leq5pomk.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=alain.cochard@unistra.fr \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).