Re: Numbered footnotes in the manual interfere with diff (was: Dates in headlines)

2022-10-05 Thread Ihor Radchenko
Ihor Radchenko  writes:

> Ihor Radchenko  writes:
>
>>> https://orgmode.org/manual/Handling-Links.html#FOOT28
>>
>> Unless I miss something, this footnote is plain wrong. The timestamps
>> are not removed. At least not when I run M-x org-store-link on a
>> headline with timestamp with emacs -Q.
>
> I think we should just remove this footnote.

Done on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=5adde9f3fed4e0d1003860002f21c827276f1d19

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



Re: Numbered footnotes in the manual interfere with diff

2022-10-04 Thread Bastien
Ihor Radchenko  writes:

> Done.
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=0641ece57b9d980b63e3a3bb6dc4d467eff3051b
>
> I also documented this in doc/Documentation_Standards.org

Great, thank you.

>>> Also, there is one footnote that is indexed (does it even work?):
>>
>> AFACT it does not work and I think it should not work, we can remove
>> these index entries.
>
> Instead of removing, I moved the entries to the footnote reference.
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=180966c645547bf8e0f78ea28d63a686a286d2b2

Even better, thanks.

-- 
 Bastien



Re: Numbered footnotes in the manual interfere with diff

2022-10-03 Thread Ihor Radchenko
Bastien  writes:

> Hi Ihor,
>
> Ihor Radchenko  writes:
>
>> Should we just inline the one-sentence footnotes?
>
> Yes, this would be a progress already.

Done.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=0641ece57b9d980b63e3a3bb6dc4d467eff3051b

I also documented this in doc/Documentation_Standards.org

>> Also, there is one footnote that is indexed (does it even work?):
>
> AFACT it does not work and I think it should not work, we can remove
> these index entries.

Instead of removing, I moved the entries to the footnote reference.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=180966c645547bf8e0f78ea28d63a686a286d2b2

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: Numbered footnotes in the manual interfere with diff

2022-10-03 Thread Bastien
Hi Ihor,

Ihor Radchenko  writes:

> Should we just inline the one-sentence footnotes?

Yes, this would be a progress already.

> Also, there is one footnote that is indexed (does it even work?):

AFACT it does not work and I think it should not work, we can remove
these index entries.

-- 
 Bastien



Re: Numbered footnotes in the manual interfere with diff

2022-10-03 Thread Ihor Radchenko
Bastien  writes:

> Ihor Radchenko  writes:
>
>> Do you have any suggestion on how to deal with changing footnotes in the
>> manual? When I delete this footnote, all the footnotes must be
>> re-numbered creating a lot of garbage in the diff. Is it ok? Or should
>> we prefer inline footnote definitions in the manual to avoid such
>> situations?
>
> I propose to use inline footnotes for notes of one paragraph and to
> use regular footnotes for notes spanning over more than one paragraph.
> This will enhance both diffs readability and that of the manual's .org
> source.
>
> WDYT?

All the footnotes only span a single paragraph.
However, multiple footnotes span several sentences and thus look
cumbersome when inlined.

Should we just inline the one-sentence footnotes?

Also, there is one footnote that is indexed (does it even work?):

#+findex: org-date
#+findex: org-anniversary
#+findex: org-cyclic
#+findex: org-block

[fn:60] When working with the standard diary expression functions, you

I am not attaching the patch. Instead, you can run M-:
(yant/replace-all-footnotes) inside doc/org-manual.org


(defun yant/replace-footnote-with-def (fn)
  "Replace FN footnote-reference with inline footnote.
Move point to the end of the FN."
  (goto-char (org-element-property :end fn))
  (when (and (org-element-property :label fn)
 (eq (org-element-type fn) 'footnote-reference))
(let ((definition
(save-excursion
  (org-footnote-goto-definition (org-element-property :label fn))
  (let ((def (org-element-context)))
(org-wrap
 (org-trim
  (buffer-substring-no-properties
   (org-element-property :contents-begin def)
   (org-element-property :contents-end def)))
 nil 1)
  (when definition
(replace-region-contents
 (org-element-property :begin fn)
 (org-element-property :end fn)
 (lambda () (format "[fn:: %s]%s" definition (make-string (or 
(org-element-property :post-blank fn) 0) ?\s
(org-fill-paragraph)

(defun yant/replace-all-footnotes ()
  "Replace all footnotes in buffer with their definition."
  (org-with-wide-buffer
   (goto-char (point-min))
   (while (re-search-forward org-footnote-re nil t)
 (backward-char)
 (let ((fn (org-element-context)))
   (yant/replace-footnote-with-def fn)


-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: Numbered footnotes in the manual interfere with diff

2022-09-25 Thread Bastien
Ihor Radchenko  writes:

> Do you have any suggestion on how to deal with changing footnotes in the
> manual? When I delete this footnote, all the footnotes must be
> re-numbered creating a lot of garbage in the diff. Is it ok? Or should
> we prefer inline footnote definitions in the manual to avoid such
> situations?

I propose to use inline footnotes for notes of one paragraph and to
use regular footnotes for notes spanning over more than one paragraph.
This will enhance both diffs readability and that of the manual's .org
source.

WDYT?

-- 
 Bastien