GNU bug report logs - #52082
29.0.50; Scrolling aborts "repunctuate-sentences"

Previous Next

Package: emacs;

Reported by: Rudolf Adamkovič <salutis <at> me.com>

Date: Wed, 24 Nov 2021 19:35:01 UTC

Severity: wishlist

Found in version 29.0.50

To reply to this bug, email your comments to 52082 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#52082; Package emacs. (Wed, 24 Nov 2021 19:35:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Rudolf Adamkovič <salutis <at> me.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 24 Nov 2021 19:35:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Rudolf Adamkovič <salutis <at> me.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; Scrolling aborts "repunctuate-sentences"
Date: Wed, 24 Nov 2021 20:34:27 +0100
1. Open a longer document containing prose.
2. Type "M-x repunctuate-sentences RET".
3. Use the mouse scroll-wheel to scroll.

Expected:

"repunctuate-sentences" does not abort, like it does not abort when the user types "C-v".

Actual:

"repunctuate-sentences" aborts, making it hard to review the entire document.


In GNU Emacs 29.0.50 (build 8, x86_64-apple-darwin20.6.0, NS appkit-2022.60 Version 11.5.1 (Build 20G80))
 of 2021-11-19 built on Workstation.local
Repository revision: 5b250ca79b9aeeeea0b521db9645882240f08c9f
Repository branch: master
Windowing system distributor 'Apple', version 10.3.2022
System Description:  macOS 11.5.1

Configured using:
 'configure --with-json --with-xwidgets'

Configured features:
ACL DBUS GIF GLIB GMP GNUTLS JPEG JSON LCMS2 LIBXML2 MODULES NOTIFY
KQUEUE NS PDUMPER PNG RSVG THREADS TIFF TOOLKIT_SCROLL_BARS WEBP XIM
XWIDGETS ZLIB

Important settings:
  value of $LC_ALL: en_US.UTF-8
  value of $LANG: en_SK.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Org

Minor modes in effect:
  shell-dirtrack-mode: t
  TeX-PDF-mode: t
  flymake-mode: t
  which-key-mode: t
  corfu-global-mode: t
  corfu-mode: t
  vertico-mode: t
  marginalia-mode: t
  global-diff-hl-mode: t
  diff-hl-mode: t
  yas-global-mode: t
  yas-minor-mode: t
  global-hl-todo-mode: t
  savehist-mode: t
  global-subword-mode: t
  subword-mode: t
  save-place-mode: t
  global-auto-revert-mode: t
  global-display-fill-column-indicator-mode: t
  display-fill-column-indicator-mode: t
  delete-selection-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  size-indication-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
/Users/salutis/.emacs.d/elpa/transient-20211105.100/transient hides /Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/transient

