* Q2 -
@ 2024-12-14 23:51 Tatsu Takamaro
2024-12-15 2:10 ` [External] : " Drew Adams
2024-12-15 7:16 ` Q2 - Yuri Khan
0 siblings, 2 replies; 6+ messages in thread
From: Tatsu Takamaro @ 2024-12-14 23:51 UTC (permalink / raw)
To: help-gnu-emacs
My next question. The second one.
Commands "forward-sentence" and "backward-sentence" do not move by
sentences actually. I tried in both Text and Fundamental modes. If there
are two or more sentences in a line, they ignore the dot in the middle.
I guess it is somehow connected with an internal mode's settings (what
is considered to be a sentence). But it seems logical that when I'm in a
Text mode, a literary sentence should be treated as sentence, where a
dot sign (or ? or ! and so on) is a delimiter.
How can I tell Emacs to treat sentences as literary sentences? At least
in a Text mode.
Tony.
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [External] : Q2 -
2024-12-14 23:51 Q2 - Tatsu Takamaro
@ 2024-12-15 2:10 ` Drew Adams
2024-12-16 21:39 ` [External] : Q2 - moving by sentences and what is considered to be a sentence Tatsu Takamaro
2024-12-15 7:16 ` Q2 - Yuri Khan
1 sibling, 1 reply; 6+ messages in thread
From: Drew Adams @ 2024-12-15 2:10 UTC (permalink / raw)
To: Tatsu Takamaro, help-gnu-emacs@gnu.org
> Commands "forward-sentence" and "backward-sentence" do not move by
> sentences actually. I tried in both Text and Fundamental modes. If there
> are two or more sentences in a line, they ignore the dot in the middle.
> I guess it is somehow connected with an internal mode's settings (what
> is considered to be a sentence). But it seems logical that when I'm in a
> Text mode, a literary sentence should be treated as sentence, where a
> dot sign (or ? or ! and so on) is a delimiter.
>
> How can I tell Emacs to treat sentences as literary sentences? At least
> in a Text mode.
Probably you have only one space character after the punctuation ending a sentence. If so, and if you want to continue to do that, then customize user option `sentence-end-double-space' to give it the value `nil'. Use `M-x customize-option' to do that.
`C-h v' tells you this:
sentence-end-double-space is a variable defined in `paragraphs.el'.
Its value is t
This variable is safe as a file local variable if its value
satisfies the predicate `booleanp'.
Documentation:
Non-nil means a single space does not end a sentence.
This is relevant for filling. See also `sentence-end-without-period'
and `colon-double-space'.
This value is used by the function `sentence-end' to construct the
regexp describing the end of a sentence, when the value of the variable
`sentence-end' is nil. See Info node `(elisp)Standard Regexps'.
You can customize this variable.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Q2 -
2024-12-14 23:51 Q2 - Tatsu Takamaro
2024-12-15 2:10 ` [External] : " Drew Adams
@ 2024-12-15 7:16 ` Yuri Khan
2024-12-16 21:46 ` Q2 - moving by sentences and what is considered to be a sentence Tatsu Takamaro
1 sibling, 1 reply; 6+ messages in thread
From: Yuri Khan @ 2024-12-15 7:16 UTC (permalink / raw)
To: Tatsu Takamaro; +Cc: help-gnu-emacs
On Sun, 15 Dec 2024 at 06:52, Tatsu Takamaro <tatsu.takamaro@gmail.com> wrote:
> Commands "forward-sentence" and "backward-sentence" do not move by
> sentences actually.
This one is easy. The default settings in Emacs assume a period
followed by two spaces is a sentence boundary while reserving a period
followed by a single space for constructs such as “Dr. Jekyll”, “Mr.
Hyde” and “A. S. Pushkin”.
Toggle
(setq sentence-end-double-space nil)
and prefer using non-breaking spaces with intra-sentence periods.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [External] : Q2 - moving by sentences and what is considered to be a sentence
2024-12-15 2:10 ` [External] : " Drew Adams
@ 2024-12-16 21:39 ` Tatsu Takamaro
2024-12-16 22:06 ` Stefan Monnier via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 6+ messages in thread
From: Tatsu Takamaro @ 2024-12-16 21:39 UTC (permalink / raw)
To: Drew Adams, help-gnu-emacs@gnu.org
Thank you. The
*'(sentence-end-double-space nil)*
in the *custom-set-variables* section did the job.
Of course, we have only one space between literary sentences, at least
if we talk about a normal human text. I've never met another behaviour.
вс, 15.12.2024 5:10, Drew Adams пишет:
>> Commands "forward-sentence" and "backward-sentence" do not move by
>> sentences actually. I tried in both Text and Fundamental modes. If there
>> are two or more sentences in a line, they ignore the dot in the middle.
>> I guess it is somehow connected with an internal mode's settings (what
>> is considered to be a sentence). But it seems logical that when I'm in a
>> Text mode, a literary sentence should be treated as sentence, where a
>> dot sign (or ? or ! and so on) is a delimiter.
>>
>> How can I tell Emacs to treat sentences as literary sentences? At least
>> in a Text mode.
> Probably you have only one space character after the punctuation ending a sentence. If so, and if you want to continue to do that, then customize user option `sentence-end-double-space' to give it the value `nil'. Use `M-x customize-option' to do that.
>
>
> `C-h v' tells you this:
>
> sentence-end-double-space is a variable defined in `paragraphs.el'.
>
> Its value is t
>
> This variable is safe as a file local variable if its value
> satisfies the predicate `booleanp'.
>
> Documentation:
> Non-nil means a single space does not end a sentence.
> This is relevant for filling. See also `sentence-end-without-period'
> and `colon-double-space'.
>
> This value is used by the function `sentence-end' to construct the
> regexp describing the end of a sentence, when the value of the variable
> `sentence-end' is nil. See Info node `(elisp)Standard Regexps'.
>
> You can customize this variable.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Q2 - moving by sentences and what is considered to be a sentence
2024-12-15 7:16 ` Q2 - Yuri Khan
@ 2024-12-16 21:46 ` Tatsu Takamaro
0 siblings, 0 replies; 6+ messages in thread
From: Tatsu Takamaro @ 2024-12-16 21:46 UTC (permalink / raw)
To: Yuri Khan; +Cc: help-gnu-emacs
Thank you. It works.
I think it's easier to just push a hotkey for "forward-sentence" some
times more than to insert non-breaking spaces every time.
вс, 15.12.2024 10:16, Yuri Khan пишет:
> On Sun, 15 Dec 2024 at 06:52, Tatsu Takamaro<tatsu.takamaro@gmail.com> wrote:
>
>> Commands "forward-sentence" and "backward-sentence" do not move by
>> sentences actually.
> This one is easy. The default settings in Emacs assume a period
> followed by two spaces is a sentence boundary while reserving a period
> followed by a single space for constructs such as “Dr. Jekyll”, “Mr.
> Hyde” and “A. S. Pushkin”.
>
> Toggle
>
> (setq sentence-end-double-space nil)
>
> and prefer using non-breaking spaces with intra-sentence periods.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [External] : Q2 - moving by sentences and what is considered to be a sentence
2024-12-16 21:39 ` [External] : Q2 - moving by sentences and what is considered to be a sentence Tatsu Takamaro
@ 2024-12-16 22:06 ` Stefan Monnier via Users list for the GNU Emacs text editor
0 siblings, 0 replies; 6+ messages in thread
From: Stefan Monnier via Users list for the GNU Emacs text editor @ 2024-12-16 22:06 UTC (permalink / raw)
To: help-gnu-emacs
> Of course, we have only one space between literary sentences, at least if we
> talk about a normal human text. I've never met another behaviour.
In most books, there is a wider space after a "." that terminates
a sentence than after a "Mr." (and other abbreviations).
Whether this difference is reflected by adding an additional space
character in monospaced text depends on local conventions.
Apparently it was pretty common to do that in the US when using
a typewriter. This convention is also used in GNU Emacs's own code.
Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-12-16 22:06 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-14 23:51 Q2 - Tatsu Takamaro
2024-12-15 2:10 ` [External] : " Drew Adams
2024-12-16 21:39 ` [External] : Q2 - moving by sentences and what is considered to be a sentence Tatsu Takamaro
2024-12-16 22:06 ` Stefan Monnier via Users list for the GNU Emacs text editor
2024-12-15 7:16 ` Q2 - Yuri Khan
2024-12-16 21:46 ` Q2 - moving by sentences and what is considered to be a sentence Tatsu Takamaro
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.