emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* footnote renumber bug
@ 2009-07-02  6:55 Andreas Roehler
  2009-07-02 11:44 ` Karl Maihofer
  2009-07-03 21:49 ` Carsten Dominik
  0 siblings, 2 replies; 16+ messages in thread
From: Andreas Roehler @ 2009-07-02  6:55 UTC (permalink / raw)
  To: emacs-orgmode Mailinglist


Hi,

after reopening a file with two footnotes inside,
inserting a third footnote between first and second, it
fails to renumber it.

below the test-buffer

Should I'm right so far --even seeing footnote reimplemented-- maybe have a look at

https://code.launchpad.net/~a-roehler/s-x-emacs-werkstatt/footnote-init.el

https://code.launchpad.net/~a-roehler/s-x-emacs-werkstatt/GNU-Emacs-footnote.diff

https://code.launchpad.net/~a-roehler/s-x-emacs-werkstatt/XEmacs-footnote.diff

Thanks all


Andreas Röhler

--
https://code.launchpad.net/s-x-emacs-werkstatt/
http://bazaar.launchpad.net/~a-roehler/python-mode/python-mode.el/

GNU Emacs 23.0.94.1 (i686-pc-linux-gnu, GTK+ Version 2.12.0) of 2009-05-25

;;;;;;;;;;;;;;;;;;;;;;;;

asdfs [fn:1]
[fnx:3]
sdfs
[fn:2]
* Footnotes

[fn:1] asdfs d

[fn:2] xdddd

[fn:3] dddd

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: footnote renumber bug
  2009-07-02  6:55 footnote renumber bug Andreas Roehler
@ 2009-07-02 11:44 ` Karl Maihofer
  2009-07-02 13:18   ` Andreas Röhler
  2009-07-03 21:49 ` Carsten Dominik
  1 sibling, 1 reply; 16+ messages in thread
From: Karl Maihofer @ 2009-07-02 11:44 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Andreas Roehler

Andreas Roehler schrieb:
> after reopening a file with two footnotes inside,
> inserting a third footnote between first and second, it
> fails to renumber it.

Did you try the new "C-u C-c C-x f S" feature of the latest git-version?
Org does not renumber footnotes automatically when they are inserted.
You have to use the command above to do that.

BTW: the third footnote marker in your example is "[fnx:3]". Shouldn't
it be just "[fn:3]"?

Karl

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: footnote renumber bug
  2009-07-02 11:44 ` Karl Maihofer
@ 2009-07-02 13:18   ` Andreas Röhler
  2009-07-02 15:48     ` Matthew Lundin
  0 siblings, 1 reply; 16+ messages in thread
From: Andreas Röhler @ 2009-07-02 13:18 UTC (permalink / raw)
  To: Karl Maihofer; +Cc: emacs-orgmode Mailinglist

Karl Maihofer wrote:
> Andreas Roehler schrieb:
>   
>> after reopening a file with two footnotes inside,
>> inserting a third footnote between first and second, it
>> fails to renumber it.
>>     
>
> Did you try the new "C-u C-c C-x f S" feature of the latest git-version?
>   

No. Just  check this feature for curiosity,  as I  dealt with that bug
at common footnote.el
 
> Org does not renumber footnotes automatically when they are inserted.
> You have to use the command above to do that.
>   

IMO a decent program should renumber automatically.
Patched footnote.el meanwhile does if called with footnote-init.
Unfortunately your footnote-machine is written fairly different from
footnote.el.
Otherwise I'd send a patch.



> BTW: the third footnote marker in your example is "[fnx:3]". Shouldn't
> it be just "[fn:3]"?
>   

Probably a typo caused by mail-writing.


Grüße

Andreas

> Karl
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>   

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: footnote renumber bug
  2009-07-02 13:18   ` Andreas Röhler
@ 2009-07-02 15:48     ` Matthew Lundin
  2009-07-02 16:05       ` Matthew Lundin
  2009-07-02 20:09       ` Andreas Röhler
  0 siblings, 2 replies; 16+ messages in thread
From: Matthew Lundin @ 2009-07-02 15:48 UTC (permalink / raw)
  To: Andreas Röhler; +Cc: emacs-orgmode Mailinglist

Andreas Röhler <andreas.roehler@easy-emacs.de> writes:

> Karl Maihofer wrote:
>> Andreas Roehler schrieb:
>>   
>>> after reopening a file with two footnotes inside,
>>> inserting a third footnote between first and second, it
>>> fails to renumber it.
>>>     
>>
>> Did you try the new "C-u C-c C-x f S" feature of the latest git-version?
>>   
>
> No. Just  check this feature for curiosity,  as I  dealt with that bug
> at common footnote.el
>  
>> Org does not renumber footnotes automatically when they are inserted.
>> You have to use the command above to do that.
>>   
>
> IMO a decent program should renumber automatically.
> Patched footnote.el meanwhile does if called with footnote-init.
> Unfortunately your footnote-machine is written fairly different from
> footnote.el.
> Otherwise I'd send a patch.
>

