emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG] org-forward-sentence does not recognize the end of sentences with footnotes [9.5.4 (N/A @ /gnu/store/zi4gr63h5k2w3y5srydk3k05bjrx9pi9-emacs-org-9.5.4/share/emacs/site-lisp/org-9.5.4/)]
@ 2022-08-02  5:55 Dr. Arne Babenhauserheide
  2022-08-02 13:23 ` Ihor Radchenko
  0 siblings, 1 reply; 4+ messages in thread
From: Dr. Arne Babenhauserheide @ 2022-08-02  5:55 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1295 bytes --]



Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

     https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.
------------------------------------------------------------------------

Dear Org Hackers,

If you go to the first word in the following paragraph and press M-e
(org-forward-sentence), the point jumps to the end of the paragraph. But
it should jump to just after the footnote [fn:23].

If I remove the footnote [fn:23], it correctly jumps to the end of the
first colon:

Die Anzahl und Stärke der Werte ist durch eure
gewählte Machtstufe begrenzt:[fn:23] Ein starker
Wert@@latex:\index{Starker Wert}@@ kostet einen Punkt und ein
überragender Wert@@latex:\index{überragender Wert}@@ drei
Punkte.[fn:133] Starke Werte markiert ihr mit =+=, überragende Werte
mit =++=.

Best wishes,
Arne


Emacs  : GNU Emacs 28.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, cairo version 1.16.0)
Package: Org mode version 9.5.4 (N/A @ /gnu/store/zi4gr63h5k2w3y5srydk3k05bjrx9pi9-emacs-org-9.5.4/share/emacs/site-lisp/org-9.5.4/)
-- 
Unpolitisch sein
heißt politisch sein,
ohne es zu merken.
draketo.de

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 1125 bytes --]

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

* Re: [BUG] org-forward-sentence does not recognize the end of sentences with footnotes [9.5.4 (N/A @ /gnu/store/zi4gr63h5k2w3y5srydk3k05bjrx9pi9-emacs-org-9.5.4/share/emacs/site-lisp/org-9.5.4/)]
  2022-08-02  5:55 [BUG] org-forward-sentence does not recognize the end of sentences with footnotes [9.5.4 (N/A @ /gnu/store/zi4gr63h5k2w3y5srydk3k05bjrx9pi9-emacs-org-9.5.4/share/emacs/site-lisp/org-9.5.4/)] Dr. Arne Babenhauserheide
@ 2022-08-02 13:23 ` Ihor Radchenko
  2022-08-02 13:44   ` Dr. Arne Babenhauserheide
  0 siblings, 1 reply; 4+ messages in thread
From: Ihor Radchenko @ 2022-08-02 13:23 UTC (permalink / raw)
  To: Dr. Arne Babenhauserheide; +Cc: emacs-orgmode

"Dr. Arne Babenhauserheide" <arne_bab@web.de> writes:

> If you go to the first word in the following paragraph and press M-e
> (org-forward-sentence), the point jumps to the end of the paragraph. But
> it should jump to just after the footnote [fn:23].
>
> If I remove the footnote [fn:23], it correctly jumps to the end of the
> first colon:
>
> Die Anzahl und Stärke der Werte ist durch eure
> gewählte Machtstufe begrenzt:[fn:23] Ein starker
> Wert@@latex:\index{Starker Wert}@@ kostet einen Punkt und ein
> überragender Wert@@latex:\index{überragender Wert}@@ drei
> Punkte.[fn:133] Starke Werte markiert ihr mit =+=, überragende Werte
> mit =++=.

But colon is not a sentence end. Or do I miss something?

----
sentence-end-base is a variable defined in paragraphs.el.

Value
"[.?!…‽][]\"'”’)}»›]*"

Best,
Ihor


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

* Re: [BUG] org-forward-sentence does not recognize the end of sentences with footnotes [9.5.4 (N/A @ /gnu/store/zi4gr63h5k2w3y5srydk3k05bjrx9pi9-emacs-org-9.5.4/share/emacs/site-lisp/org-9.5.4/)]
  2022-08-02 13:23 ` Ihor Radchenko
@ 2022-08-02 13:44   ` Dr. Arne Babenhauserheide
  2022-08-03  9:58     ` Ihor Radchenko
  0 siblings, 1 reply; 4+ messages in thread
From: Dr. Arne Babenhauserheide @ 2022-08-02 13:44 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1767 bytes --]


