emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bastien <bzg@altern.org>
To: Nicolas Goaziou <n.goaziou@gmail.com>
Cc: "emacs-orgmode@gnu.org List" <emacs-orgmode@gnu.org>,
	"Dominik, Carsten" <C.Dominik@uva.nl>,
	Carsten Dominik <carsten.dominik@gmail.com>
Subject: Re: Exporter question
Date: Sun, 24 Feb 2013 10:50:35 +0100	[thread overview]
Message-ID: <87zjyu82hg.fsf@bzg.ath.cx> (raw)
In-Reply-To: <87ppzqys5y.fsf@gmail.com> (Nicolas Goaziou's message of "Sun, 24 Feb 2013 10:31:21 +0100")

Hi Nicolas,

Nicolas Goaziou <n.goaziou@gmail.com> writes:

> If it has to be implemented, it's far easier to remove objects from
> parsed data (e.g. in `org-export-get-optional-title').

Got it, thanks.

>> `org-export-with-timestamps-in-toc', if nil, would use this arg;
>> but users could remove anything from the headlines (and the TOC), 
>> not just from the TOC.
>>
>> And `org-export-with-timestamps' could be set to 'from-toc or
>> 'from-headline.  And we could extend `org-export-with-tags'
>> similarily.
>>
>> (I think `org-export-with-timestamps-in-toc' is better than
>> `org-export-remove-timestamps-from-toc' because `org-export-with'
>> is more widely used for the same purposes.)
>>
>> Just a suggestion for combining backward compatibility and adding
>> some flexibility thanks for the new engine.
>
> I have a patch ready with `org-export-with-timestamps-in-toc' variable,
> but as I was writing it, I realized it might not be necessary to apply
> it. I'd like to avoid over-engineering as much as possible, hence the
> question.

My concern is this: it would be nice to provide a simple way to get
rid of _anything_ (user defined) in headlines and TOC titles.

Actually, the org-export-with-* family contains two categories of
variables: those who are relevant for anything in the buffer, those
who are relevant for the headlines only.  Like these ones:

org-export-with-priority
org-export-with-statistics-cookies
org-export-with-todo-keywords
org-export-with-tags
org-export-with-section-numbers

I set aside the last one, which does not impact the text of the
headline itself, but the way it looks in the target format.

My suggestion is to get rid of these four headlines-only
org-export-with-* variable, and to replace them with

org-export-headline-format
org-export-headline-in-toc-format

with formatters to tell whether to include the TODO keyword, the tags,
the priority cookie, the statistics cookie, the headline text, etc.

And two generic options

org-export-headline-trim-regexp
org-export-headline-in-toc-trim-regexp

which the user can set to whatever he wants.

I think a formatting string for the headline is good as it is quite
intuitive for a vast majority of users.  And the -trim-regexp options
would be flexible enough to remove anything from the headlines.

Please *don't* implement this :)  I just need your gut feeling 
about org-export-headline-format as a formatting string, and if you
think it might be a good idea, I'm willing to help implementing it
(as I know it will change quite a lot of things in the machinery.)

Thanks,

-- 
 Bastien

  reply	other threads:[~2013-02-24  9:50 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-11 12:52 Exporter question Dominik, Carsten
2013-02-12 19:46 ` Nicolas Goaziou
2013-02-12 20:00   ` Carsten Dominik
2013-02-12 22:12     ` Nicolas Goaziou
2013-02-24  8:55     ` Nicolas Goaziou
2013-02-24  9:15       ` Bastien
2013-02-24  9:31         ` Nicolas Goaziou
2013-02-24  9:50           ` Bastien [this message]
2013-02-24 10:48       ` Carsten Dominik
2013-02-24 14:00         ` Nicolas Goaziou
2013-02-24 14:02           ` Carsten Dominik
2013-02-24 19:01         ` Bastien
2013-02-25 15:06           ` Nicolas Goaziou
2013-02-26 13:46             ` Bastien
2013-02-26 19:43               ` Aaron Ecay
2013-02-27 18:06                 ` Eric S Fraga
2013-02-26 23:12               ` Nicolas Goaziou
2013-02-27  8:53                 ` Bastien

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=87zjyu82hg.fsf@bzg.ath.cx \
    --to=bzg@altern.org \
    --cc=C.Dominik@uva.nl \
    --cc=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=n.goaziou@gmail.com \
    /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).