There is nothing preventing a user from using footnote.el (and your
patch) within org mode instead of the built in org-footnote-action.
Simply set up a hook to load footnote-mode for org files.

But the lack of automatic renumbering in org-footnote is *not* a bug.
Unlike footnote.el, org-mode views footnote notation primarily as
markup, not as some form of "final output." The source text simply
contains footnote markup, which can be exported as normalized footnotes.
And of course, at any point, user has the option of normalizing
footnotes in the source text if he/she so desires.

Footnote.el, by contrast, was designed for short email messages in which
there is no distinction between source text and exported text. Though it
serves this limited purpose admirably, it offers only a very rudimentary
numbering system rather than a complete markup solution. For any complex
writing (e.g., a research paper with dozens of footnotes), footnote.el
is well-nigh impossible to use. There are simply too many chances of
broken or mixed up links.

Org-mode's handling of footnotes is considerably more robust. Several
different types of footnote styles are available:

 - numbered[1]

 - labeled[fn:label]

 - inline[fn::Here is an inline footnote.]

Footnotes:

[1] Numbered

[fn:label] Here is a labeled footnote. 

------

All of these can be mixed together in the same document. Upon export to
pdf, ascii, or html they will be properly sorted and numbered, but the
labels in the source will remain the same, ensuring that the source text
remains *exactly* as the user wants it to be. 

At any point, however, the user can sort and/or renumber the footnotes
in the source text. For instance, the footnotes above can very quickly
and easily converted to the following:

,----
|
|  - numbered[1]
| 
|  - labeled[2]
| 
|  - inline[3]
| 
| Footnotes:
| 
| [1] Numbered
| 
| [2] Here is a labeled footnote.
| 
| [3] Here is an inline footnote.
`----

The key here, however, is that the process is completely under the
user's control. Footnotes will not be sorted or reorganized in the
source text unless the user desires it. In my view, this is the proper
behavior for a robust markup system. The whole point of markup is to
avoid the sorts of automated, global alterations of the source text that
are characteristic of word-processors.

With labeled footnotes in org-footnote, I can rearrange my text and rest
assured that none of my footnote links will be broken. And if I delete a
footnote reference without deleting its corresponding definition (or
vice-versa), org-mode will alert me to the problem when I export or sort
the footnotes.

All this is to explain why the lack of automatic renumbering is *not* a
bug. And of course, anyone who prefers a different behavior can easily
use footnote.el instead.

Regards,
Matt

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: footnote renumber bug
  2009-07-02 15:48     ` Matthew Lundin
@ 2009-07-02 16:05       ` Matthew Lundin
  2009-07-02 20:09       ` Andreas Röhler
  1 sibling, 0 replies; 16+ messages in thread
From: Matthew Lundin @ 2009-07-02 16:05 UTC (permalink / raw)
  To: Matthew Lundin; +Cc: emacs-orgmode Mailinglist

Matthew Lundin <mdl@imapmail.org> writes:

> Andreas Röhler <andreas.roehler@easy-emacs.de> writes:
>
>> Karl Maihofer wrote:
>>> Andreas Roehler schrieb:
>>>   
>>>> after reopening a file with two footnotes inside,
>>>> inserting a third footnote between first and second, it
>>>> fails to renumber it.
>>>>     

A follow up to my previous email: Though org-mode does not automatically
renumber footnotes, it does a fantastic job of detecting footnotes that
already exist in a file and creating uniquely numbered footnote IDs for
each new footnote. For this one needs either of the following settings:

(setq org-footnote-auto-label t)

or

