emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rasmus <rasmus@gmx.us>
To: emacs-orgmode@gnu.org
Subject: Re: [patch, ox] Unnumbered headlines
Date: Sun, 21 Sep 2014 22:13:46 +0200	[thread overview]
Message-ID: <87tx4020lh.fsf@gmx.us> (raw)
In-Reply-To: 87ppeon4mw.fsf@nicolasgoaziou.fr

Hi Nicolas,

Thanks for the comments.

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

>> Okay, I returned to my first hack (which never made it to this list).
>> Basically, I ID everything.  Unnumbered sections get the id
>> "unnumbered-sec-COUNTER" and numbered sections get the id
>> "sec-COUNTER".
>> Perhaps you will find it too much of a hack.
> I don't think it is a hack. I am just pointing out that how we refer
> internally to headlines has an effect on output clarity. I let you
> strike a balance between clarity and easiness of implementation. Note
> that the internal reference can be a bit cryptic (e.g. num-1-1 and
> nonum-2).

With the last patch it gets weird when you have mixed trees, like this:

    * numbered
    ** unnumbered 

The LaTeX output is:


Perhaps it would be nicer to use a single counter rather than two?
Right now, this

    * numbered1
    * unnumbered2 
    * numbered2
    * unnumbered2



But perhaps this is nicer?


In particular for mixed, nested trees. 

>>> At the moment, referring to an unnumbered section displays its name.
>> In some modes, yes.  In LaTeX it produces a \ref{·} that LaTeX will
>> laugh at.
> This is incorrect.
>   #+options: num:nil
>   * Headline
>     :CUSTOM_ID: test
>     :END:
>     This is a link to [[#test]].
> will produce
>   \section*{Headline}
>   \label{sec-1}
>   This is a link to \hyperref[sec-1]{Headline}.

Is *my statement* incorrect or is the current *output* incorrect?

On my PC, when I refer to an unnumbered headline I get
\ref{UNNUMBERED}, but since it's after a \section* it will produce
nothing or a subsequent element.  But I *did* forget to try the patch
with emacs -q and maybe that's why I'm not seeing \hyperref's. . .

>> If you have a better idea than using the title I'm all ears!
> On the contrary, using the title is what is usually done. I'm all for
> it.

To be clear: you are happy if it uses the \hyperref[·]{·} in LaTeX,
but not \ref{·} for unnumbered?

>>> Comparing symbols with `equal' is a sin beyond redemption. Use `eq'.
>> Why, out of curiosity?  I though equal was like the meaner, tougher
>> eq, that gets shit right, but is a bit more expensive.
> This is about using the right tool for the job. Unless you mess with the
> obarray, two symbols with the same name are guaranteed to be `eq'.
> There's really no reason to use anything else.



And I faced endless streams of vendor-approved Ikea furniture. . .

  reply	other threads:[~2014-09-21 20:14 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-08 13:39 [patch, ox] Unnumbered headlines Rasmus
2014-08-08 22:35 ` Alan L Tyree
2014-08-09  1:04 ` [patch, ox] Unnumbered headlines - early test Alan L Tyree
2014-08-09  7:47 ` [patch, ox] Unnumbered headlines Detlef Steuer
2014-08-11 14:18 ` Nicolas Goaziou
2014-08-11 15:37   ` Rasmus
2014-08-12  8:58     ` Nicolas Goaziou
2014-09-20 16:02       ` Rasmus
2014-09-20 20:34         ` Alan L Tyree
2014-09-21 13:12         ` Nicolas Goaziou
2014-09-21 14:37           ` Rasmus
2014-09-21 19:40             ` Nicolas Goaziou
2014-09-21 20:13               ` Rasmus [this message]
2014-09-22 15:53                 ` Nicolas Goaziou
2014-09-23  0:35                   ` Rasmus
2014-09-23  1:10                     ` Thomas S. Dye
2014-09-26  7:51                     ` Nicolas Goaziou
2014-09-26 13:48                       ` Rasmus
2014-09-27  8:19                         ` Nicolas Goaziou
2014-09-30 22:54                       ` Rasmus
2014-10-02  0:35                         ` Rasmus
2014-10-03  7:56                         ` Nicolas Goaziou
2014-10-03  8:49                           ` Sebastien Vauban
2014-10-03 10:26                           ` Rasmus
2014-10-03 20:14                             ` Nicolas Goaziou
2014-10-03 20:31                               ` Rasmus
2014-10-05  8:06                                 ` Nicolas Goaziou

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:

  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=87tx4020lh.fsf@gmx.us \
    --to=rasmus@gmx.us \
    --cc=emacs-orgmode@gnu.org \


* 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


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).