Ihor Radchenko <yantar92@gmail.com> writes:

> "Dr. Arne Babenhauserheide" <arne_bab@web.de> writes:
>
>> If you go to the first word in the following paragraph and press M-e
>> (org-forward-sentence), the point jumps to the end of the paragraph. But
>> it should jump to just after the footnote [fn:23].
>>
>> If I remove the footnote [fn:23], it correctly jumps to the end of the
>> first colon:
>>
>> Die Anzahl und Stärke der Werte ist durch eure
>> gewählte Machtstufe begrenzt:[fn:23] Ein starker
>> Wert@@latex:\index{Starker Wert}@@ kostet einen Punkt und ein
>> überragender Wert@@latex:\index{überragender Wert}@@ drei
>> Punkte.[fn:133] Starke Werte markiert ihr mit =+=, überragende Werte
>> mit =++=.
>
> But colon is not a sentence end. Or do I miss something?

I think I added colon there; in default setting this should jump to the
end of [fn:133]. If you have sentence with two spaces set, try adding a
space after [fn:133] — it is not recognized as end of a sentence:

Die Anzahl und Stärke der Werte ist durch eure
gewählte Machtstufe begrenzt:[fn:23] Ein starker
Wert@@latex:\index{Starker Wert}@@ kostet einen Punkt und ein
überragender Wert@@latex:\index{überragender Wert}@@ drei
Punkte.[fn:133]  Starke Werte markiert ihr mit =+=, überragende Werte
mit =++=.

Wheras without the footnote it is:

Die Anzahl und Stärke der Werte ist durch eure
gewählte Machtstufe begrenzt:[fn:23] Ein starker
Wert@@latex:\index{Starker Wert}@@ kostet einen Punkt und ein
überragender Wert@@latex:\index{überragender Wert}@@ drei
Punkte.  Starke Werte markiert ihr mit =+=, überragende Werte
mit =++=.

Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein,
ohne es zu merken.
draketo.de

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 1125 bytes --]

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

* Re: [BUG] org-forward-sentence does not recognize the end of sentences with footnotes [9.5.4 (N/A @ /gnu/store/zi4gr63h5k2w3y5srydk3k05bjrx9pi9-emacs-org-9.5.4/share/emacs/site-lisp/org-9.5.4/)]
  2022-08-02 13:44   ` Dr. Arne Babenhauserheide
@ 2022-08-03  9:58     ` Ihor Radchenko
  0 siblings, 0 replies; 4+ messages in thread
From: Ihor Radchenko @ 2022-08-03  9:58 UTC (permalink / raw)
  To: Dr. Arne Babenhauserheide; +Cc: emacs-orgmode

"Dr. Arne Babenhauserheide" <arne_bab@web.de> writes:

>> But colon is not a sentence end. Or do I miss something?
>
> I think I added colon there; in default setting this should jump to the
> end of [fn:133]. If you have sentence with two spaces set, try adding a
> space after [fn:133] — it is not recognized as end of a sentence:
>
> Die Anzahl und Stärke der Werte ist durch eure
> gewählte Machtstufe begrenzt:[fn:23] Ein starker
> Wert@@latex:\index{Starker Wert}@@ kostet einen Punkt und ein
> überragender Wert@@latex:\index{überragender Wert}@@ drei
> Punkte.[fn:133]  Starke Werte markiert ihr mit =+=, überragende Werte
> mit =++=.

So, are you saying that a footnote after sentence ending symbol must be
a part of sentence? Is it common in German? Other languages?

I'm afraid that the subject of sentence and is very tricky to handle for
an arbitrary language. Not all the languages even use "." to separate
sentences.

If we want to properly fix the issue, we may need to create a dedicated
rule-set on how to handle sentence end for different languages or maybe
even implement a patch for Emacs itself. I'm afraid that regexps will not
cut it.

Best,
Ihor


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

end of thread, other threads:[~2022-08-03 10:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-02  5:55 [BUG] org-forward-sentence does not recognize the end of sentences with footnotes [9.5.4 (N/A @ /gnu/store/zi4gr63h5k2w3y5srydk3k05bjrx9pi9-emacs-org-9.5.4/share/emacs/site-lisp/org-9.5.4/)] Dr. Arne Babenhauserheide
2022-08-02 13:23 ` Ihor Radchenko
2022-08-02 13:44   ` Dr. Arne Babenhauserheide
2022-08-03  9:58     ` Ihor Radchenko

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