(setq org-footnote-auto-label 'plain)

Best,
Matt

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: footnote renumber bug
  2009-07-02 15:48     ` Matthew Lundin
  2009-07-02 16:05       ` Matthew Lundin
@ 2009-07-02 20:09       ` Andreas Röhler
  2009-07-02 21:53         ` Matthew Lundin
  1 sibling, 1 reply; 16+ messages in thread
From: Andreas Röhler @ 2009-07-02 20:09 UTC (permalink / raw)
  To: Matthew Lundin; +Cc: emacs-orgmode Mailinglist

Matthew Lundin wrote:
> Andreas Röhler <andreas.roehler@easy-emacs.de> writes:
>
>   
>> Karl Maihofer wrote:
>>     
>>> Andreas Roehler schrieb:
>>>   
>>>       
>>>> after reopening a file with two footnotes inside,
>>>> inserting a third footnote between first and second, it
>>>> fails to renumber it.
>>>>     
>>>>         
>>> Did you try the new "C-u C-c C-x f S" feature of the latest git-version?
>>>   
>>>       
>> No. Just  check this feature for curiosity,  as I  dealt with that bug
>> at common footnote.el
>>  
>>     
>>> Org does not renumber footnotes automatically when they are inserted.
>>> You have to use the command above to do that.
>>>   
>>>       
>> IMO a decent program should renumber automatically.
>> Patched footnote.el meanwhile does if called with footnote-init.
>> Unfortunately your footnote-machine is written fairly different from
>> footnote.el.
>> Otherwise I'd send a patch.
>>
>>     
>
> There is nothing preventing a user from using footnote.el (and your
> patch) within org mode instead of the built in org-footnote-action.
> Simply set up a hook to load footnote-mode for org files.
>
> But the lack of automatic renumbering in org-footnote is *not* a bug.
> Unlike footnote.el, org-mode views footnote notation primarily as
> markup, not as some form of "final output." The source text simply
> contains footnote markup, which can be exported as normalized footnotes.
> And of course, at any point, user has the option of normalizing
> footnotes in the source text if he/she so desires.
>
> Footnote.el, by contrast, was designed for short email messages in which
> there is no distinction between source text and exported text. Though it
> serves this limited purpose admirably, it offers only a very rudimentary
> numbering system rather than a complete markup solution. For any complex
> writing (e.g., a research paper with dozens of footnotes), footnote.el
> is well-nigh impossible to use. There are simply too many chances of
> broken or mixed up links.
>   

Hi Matthew,

thanks for you explanation. As often several solutions are possible and
different people choose different options.

Ignoring the guts of org-modes footnote implementation, just my impression
of footnote.el:

it's fine by architecture and --if patched-- well capable for all things
you want to do with footnotes.
Can't see any limitation concerning larger texts.
It simply wasn't --or isn't-- written to the end.


> Org-mode's handling of footnotes is considerably more robust. Several
> different types of footnote styles are available:
>
>  - numbered[1]
>
>  - labeled[fn:label]
>
>  - inline[fn::Here is an inline footnote.]
>
> Footnotes:
>
> [1] Numbered
>
> [fn:label] Here is a labeled footnote. 
>
> ------
>
>   

> All of these can be mixed together in the same document. Upon export to
> pdf, ascii, or html they will be properly sorted and numbered, but the
> labels in the source will remain the same, ensuring that the source text
> remains *exactly* as the user wants it to be. 
>
> At any point, however, the user can sort and/or renumber the footnotes
> in the source text. For instance, the footnotes above can very quickly
> and easily converted to the following:
>
> ,----
> |
> |  - numbered[1]
> | 
> |  - labeled[2]
> | 
> |  - inline[3]
> | 
> | Footnotes:
> | 
> | [1] Numbered
> | 
> | [2] Here is a labeled footnote.
> | 
> | [3] Here is an inline footnote.
> `----
>   

Transformation looks interesting indeed.
Should  org-modes  footnote  better  fit my  purposes,  I'll not
hesitate to use it.


Andreas

> The key here, however, is that the process is completely under the
> user's control. Footnotes will not be sorted or reorganized in the
> source text unless the user desires it. In my view, this is the proper
> behavior for a robust markup system. The whole point of markup is to
> avoid the sorts of automated, global alterations of the source text that
> are characteristic of word-processors.
>
> With labeled footnotes in org-footnote, I can rearrange my text and rest
> assured that none of my footnote links will be broken. And if I delete a
> footnote reference without deleting its corresponding definition (or
> vice-versa), org-mode will alert me to the problem when I export or sort
> the footnotes.
>
> All this is to explain why the lack of automatic renumbering is *not* a
> bug. And of course, anyone who prefers a different behavior can easily
> use footnote.el instead.
>
> Regards,
> Matt
>
>
>
>   

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: footnote renumber bug
  2009-07-02 20:09       ` Andreas Röhler
@ 2009-07-02 21:53         ` Matthew Lundin
  2009-07-03  8:36           ` Scot Becker
  0 siblings, 1 reply; 16+ messages in thread
From: Matthew Lundin @ 2009-07-02 21:53 UTC (permalink / raw)
  To: Andreas Röhler; +Cc: emacs org-mode mailing list

Hi Andreas,

Andreas Röhler <andreas.roehler@easy-emacs.de> writes:

> Matthew Lundin wrote:
>> Footnote.el, by contrast, was designed for short email messages in which
>> there is no distinction between source text and exported text. Though it
>> serves this limited purpose admirably, it offers only a very rudimentary
>> numbering system rather than a complete markup solution. For any complex
>> writing (e.g., a research paper with dozens of footnotes), footnote.el
>> is well-nigh impossible to use. There are simply too many chances of
>> broken or mixed up links.
>>   
>
> Ignoring the guts of org-modes footnote implementation, just my impression
> of footnote.el:
>
> it's fine by architecture and --if patched-- well capable for all things
> you want to do with footnotes.
> Can't see any limitation concerning larger texts.
> It simply wasn't --or isn't-- written to the end.

Thanks for the clarification. Reading over my email, I believe I may
stated some conclusions about footnote.el too strongly. What I should
have said is that *in my own experience* I have found footnote.el
difficult to use (in its pre-patched form, of course). 

Try as I might, I could never get Footnote-renumber-footnotes to do
anything. And if I moved any footnotes in the original text, deleted
them manually, or reopened a document with footnotes,
Footnote-add-footnote behaved unpredictably, creating duplicate numbers,
skipping numbers, putting footnotes in the wrong order, placing
footnotes randomly above and below the "Footnotes:" line, etc. 

Very likely, my issues with footnote.el were due to my own lack of
understanding of its mechanics, and I can see how your patch fixes
things up quite a bit. It will be a really nice contribution to emacs if
footnote.el is fixed, since modes such as Muse rely on it.

Also, my apologies for a somewhat wordy defense of org-footnote. I wrote
it only because I am a very big fan. :)

