unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#32758: 26.1 emacs-mac 7.2; forward-sentence in eww overshoots to paragraph ending
@ 2018-09-18 10:56 Van L
  2018-09-18 11:52 ` Eli Zaretskii
  0 siblings, 1 reply; 11+ messages in thread
From: Van L @ 2018-09-18 10:56 UTC (permalink / raw)
  To: 32758

Hello.

I use eww-mode to visit a webpage, such as, 

  http://www.oxforddnb.com/view/10.1093/ref:odnb/9780198614128.001.0001/odnb-9780198614128-e-52566

I press 'R to have the page more readable.

When I press the key M-e for the command forward-sentence ; I expect to have the point goto the end of that sentence.

It overshoots to the end of the paragraph.

The point is a the second character of the first sentence of a five sentence paragraph. I type M-e and point jumps to the period at the end of the last sentence and one more position further.




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

* bug#32758: 26.1 emacs-mac 7.2; forward-sentence in eww overshoots to paragraph ending
  2018-09-18 10:56 bug#32758: 26.1 emacs-mac 7.2; forward-sentence in eww overshoots to paragraph ending Van L
@ 2018-09-18 11:52 ` Eli Zaretskii
  2018-09-18 12:17   ` Van L
  0 siblings, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2018-09-18 11:52 UTC (permalink / raw)
  To: Van L; +Cc: 32758

> From: Van L <van@scratch.space>
> Date: Tue, 18 Sep 2018 20:56:50 +1000
> 
> I use eww-mode to visit a webpage, such as, 
> 
>   http://www.oxforddnb.com/view/10.1093/ref:odnb/9780198614128.001.0001/odnb-9780198614128-e-52566
> 
> I press 'R to have the page more readable.
> 
> When I press the key M-e for the command forward-sentence ; I expect to have the point goto the end of that sentence.
> 
> It overshoots to the end of the paragraph.

With that page's text, you should set sentence-end-double-space to
nil, to have the behavior you want.





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

* bug#32758: 26.1 emacs-mac 7.2; forward-sentence in eww overshoots to paragraph ending
  2018-09-18 11:52 ` Eli Zaretskii
@ 2018-09-18 12:17   ` Van L
  2018-09-18 13:16     ` Eli Zaretskii
  0 siblings, 1 reply; 11+ messages in thread
From: Van L @ 2018-09-18 12:17 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 32758


> With that page's text, you should set sentence-end-double-space to
> nil, to have the behavior you want.

Can Emacs be smartish about sentence-end spacing? look at the periods and spaces between sentences in a paragraph and interpret according to use which is common in the wild wild web. If I do according to the suggestion won’t I miss out on double space endings between sentences? I want all possible worlds.

I should have posted this to help-emacs first.




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

* bug#32758: 26.1 emacs-mac 7.2; forward-sentence in eww overshoots to paragraph ending
  2018-09-18 12:17   ` Van L
@ 2018-09-18 13:16     ` Eli Zaretskii
  2018-09-19 11:57       ` Van L
  0 siblings, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2018-09-18 13:16 UTC (permalink / raw)
  To: Van L; +Cc: 32758

> From: Van L <van@scratch.space>
> Date: Tue, 18 Sep 2018 22:17:01 +1000
> Cc: 32758@debbugs.gnu.org
> 
> Can Emacs be smartish about sentence-end spacing? look at the periods and spaces between sentences in a paragraph and interpret according to use which is common in the wild wild web.

It would need some statistical analysis of the text and guesswork
based on that, but I don't see why that would be impossible.  Patches
welcome.

> If I do according to the suggestion won’t I miss out on double space endings between sentences?

No, but you might "acquire" sentences where there are none, such as 3
of them in "J. R. Hacker".





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

* bug#32758: 26.1 emacs-mac 7.2; forward-sentence in eww overshoots to paragraph ending
  2018-09-18 13:16     ` Eli Zaretskii
@ 2018-09-19 11:57       ` Van L
  2018-09-19 12:18         ` Eli Zaretskii
  0 siblings, 1 reply; 11+ messages in thread
From: Van L @ 2018-09-19 11:57 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 32758


> It would need some statistical analysis of the text and guesswork
> based on that, but I don't see why that would be impossible.  Patches
> welcome.

Double spaced sentence-endings are actually easier to read. 

Is the 'R command for eww-readable easier work to have double spaced sentence-endings?




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

* bug#32758: 26.1 emacs-mac 7.2; forward-sentence in eww overshoots to paragraph ending
  2018-09-19 11:57       ` Van L
@ 2018-09-19 12:18         ` Eli Zaretskii
  2018-10-07 11:00           ` Van L
  0 siblings, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2018-09-19 12:18 UTC (permalink / raw)
  To: Van L; +Cc: 32758

> From: Van L <van@scratch.space>
> Date: Wed, 19 Sep 2018 21:57:50 +1000
> Cc: 32758@debbugs.gnu.org
> 
> 
> > It would need some statistical analysis of the text and guesswork
> > based on that, but I don't see why that would be impossible.  Patches
> > welcome.
> 
> Double spaced sentence-endings are actually easier to read. 

We are not going to change the defaults, so this is not necessarily an
argument against such a feature.

> Is the 'R command for eww-readable easier work to have double spaced sentence-endings?

I don't think it matters, but I don't know EWW well enough to say
definitively.





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

* bug#32758: 26.1 emacs-mac 7.2; forward-sentence in eww overshoots to paragraph ending
  2018-09-19 12:18         ` Eli Zaretskii
@ 2018-10-07 11:00           ` Van L
  2018-10-07 14:47             ` Eli Zaretskii
  0 siblings, 1 reply; 11+ messages in thread