Features:
(shadow bbdb-message fortune mail-extr emacsbug sendmail sort
notifications rect sh-script executable preview tex-buf font-latex
tex-mode shell holidays hol-loaddefs cal-move cus-edit cus-start
cus-load lisp-mnt mm-archive gnutls network-stream url-http url-gw nsm
url-cache url-auth mhtml-mode css-mode smie color js imenu cc-mode
cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars
cc-defs sgml-mode facemenu latex latex-flymake tex-ispell tex-style tex
texmathp citar-org org-id citar crm citar-file vc-mtn vc-hg vc-bzr
vc-src vc-sccs vc-svn vc-cvs vc-rcs consult-vertico consult recentf
tree-widget org-timer org-duration bug-reference flymake-proc flymake
project warnings image-file image-converter disp-table char-fold
orderless cursor-sensor paredit edmacro kmacro bbdb bbdb-site timezone
modus-vivendi-theme modus-operandi-theme modus-themes which-key corfu
vertico marginalia pdf-loader diff-hl log-view pcvs-util vc-dir ewoc vc
diminish yasnippet hl-todo finder-inf ox-md org-clock oc-csl citeproc
citeproc-itemgetters citeproc-biblatex citeproc-bibtex parsebib
citeproc-cite citeproc-subbibs citeproc-sort citeproc-name
citeproc-formatters citeproc-number rst compile citeproc-proc
citeproc-disamb citeproc-itemdata citeproc-generic-elements
citeproc-macro citeproc-choose citeproc-date citeproc-context
citeproc-prange citeproc-style citeproc-locale citeproc-term f
citeproc-rt citeproc-lib citeproc-s s let-alist queue dash ox-odt
rng-loc rng-uri rng-parse rng-match rng-dt rng-util rng-pttrn nxml-parse
nxml-ns nxml-enc xmltok nxml-util ox-latex ox-icalendar org-agenda
org-refile ox-html table ox-ascii ox-publish ox savehist ls-lisp
cap-words superword subword saveplace autorevert filenotify
display-fill-column-indicator delsel elfeed-link elfeed-show
elfeed-search elfeed-csv elfeed elfeed-curl elfeed-log xml-query
bookmark pp elfeed-db elfeed-lib vc-git diff-mode vc-dispatcher
org-element avl-tree generator ol-eww eww xdg url-queue thingatpt mm-url
ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect gnus-search eieio-opt
speedbar ezimage dframe gnus-art mm-uu mml2015 mm-view mml-smime smime
dig gnus-sum shr kinsoku svg dom gnus-group gnus-undo gnus-start
gnus-dbus dbus xml gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo
parse-time gnus-spec gnus-int gnus-range message yank-media rmc puny
rfc822 mml mml-sec epa derived epg rfc6068 epg-config mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
gnus-win gnus nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045
ietf-drums text-property-search mail-utils mm-util mail-prsvr wid-edit
ol-docview doc-view jka-compr image-mode exif dired dired-loaddefs
ol-bibtex ol-bbdb ol-w3m ol-doi org-link-doi cl-extra org ob ob-tangle
ob-ref ob-lob ob-table ob-exp org-macro org-footnote org-src ob-comint
org-pcomplete pcomplete comint ansi-color ring org-list org-faces
org-entities noutline outline easy-mmode org-version ob-emacs-lisp
ob-core ob-eval org-table oc-basic bibtex iso8601 time-date ol rx
org-keys oc org-compat advice org-macs org-loaddefs format-spec
find-func help-mode cal-menu calendar cal-loaddefs tex-site info package
browse-url url url-proxy url-privacy url-expand url-methods url-history
url-cookie url-domsuf url-util mailcap url-handlers url-parse
auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache json map url-vars seq gv subr-x byte-opt bytecomp
byte-compile cconv cl-loaddefs cl-lib iso-transl tooltip eldoc paren
electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd
fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow
isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax
font-core term/tty-colors frame minibuffer cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote threads
xwidget-internal dbusbind kqueue cocoa ns lcms2 multi-tty
make-network-process emacs)

Memory information:
((conses 16 5995936 694971)
 (symbols 48 49095 4)
 (strings 32 433864 33616)
 (string-bytes 1 14218195)
 (vectors 16 156951)
 (vector-slots 8 5763997 310836)
 (floats 8 562 545)
 (intervals 56 267593 25563)
 (buffers 992 136))

-- 
"Logic is a science of the necessary laws of thought, without which no employment of the understanding and the reason takes place." -- Immanuel Kant, 1785

Rudolf Adamkovič <salutis <at> me.com>
Studenohorská 25
84103 Bratislava
Slovakia

[he/him]




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52082; Package emacs. (Wed, 24 Nov 2021 20:04:02 GMT) Full text and rfc822 format available.

Message #8 received at 52082 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Rudolf Adamkovič <salutis <at> me.com>
Cc: 52082 <at> debbugs.gnu.org
Subject: Re: bug#52082: 29.0.50; Scrolling aborts "repunctuate-sentences"
Date: Wed, 24 Nov 2021 22:03:29 +0200
> Date: Wed, 24 Nov 2021 20:34:27 +0100
> From:  Rudolf Adamkovič via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> 
> 1. Open a longer document containing prose.
> 2. Type "M-x repunctuate-sentences RET".
> 3. Use the mouse scroll-wheel to scroll.
> 
> Expected:
> 
> "repunctuate-sentences" does not abort, like it does not abort when the user types "C-v".
> 
> Actual:
> 
> "repunctuate-sentences" aborts, making it hard to review the entire document.