Regards,
Matt

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Re: footnote renumber bug
  2009-07-02 21:53         ` Matthew Lundin
@ 2009-07-03  8:36           ` Scot Becker
  2009-07-03 12:08             ` Andreas Röhler
  0 siblings, 1 reply; 16+ messages in thread
From: Scot Becker @ 2009-07-03  8:36 UTC (permalink / raw)
  To: Matthew Lundin; +Cc: emacs org-mode mailing list

Matthew,

No apologies needed.  A good explanation like yours is a valuable
thing to have sitting in the mailing list archive (and perhaps even in
a more formal spot, in the Worg article: "Academic writing with Org,"
which I will someday help you write.)

Scot


On Thu, Jul 2, 2009 at 10:53 PM, Matthew Lundin<mdl@imapmail.org> wrote:
> Hi Andreas,
>
> Andreas Röhler <andreas.roehler@easy-emacs.de> writes:
>
>> Matthew Lundin wrote:
>>> Footnote.el, by contrast, was designed for short email messages in which
>>> there is no distinction between source text and exported text. Though it
>>> serves this limited purpose admirably, it offers only a very rudimentary
>>> numbering system rather than a complete markup solution. For any complex
>>> writing (e.g., a research paper with dozens of footnotes), footnote.el
>>> is well-nigh impossible to use. There are simply too many chances of
>>> broken or mixed up links.
>>>
>>
>> Ignoring the guts of org-modes footnote implementation, just my impression
>> of footnote.el:
>>
>> it's fine by architecture and --if patched-- well capable for all things
>> you want to do with footnotes.
>> Can't see any limitation concerning larger texts.
>> It simply wasn't --or isn't-- written to the end.
>
> Thanks for the clarification. Reading over my email, I believe I may
> stated some conclusions about footnote.el too strongly. What I should
> have said is that *in my own experience* I have found footnote.el
> difficult to use (in its pre-patched form, of course).
>
> Try as I might, I could never get Footnote-renumber-footnotes to do
> anything. And if I moved any footnotes in the original text, deleted
> them manually, or reopened a document with footnotes,
> Footnote-add-footnote behaved unpredictably, creating duplicate numbers,
> skipping numbers, putting footnotes in the wrong order, placing
> footnotes randomly above and below the "Footnotes:" line, etc.
>
> Very likely, my issues with footnote.el were due to my own lack of
> understanding of its mechanics, and I can see how your patch fixes
> things up quite a bit. It will be a really nice contribution to emacs if
> footnote.el is fixed, since modes such as Muse rely on it.
>
> Also, my apologies for a somewhat wordy defense of org-footnote. I wrote
> it only because I am a very big fan. :)
>
> Regards,
> Matt
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Re: footnote renumber bug
  2009-07-03  8:36           ` Scot Becker
@ 2009-07-03 12:08             ` Andreas Röhler
  2009-07-03 14:17               ` Paul R
  2009-07-03 14:42               ` Matthew Lundin
  0 siblings, 2 replies; 16+ messages in thread
From: Andreas Röhler @ 2009-07-03 12:08 UTC (permalink / raw)
  To: Scot Becker; +Cc: Matthew Lundin, emacs-orgmode Mailinglist

Scot Becker wrote:
> Matthew,
>
> No apologies needed.  A good explanation like yours is a valuable
> thing to have sitting in the mailing list archive (and perhaps even in
> a more formal spot, in the Worg article: "Academic writing with Org,"
> which I will someday help you write.)
>
> Scot
>   

Hi Scot,

you are completely right. But there was not delivered a serious apology.

That's been pure rhetoric formula out of courtesy.
At least that's what I understood not being a native english speaker.

Seeing the danger of raising flame-wars,
which we have seen at several occasions, consider that rather a
 recommendable style.


Cheers

Andreas

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: footnote renumber bug
  2009-07-03 12:08             ` Andreas Röhler