From: Van L @ 2018-10-07 11:00 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 32758


>>> Patches
>>> welcome.

Will it be enough for a `sentence-end-single-space’ variable to go in paragraphs.el and to fit in the sentence-end function among the re-patterns lines 190 to 200?

  25.3.1 Emacs paragraphs.el 
  	 netbsd-8.0

  ┌────
  │ 178  (defun sentence-end ()
  │ 179    "Return the regexp describing the end of a sentence.
  │ 180  
  │ 181  This function returns either the value of the variable `sentence-end'
  │ 182  if it is non-nil, or the default value constructed from the
  │ 183  variables `sentence-end-base', `sentence-end-double-space',
  │ 184  `sentence-end-without-period' and `sentence-end-without-space'.
  │ 185  
  │ 186  The default value specifies that in order to be recognized as the
  │ 187  end of a sentence, the ending period, question mark, or exclamation point
  │ 188  must be followed by two spaces, with perhaps some closing delimiters
  │ 189  in between.  See Info node `(elisp)Standard Regexps'."
  │ 190    (or sentence-end
  │ 191        ;; We accept non-break space along with space.
  │ 192        (concat (if sentence-end-without-period "\\w[ \u00a0][ \u00a0]\\|")
  │ 193  	      "\\("
  │ 194  	      sentence-end-base
  │ 195  	      (if sentence-end-double-space
  │ 196  		  "\\($\\|[ \u00a0]$\\|\t\\|[ \u00a0][ \u00a0]\\)" "\\($\\|[\t \u00a0]\\)")
  │ 197  	      "\\|[" sentence-end-without-space "]+"
  │ 198  	      "\\)"
  │ 199  	      "[ \u00a0\t\n]*")))
  │ 200  
  └────






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

* bug#32758: 26.1 emacs-mac 7.2; forward-sentence in eww overshoots to paragraph ending
  2018-10-07 11:00           ` Van L
@ 2018-10-07 14:47             ` Eli Zaretskii
  2018-10-08  0:02               ` Van L
  0 siblings, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2018-10-07 14:47 UTC (permalink / raw)
  To: Van L; +Cc: 32758

> From: Van L <van@scratch.space>
> Date: Sun, 7 Oct 2018 22:00:11 +1100
> Cc: 32758@debbugs.gnu.org
> 
> >>> Patches
> >>> welcome.
> 
> Will it be enough for a `sentence-end-single-space’ variable to go in paragraphs.el and to fit in the sentence-end function among the re-patterns lines 190 to 200?

Sorry, I don't understand the proposal.  Can you show a patch?

Thanks.





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

* bug#32758: 26.1 emacs-mac 7.2; forward-sentence in eww overshoots to paragraph ending
  2018-10-07 14:47             ` Eli Zaretskii
@ 2018-10-08  0:02               ` Van L
  2018-10-13  9:28                 ` Eli Zaretskii
  0 siblings, 1 reply; 11+ messages in thread
From: Van L @ 2018-10-08  0:02 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 32758


> Can you show a patch?

The question was is here the place to put the patch for the expected function to forward-sentence when in an eww buffer in read mode where sentences are single spaced. This is the runup to locating a patch to be made.




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

* bug#32758: 26.1 emacs-mac 7.2; forward-sentence in eww overshoots to paragraph ending
  2018-10-08  0:02               ` Van L
@ 2018-10-13  9:28                 ` Eli Zaretskii
  2019-05-13 18:12                   ` Lars Ingebrigtsen
  0 siblings, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2018-10-13  9:28 UTC (permalink / raw)
  To: Van L; +Cc: 32758

> From: Van L <van@scratch.space>
> Date: Mon, 8 Oct 2018 11:02:55 +1100
> Cc: 32758@debbugs.gnu.org
> 
> 
> > Can you show a patch?
> 
> The question was is here the place to put the patch for the expected function to forward-sentence when in an eww buffer in read mode where sentences are single spaced. This is the runup to locating a patch to be made.

The place to make the change is indeed in paragraphs.el.  But you were
also talking about a variable sentence-end-single-space, which doesn't
exist, and I don't have a clear idea what kind of changes in the
regexps used by sentence-end did you have in mind.

Thanks.





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

* bug#32758: 26.1 emacs-mac 7.2; forward-sentence in eww overshoots to paragraph ending
  2018-10-13  9:28                 ` Eli Zaretskii
@ 2019-05-13 18:12                   ` Lars Ingebrigtsen
  0 siblings, 0 replies; 11+ messages in thread
From: Lars Ingebrigtsen @ 2019-05-13 18:12 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Van L, 32758

I don't really see this is as something that eww should be meddling
with -- it's up to the user to decide what they want to consider a
sentence end.

It might perhaps be nice if there was a different setting for this in,
say, all special-mode buffers (as opposed to editing modes), so perhaps
a new bug report should be opened for that if somebody feels that that's
a good idea, but I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no






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

end of thread, other threads:[~2019-05-13 18:12 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-18 10:56 bug#32758: 26.1 emacs-mac 7.2; forward-sentence in eww overshoots to paragraph ending Van L
2018-09-18 11:52 ` Eli Zaretskii
2018-09-18 12:17   ` Van L
2018-09-18 13:16     ` Eli Zaretskii
2018-09-19 11:57       ` Van L
2018-09-19 12:18         ` Eli Zaretskii
2018-10-07 11:00           ` Van L
2018-10-07 14:47             ` Eli Zaretskii
2018-10-08  0:02               ` Van L
2018-10-13  9:28                 ` Eli Zaretskii
2019-05-13 18:12                   ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).