This command invokes query-replace-regexp, so it only accepts inputs
that query-replace accepts.  Why is that a problem, and why did you
have those expectations when the prompt clearly indicates that Emacs
is in query-replace-regexp?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52082; Package emacs. (Thu, 25 Nov 2021 07:26:01 GMT) Full text and rfc822 format available.

Message #11 received at 52082 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Rudolf Adamkovič <salutis <at> me.com>
Cc: 52082 <at> debbugs.gnu.org
Subject: Re: bug#52082: 29.0.50; Scrolling aborts "repunctuate-sentences"
Date: Thu, 25 Nov 2021 09:24:55 +0200
[Please use Reply All to keep the bug tracker on the CC list.]

> From: Rudolf Adamkovič <salutis <at> me.com>
> Cc: 
> Date: Wed, 24 Nov 2021 23:32:16 +0100
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > This command invokes query-replace-regexp, so it only accepts inputs
> > that query-replace accepts.  Why is that a problem, and why did you
> > have those expectations when the prompt clearly indicates that Emacs
> > is in query-replace-regexp?
> 
> Wait, is that something unusual?
> 
> 1. start "repunctuate-sentences"
> 2. fix some sentences
> 3. press C-v to scroll up
> 4. fix some more sentences
> 5. move the scroll-wheel to scroll up a bit more
> 
> Should I expect 5 to abort for some reason?

You should instead do it as you'd do in the middle of a query-replace:
either type 'q' or RET to exit the replace loop and do something else,
then reinvoke the command; or type 'C-r' to enter recursive-edit,
where you can do whatever you want, including scrolling with mouse
wheel, then exit recursive-edit with C-M-c to continue fixing the
punctuation.

Once again, this command invokes query-replace-regexp, so the behavior
is that of query-replace-regexp, as documented in the manual.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52082; Package emacs. (Thu, 25 Nov 2021 23:09:02 GMT) Full text and rfc822 format available.

Message #14 received at 52082 <at> debbugs.gnu.org (full text, mbox):

From: Rudolf Adamkovič <salutis <at> me.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 52082 <at> debbugs.gnu.org
Subject: Re: bug#52082: 29.0.50; Scrolling aborts "repunctuate-sentences"
Date: Fri, 26 Nov 2021 00:08:12 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

> You should instead do it as you'd do in the middle of a query-replace:
> either type 'q' or RET to exit the replace loop and do something else,
> then reinvoke the command; or type 'C-r' to enter recursive-edit,
> where you can do whatever you want, including scrolling with mouse
> wheel, then exit recursive-edit with C-M-c to continue fixing the
> punctuation.
>
> Once again, this command invokes query-replace-regexp, so the behavior
> is that of query-replace-regexp, as documented in the manual.

Wow! That makes scrolling (with the mouse, not with the keyboard) into rocket science! I searched "(emacs) Query Replace" for "C-v" (scroll-up-command) and found nothing. Then, ignoring /status quo/ for a moment, do you think the current behavior makes sense? I ask because I struggle to find a reason for not allowing the user to scroll with the mouse specifically.

Rudy
-- 
"Logic is a science of the necessary laws of thought, without which no employment of the understanding and the reason takes place." -- Immanuel Kant, 1785

Rudolf Adamkovič <salutis <at> me.com>
Studenohorská 25
84103 Bratislava
Slovakia

[he/him]




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52082; Package emacs. (Fri, 26 Nov 2021 06:32:01 GMT) Full text and rfc822 format available.

Message #17 received at 52082 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Rudolf Adamkovič <salutis <at> me.com>
Cc: 52082 <at> debbugs.gnu.org
Subject: Re: bug#52082: 29.0.50; Scrolling aborts "repunctuate-sentences"
Date: Fri, 26 Nov 2021 08:31:52 +0200
> From: Rudolf Adamkovič <salutis <at> me.com>
> Cc: 52082 <at> debbugs.gnu.org
> Date: Fri, 26 Nov 2021 00:08:12 +0100
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > You should instead do it as you'd do in the middle of a query-replace:
> > either type 'q' or RET to exit the replace loop and do something else,
> > then reinvoke the command; or type 'C-r' to enter recursive-edit,
> > where you can do whatever you want, including scrolling with mouse
> > wheel, then exit recursive-edit with C-M-c to continue fixing the
> > punctuation.
> >
> > Once again, this command invokes query-replace-regexp, so the behavior
> > is that of query-replace-regexp, as documented in the manual.
> 
> Wow! That makes scrolling (with the mouse, not with the keyboard) into rocket science!