@ 2009-07-03 14:17               ` Paul R
  2009-07-03 14:51                 ` Andreas Röhler
  2009-07-03 14:42               ` Matthew Lundin
  1 sibling, 1 reply; 16+ messages in thread
From: Paul R @ 2009-07-03 14:17 UTC (permalink / raw)
  To: Andreas Röhler; +Cc: Matthew Lundin, emacs-orgmode Mailinglist

Hi Andreas and org-mode users,

Andreas> Seeing the danger of raising flame-wars, which we have seen at
Andreas> several occasions, consider that rather a recommendable style.

Thank you Andreas for your recommandations, but please let me point out
that debate on this list has been so far particulary friendly and
constructive, and I don't forsee such a flamewar threat. The incredible
capacity of org-mode to evolve and integrate new concepts reflect - and
demonstrates if needed - the openess of Carsten and the whole community.

Therefore I'd say that taking inspiration from the archive might be the
best way to keep this friendly and productive atmosphere on the list.

greetings,

-- 
  Paul

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: footnote renumber bug
  2009-07-03 12:08             ` Andreas Röhler
  2009-07-03 14:17               ` Paul R
@ 2009-07-03 14:42               ` Matthew Lundin
  1 sibling, 0 replies; 16+ messages in thread
From: Matthew Lundin @ 2009-07-03 14:42 UTC (permalink / raw)
  To: Andreas Röhler; +Cc: Matthew Lundin, emacs-orgmode Mailinglist

> Scot Becker wrote:
>> Matthew,
>>
>> No apologies needed.  A good explanation like yours is a valuable
>> thing to have sitting in the mailing list archive (and perhaps even in
>> a more formal spot, in the Worg article: "Academic writing with Org,"
>> which I will someday help you write.)
>>
Scot:

Yes indeed. I would be delighted to collaborate on a Worg page on
academic writing. Org-mode has been such a helpful tool for my own work
that I would very much like to share the tips and tricks I've discovered
over the past year.

Andreas Röhler <andreas.roehler@easy-emacs.de> writes:

> Hi Scot,
>
> you are completely right. But there was not delivered a serious apology.
>
> That's been pure rhetoric formula out of courtesy.
> At least that's what I understood not being a native english speaker.
>
> Seeing the danger of raising flame-wars,
> which we have seen at several occasions, consider that rather a
>  recommendable style.
>

Andreas:

Right! I wanted to avoid any impression that I was trying to start a
flame war between org-footnote and footnote.el. The fact that emacs has
two powerful footnote mechanisms is a testimony to the versatility of
the editor and the strength of the emacs community.

Goodness knows, there are far too many flame wars already, and we emacs
folk need to stick together![1]

Best,
Matt

Footnotes:

[1] Besides, everyone knows that both org-footnote and footnote.el can
run circles around anything "that other editor" is capable of. ;)

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: footnote renumber bug
  2009-07-03 14:17               ` Paul R
@ 2009-07-03 14:51                 ` Andreas Röhler
  0 siblings, 0 replies; 16+ messages in thread
From: Andreas Röhler @ 2009-07-03 14:51 UTC (permalink / raw)
  To: Paul R; +Cc: Matthew Lundin, emacs-orgmode Mailinglist

Paul R wrote:
> Hi Andreas and org-mode users,
>
> Andreas> Seeing the danger of raising flame-wars, which we have seen at
> Andreas> several occasions, consider that rather a recommendable style.
>
> Thank you Andreas for your recommandations, but please let me point out
> that debate on this list has been so far particulary friendly and
> constructive, and I don't forsee such a flamewar threat.

Nor do I. Thats a purely abstract remark.

Nonetheless, having a look at Emacs history, you'll see that abstract
danger taking shape at several occasions.

I'm not going to blame any person, part or side for it.
It's a complex problem with human collaboration, which you
will encounter in human history again and again.

>  The incredible
> capacity of org-mode to evolve and integrate new concepts reflect - and
> demonstrates if needed - the openess of Carsten and the whole community.
>
>   

Congratulations BTW concerning your astonishing work.

> Therefore I'd say that taking inspiration from the archive might be the
> best way to keep this friendly and productive atmosphere on the list.
>
> greetings,
>
>   

Agreed, greetings back

Andreas

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: footnote renumber bug
  2009-07-02  6:55 footnote renumber bug Andreas Roehler
  2009-07-02 11:44 ` Karl Maihofer
@ 2009-07-03 21:49 ` Carsten Dominik
  2009-07-04  8:02   ` Andreas Roehler
  1 sibling, 1 reply; 16+ messages in thread
From: Carsten Dominik @ 2009-07-03 21:49 UTC (permalink / raw)
  To: Andreas Roehler; +Cc: emacs-orgmode Mailinglist


On Jul 2, 2009, at 8:55 AM, Andreas Roehler wrote:

>
> Hi,
>
> after reopening a file with two footnotes inside,
> inserting a third footnote between first and second, it
> fails to renumber it.
>
> below the test-buffer
>
> Should I'm right so far --even seeing footnote reimplemented-- maybe  
> have a look at
>
> https://code.launchpad.net/~a-roehler/s-x-emacs-werkstatt/footnote- 
> init.el
>
> https://code.launchpad.net/~a-roehler/s-x-emacs-werkstatt/GNU-Emacs- 
> footnote.diff
>
> https://code.launchpad.net/~a-roehler/s-x-emacs-werkstatt/XEmacs- 
> footnote.diff
>
> Thanks all
>
>
> Andreas Röhler

Hi Andreas,

you are the author of footnote-init.el, right?  That was an important
fix for footnote.el to make it usable for more than one-off documents.

Let me re-enforce a few things that have already come up here,
mainly in Matt's post.

Org-mode started out using footnote.el, which I think is an
excellent package for its original purpose - footnotes in emails.

But after a lengthy discussion here on the list which you can
find in the archive, I implemented a different mechanism.

The main reasons were to allow for named footnotes and, most
importantly, inline footnotes.  These are very helpful
when you are building documents using cut and paste,
which is where footnote.el fails.

Org did not implement automatic renumbering and sorting because
it makes less sense to do so if footnotes are inline, or named
and referenced multiple times.

I can see that, when using footnotes in an isolated
small document and automatic footnote lable generation,
automatic renumbering and sorting is indeed useful.

In this case, you could fall back to footnote.el.
However, Org does internally have functions to sort
and renumber footnotes, so there is no reason why we could
not call them after generating or deleting a note.
Lets see ... OK,  in the latest git version of Org, use

    (setq org-footnote-auto-adjust t)

On a per-file basis you can also turn this on and off with

#+STARTUP: fnadjust
#+STARTUP: nofnadjust

HTH

- Carsten








>
> --
> https://code.launchpad.net/s-x-emacs-werkstatt/
> http://bazaar.launchpad.net/~a-roehler/python-mode/python-mode.el/
>
> GNU Emacs 23.0.94.1 (i686-pc-linux-gnu, GTK+ Version 2.12.0) of  
> 2009-05-25
>
> ;;;;;;;;;;;;;;;;;;;;;;;;
>
> asdfs [fn:1]
> [fnx:3]
> sdfs
> [fn:2]
> * Footnotes
>
> [fn:1] asdfs d
>
> [fn:2] xdddd
>
> [fn:3] dddd
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: footnote renumber bug
  2009-07-03 21:49 ` Carsten Dominik
@ 2009-07-04  8:02   ` Andreas Roehler
  2009-07-04 20:30     ` Matthew Lundin
  0 siblings, 1 reply; 16+ messages in thread
From: Andreas Roehler @ 2009-07-04  8:02 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode Mailinglist

Carsten Dominik wrote:
> 
> On Jul 2, 2009, at 8:55 AM, Andreas Roehler wrote:
> 
>>
>> Hi,
>>
>> after reopening a file with two footnotes inside,
>> inserting a third footnote between first and second, it
>> fails to renumber it.
>>
>> below the test-buffer
>>
>> Should I'm right so far --even seeing footnote reimplemented-- maybe
>> have a look at
>>
>> https://code.launchpad.net/~a-roehler/s-x-emacs-werkstatt/footnote-init.el
>>
>>
>> https://code.launchpad.net/~a-roehler/s-x-emacs-werkstatt/GNU-Emacs-footnote.diff
>>
>>
>> https://code.launchpad.net/~a-roehler/s-x-emacs-werkstatt/XEmacs-footnote.diff
>>
>>
>> Thanks all
>>
>>
>> Andreas Röhler
> 
> Hi Andreas,
> 
> you are the author of footnote-init.el, right?  That was an important
> fix for footnote.el to make it usable for more than one-off documents.
>

Thanks.  A hundred fold flowers back for writing org-node :)

> Let me re-enforce a few things that have already come up here,
> mainly in Matt's post.
> 
> Org-mode started out using footnote.el, which I think is an
> excellent package for its original purpose - footnotes in emails.
> 
> But after a lengthy discussion here on the list which you can
> find in the archive, I implemented a different mechanism.
> 
> The main reasons were to allow for named footnotes and, most
> importantly, inline footnotes.  These are very helpful
> when you are building documents using cut and paste,
> which is where footnote.el fails.
> 


Yes, inline footnotes seem very useful indeed.



> Org did not implement automatic renumbering and sorting because
> it makes less sense to do so if footnotes are inline, or named
> and referenced multiple times.
> 

IMHO renumbering should be able to cope with all this circumstances.
With named footnotes "renumbering" might no longer be the appropriate
 term then...


> I can see that, when using footnotes in an isolated
> small document and automatic footnote lable generation,
> automatic renumbering and sorting is indeed useful.
> 
> In this case, you could fall back to footnote.el.
> However, Org does internally have functions to sort
> and renumber footnotes, so there is no reason why we could
> not call them after generating or deleting a note.
> Lets see ... OK,  in the latest git version of Org, use
> 
>    (setq org-footnote-auto-adjust t)
>