It does?

> I searched "(emacs) Query Replace" for "C-v" (scroll-up-command) and found nothing. Then, ignoring /status quo/ for a moment, do you think the current behavior makes sense? I ask because I struggle to find a reason for not allowing the user to scroll with the mouse specifically.

If you are asking for a new feature, which would allow scrolling
during query-replace commands, then maybe it would make sense, I don't
know.  (I personally probably wouldn't use it much, or not at all.)
As long as we agree that this isn't a bug but a feature request, I'm
fine with leaving this wait for a motivated individual to implement
such a feature.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52082; Package emacs. (Fri, 26 Nov 2021 09:49:02 GMT) Full text and rfc822 format available.

Message #20 received at 52082 <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 52082 <at> debbugs.gnu.org, Rudolf Adamkovič <salutis <at> me.com>
Subject: Re: bug#52082: 29.0.50; Scrolling aborts "repunctuate-sentences"
Date: Fri, 26 Nov 2021 10:47:54 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

> If you are asking for a new feature, which would allow scrolling
> during query-replace commands, then maybe it would make sense, I don't
> know.

Could be as useful as in isearch.  Maybe it could be implemented
similarly or reuse that code?

For the record: binding mouse keys in `query-replace-map' like

#+begin_src emacs-lisp
(dolist (key `([,mouse-wheel-down-event] [,mouse-wheel-up-event]))
  (define-key query-replace-map key #'mwheel-scroll))
#+end_src

does _not_ work, because lookup in that map by the current code is
performed like

(lookup-key [(down-mouse-5
             (#<window 62 on *scratch*> 1587 (1115 . 228) ...))])
  --> nil

i.e. what is currently looked up is an event, not a key.


Michael.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52082; Package emacs. (Fri, 26 Nov 2021 23:07:01 GMT) Full text and rfc822 format available.

Message #23 received at 52082 <at> debbugs.gnu.org (full text, mbox):

From: Rudolf Adamkovič <salutis <at> me.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 52082 <at> debbugs.gnu.org
Subject: Re: bug#52082: 29.0.50; Scrolling aborts "repunctuate-sentences"
Date: Sat, 27 Nov 2021 00:06:19 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

>> That makes scrolling […] into rocket science!
>
> It does?

For a beginner, yes. But then, I often exaggerate. :)

> As long as we agree that this isn't a bug but a feature request, I'm
> fine with leaving this wait for a motivated individual to implement
> such a feature.

A bug, a feature, … who knows? But sure, let us call it a feature.

Thank you for understanding!

Rudy
-- 
"'Contrariwise,' continued Tweedledee, 'if it was so, it might be; and if it were so, it would be; but as it isn't, it ain't. That's logic.'" -- Lewis Carroll, Through the Looking Glass

Rudolf Adamkovič <salutis <at> me.com>
Studenohorská 25
84103 Bratislava
Slovakia

[he/him]




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52082; Package emacs. (Sat, 27 Nov 2021 06:03:01 GMT) Full text and rfc822 format available.

Message #26 received at 52082 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Rudolf Adamkovič <salutis <at> me.com>
Cc: 52082 <at> debbugs.gnu.org
Subject: Re: bug#52082: 29.0.50; Scrolling aborts "repunctuate-sentences"
Date: Sat, 27 Nov 2021 08:02:40 +0200
severity 52082 wishlist
thanks

> From: Rudolf Adamkovič <salutis <at> me.com>
> Cc: 52082 <at> debbugs.gnu.org
> Date: Sat, 27 Nov 2021 00:06:19 +0100
> 
> A bug, a feature, … who knows? But sure, let us call it a feature.

Done.




Severity set to 'wishlist' from 'normal' Request was from Eli Zaretskii <eliz <at> gnu.org> to control <at> debbugs.gnu.org. (Sat, 27 Nov 2021 06:03:02 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 201 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.