My suggestion:
Make it cope with inline, named and referenced multiple notes;
then set it to t by default.


> On a per-file basis you can also turn this on and off with
> 
> #+STARTUP: fnadjust
> #+STARTUP: nofnadjust
> 
> HTH
> 
> - Carsten
> 



Thanks a lot caring for the issue.


Andreas


> 
> 
> 
> 
> 
> 
> 
>>
>> -- 
>> https://code.launchpad.net/s-x-emacs-werkstatt/
>> http://bazaar.launchpad.net/~a-roehler/python-mode/python-mode.el/
>>
>> GNU Emacs 23.0.94.1 (i686-pc-linux-gnu, GTK+ Version 2.12.0) of
>> 2009-05-25
>>
>> ;;;;;;;;;;;;;;;;;;;;;;;;
>>
>> asdfs [fn:1]
>> [fnx:3]
>> sdfs
>> [fn:2]
>> * Footnotes
>>
>> [fn:1] asdfs d
>>
>> [fn:2] xdddd
>>
>> [fn:3] dddd
>>
>>
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Remember: use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
> 
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: footnote renumber bug
  2009-07-04  8:02   ` Andreas Roehler
@ 2009-07-04 20:30     ` Matthew Lundin
  2009-07-05 20:31       ` Carsten Dominik
  0 siblings, 1 reply; 16+ messages in thread
From: Matthew Lundin @ 2009-07-04 20:30 UTC (permalink / raw)
  To: Andreas Roehler; +Cc: emacs-orgmode Mailinglist, Carsten Dominik

Andreas Roehler <andreas.roehler@online.de> writes:
> Carsten Dominik wrote:
>> 
>> On Jul 2, 2009, at 8:55 AM, Andreas Roehler wrote:
>> 
>
>> Org did not implement automatic renumbering and sorting because
>> it makes less sense to do so if footnotes are inline, or named
>> and referenced multiple times.
>> 
> IMHO renumbering should be able to cope with all this circumstances.
> With named footnotes "renumbering" might no longer be the appropriate
> term then...

I believe already Carsten built this feature into
org-footnote-auto-adjust. If turned on, it automatically renumbers
footnotes with automatic labels (fn:1) and sorts footnotes with custom
labels. Also, in addition to nil and t, you can also set the variable to
"sort" or "renumber". E.g.,

(setq org-footnote-auto-adjust 'sort)

With this setting, org-mode will still automatically sort your footnotes
in the order in which they appear in the document but will not renumber
them.

(BTW, thanks, as always, Carsten for such a flexible implementation of
this new feature. Astonishing!)

>> I can see that, when using footnotes in an isolated
>> small document and automatic footnote lable generation,
>> automatic renumbering and sorting is indeed useful.
>> 
>> In this case, you could fall back to footnote.el.
>> However, Org does internally have functions to sort
>> and renumber footnotes, so there is no reason why we could
>> not call them after generating or deleting a note.
>> Lets see ... OK,  in the latest git version of Org, use
>> 
>>    (setq org-footnote-auto-adjust t)
>>
>
> My suggestion:
> Make it cope with inline, named and referenced multiple notes;
> then set it to t by default.

I tested it, and it already copes with a mix of numbered, inline, and
named footnotes. Here are some settings that might be used to provide
maximum flexibility for working with all sorts of footnote labels:

(setq org-footnote-auto-label 'confirm    ;; [1]
      org-footnote-auto-adjust t          ;; [2]
      org-footnote-define-inline nil)     ;; [3]

[1] Offers a prompt with automatic labels, e.g. fn:1, but gives the user
the option of changing the label or leaving it blank for an inline
footnote.

[2] From my preliminary testing, I discovered that setting this to t
means that org-mode will (a) automatically renumber footnotes with the
fn:1 style notation; (b) automatically sort both named and numbered
footnotes to match their order in the text; and (c) leave inline
footnotes alone.

[3] This is the default setting, but I included it here for the purposes
of example. 

    - Note: If one uses inline footnotes with automatic labels[fn:1:
      Such as this footnote], the labels will be renumbered to match
      their order in the text. Obviously, sorting would be irrelevant in
      such an instance.

I have mixed feelings about turning on automatic renumbering by default.
I think the key issue would be whether doing so would cause any problems
or unnecessary overhead for people who do not use auto labels or who
prefer unlabeled inline footnotes. Although it's probably trivial, if
automatic renumbering were the default behavior, org-footnote-action
would alter the buffer globally without the user explicitly requesting
or permitting it---or even being aware of it.

Then again, those who use org-footnote-action heavily would likely
customize this variable themselves. Perhaps auto-renumbering could be
the default behavior if and only if auto-labeling is turned on.

Obviously, this decision is in Carsten's hands.

Best,
Matt

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: footnote renumber bug
  2009-07-04 20:30     ` Matthew Lundin
@ 2009-07-05 20:31       ` Carsten Dominik
  0 siblings, 0 replies; 16+ messages in thread
From: Carsten Dominik @ 2009-07-05 20:31 UTC (permalink / raw)
  To: Matthew Lundin; +Cc: emacs-orgmode Mailinglist, Andreas Roehler


On Jul 4, 2009, at 10:30 PM, Matthew Lundin wrote:

> Andreas Roehler <andreas.roehler@online.de> writes:
>> Carsten Dominik wrote:
>>>
>>> On Jul 2, 2009, at 8:55 AM, Andreas Roehler wrote:
>>>
>>
>>> Org did not implement automatic renumbering and sorting because
>>> it makes less sense to do so if footnotes are inline, or named
>>> and referenced multiple times.
>>>
>> IMHO renumbering should be able to cope with all this circumstances.
>> With named footnotes "renumbering" might no longer be the appropriate
>> term then...
>
> I believe already Carsten built this feature into
> org-footnote-auto-adjust. If turned on, it automatically renumbers
> footnotes with automatic labels (fn:1) and sorts footnotes with custom
> labels. Also, in addition to nil and t, you can also set the  
> variable to
> "sort" or "renumber". E.g.,
>
> (setq org-footnote-auto-adjust 'sort)
>
> With this setting, org-mode will still automatically sort your  
> footnotes
> in the order in which they appear in the document but will not  
> renumber
> them.
>
> (BTW, thanks, as always, Carsten for such a flexible implementation of
> this new feature. Astonishing!)
>
>>> I can see that, when using footnotes in an isolated
>>> small document and automatic footnote lable generation,
>>> automatic renumbering and sorting is indeed useful.
>>>
>>> In this case, you could fall back to footnote.el.
>>> However, Org does internally have functions to sort
>>> and renumber footnotes, so there is no reason why we could
>>> not call them after generating or deleting a note.
>>> Lets see ... OK,  in the latest git version of Org, use
>>>
>>>   (setq org-footnote-auto-adjust t)
>>>
>>
>> My suggestion:
>> Make it cope with inline, named and referenced multiple notes;
>> then set it to t by default.
>
> I tested it, and it already copes with a mix of numbered, inline, and
> named footnotes. Here are some settings that might be used to provide
> maximum flexibility for working with all sorts of footnote labels:
>
> (setq org-footnote-auto-label 'confirm    ;; [1]
>      org-footnote-auto-adjust t          ;; [2]
>      org-footnote-define-inline nil)     ;; [3]
>
> [1] Offers a prompt with automatic labels, e.g. fn:1, but gives the  
> user
> the option of changing the label or leaving it blank for an inline
> footnote.
>
> [2] From my preliminary testing, I discovered that setting this to t
> means that org-mode will (a) automatically renumber footnotes with the
> fn:1 style notation; (b) automatically sort both named and numbered
> footnotes to match their order in the text; and (c) leave inline
> footnotes alone.
>
> [3] This is the default setting, but I included it here for the  
> purposes
> of example.
>
>    - Note: If one uses inline footnotes with automatic labels[fn:1:
>      Such as this footnote], the labels will be renumbered to match
>      their order in the text. Obviously, sorting would be irrelevant  
> in
>      such an instance.
>
> I have mixed feelings about turning on automatic renumbering by  
> default.
> I think the key issue would be whether doing so would cause any  
> problems
> or unnecessary overhead for people who do not use auto labels or who
> prefer unlabeled inline footnotes. Although it's probably trivial, if
> automatic renumbering were the default behavior, org-footnote-action
> would alter the buffer globally without the user explicitly requesting
> or permitting it---or even being aware of it.

I am hesitating too.  The reason for this is that Org can collect
footnotes into a special section, or leave them locally.
Before Org kicks the the footnotes into some place which
may or may not be the place a user intended, it is OK to learn
about the options and set them.

Maybe a FAQ entry about these issues would be helpful.... ?

- Carsten

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2009-07-05 20:31 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-02  6:55 footnote renumber bug Andreas Roehler
2009-07-02 11:44 ` Karl Maihofer
2009-07-02 13:18   ` Andreas Röhler
2009-07-02 15:48     ` Matthew Lundin
2009-07-02 16:05       ` Matthew Lundin
2009-07-02 20:09       ` Andreas Röhler
2009-07-02 21:53         ` Matthew Lundin
2009-07-03  8:36           ` Scot Becker
2009-07-03 12:08             ` Andreas Röhler
2009-07-03 14:17               ` Paul R
2009-07-03 14:51                 ` Andreas Röhler
2009-07-03 14:42               ` Matthew Lundin
2009-07-03 21:49 ` Carsten Dominik
2009-07-04  8:02   ` Andreas Roehler
2009-07-04 20:30     ` Matthew Lundin
2009-07-05 20:31       ` Carsten Dominik

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