GNU bug report logs - #39134
28.0.50; forward-sexp fails on curved singlequotes

Previous Next

Package: emacs;

Reported by: Andreas Röhler <andreas.roehler <at> easy-emacs.de>

Date: Tue, 14 Jan 2020 13:31:01 UTC

Severity: minor

Tags: fixed

Found in version 28.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 39134 in the body.
You can then email your comments to 39134 AT debbugs.gnu.org in the normal way.

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#39134; Package emacs. (Tue, 14 Jan 2020 13:31:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Röhler <andreas.roehler <at> easy-emacs.de>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 14 Jan 2020 13:31:02 GMT) Full text and rfc822 format available.

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

From: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; forward-sexp fails on curved singlequotes
Date: Tue, 14 Jan 2020 14:35:34 +0100
Please consider output of "M-x describe-function RET defun RET".

Go in first line to beginning of "‘byte-run.el’". From "Char: ‘ (8216, 
#o20030, #x2018,"
"M-x forward-sexp RET". Cursor stops at dot, but should go until Char: ’ 
(8217, #o20031, #x2019)

Later on in buffer from start of "‘interactive’" it works as expected.
Also on ‘defun-declarations-alist’.

Thanks developing Emacs,
Andreas

In GNU Emacs 28.0.50 (build 1, i686-pc-linux-gnu, GTK+ Version 3.14.5)
 of 2020-01-10 built on sprache
Repository revision: 17cfd708575c351d030f8b05c5921d1867028d79
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.11604000
System Description: Debian GNU/Linux 8 (jessie)

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Type C-x 1 to delete the help window, C-M-v to scroll help.
You can run the command ‘describe-function’ with C-h f
Type C-x 1 to delete the help window, C-M-v to scroll help.

Configured using:
 'configure --with-modules --with-mailutils'

Configured features:
XPM JPEG TIFF GIF PNG SOUND DBUS GSETTINGS GLIB NOTIFY INOTIFY ACL
GNUTLS LIBXML2 FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM
MODULES THREADS PDUMPER GMP

Important settings:
  value of $LANG: de_DE.utf8
  locale-coding-system: utf-8-unix

Major mode: Help

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr misearch multi-isearch emacsbug message rmc puny
dired dired-loaddefs format-spec rfc822 mml mml-sec password-cache epa
derived epg epg-config gnus-util rmail rmail-loaddefs
text-property-search time-date subr-x mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils cl-extra seq byte-opt
gv bytecomp byte-compile cconv mode-local find-func thingatpt help-fns
radix-tree help-mode easymenu cl-loaddefs cl-lib tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu 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 charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads dbusbind inotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 8 144084 8387)
 (symbols 24 28481 1)
 (strings 16 62818 2702)
 (string-bytes 1 973737)
 (vectors 8 10943)
 (vector-slots 4 145597 16200)
 (floats 8 30 32)
 (intervals 28 273 10)
 (buffers 568 13)
 (heap 1024 11552 1297))





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39134; Package emacs. (Tue, 14 Jan 2020 15:30:03 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
Cc: 39134 <at> debbugs.gnu.org
Subject: Re: bug#39134: 28.0.50; forward-sexp fails on curved singlequotes
Date: Tue, 14 Jan 2020 17:29:15 +0200
> From: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
> Date: Tue, 14 Jan 2020 14:35:34 +0100
> 
> Please consider output of "M-x describe-function RET defun RET".
> 
> Go in first line to beginning of "‘byte-run.el’". From "Char: ‘ (8216, 
> #o20030, #x2018,"
> "M-x forward-sexp RET". Cursor stops at dot, but should go until Char: ’ 
> (8217, #o20031, #x2019)

Why do you think it should go until ’ ?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39134; Package emacs. (Tue, 14 Jan 2020 16:02:02 GMT) Full text and rfc822 format available.

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

From: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 39134 <at> debbugs.gnu.org
Subject: Re: bug#39134: 28.0.50; forward-sexp fails on curved singlequotes
Date: Tue, 14 Jan 2020 17:06:54 +0100
On 14.01.20 16:29, Eli Zaretskii wrote:
>> From: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
>> Date: Tue, 14 Jan 2020 14:35:34 +0100
>>
>> Please consider output of "M-x describe-function RET defun RET".
>>
>> Go in first line to beginning of "‘byte-run.el’". From "Char: ‘ (8216,
>> #o20030, #x2018,"
>> "M-x forward-sexp RET". Cursor stops at dot, but should go until Char: ’
>> (8217, #o20031, #x2019)
> Why do you think it should go until ’ ?


Consider it a balanced expression closed by that char.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39134; Package emacs. (Tue, 14 Jan 2020 16:21:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
Cc: 39134 <at> debbugs.gnu.org
Subject: Re: bug#39134: 28.0.50; forward-sexp fails on curved singlequotes
Date: Tue, 14 Jan 2020 18:20:44 +0200
> Cc: 39134 <at> debbugs.gnu.org
> From: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
> Date: Tue, 14 Jan 2020 17:06:54 +0100
> 
> >> "M-x forward-sexp RET". Cursor stops at dot, but should go until Char: ’
> >> (8217, #o20031, #x2019)
> > Why do you think it should go until ’ ?
> 
> 
> Consider it a balanced expression closed by that char.

I'm not sure I understand how that makes sense in a buffer not in Lisp
mode, but maybe I'm missing something.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39134; Package emacs. (Tue, 14 Jan 2020 17:29:01 GMT) Full text and rfc822 format available.

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

From: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 39134 <at> debbugs.gnu.org
Subject: Re: bug#39134: 28.0.50; forward-sexp fails on curved singlequotes
Date: Tue, 14 Jan 2020 18:33:25 +0100
On 14.01.20 17:20, Eli Zaretskii wrote:
>> Cc: 39134 <at> debbugs.gnu.org
>> From: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
>> Date: Tue, 14 Jan 2020 17:06:54 +0100
>>
>>>> "M-x forward-sexp RET". Cursor stops at dot, but should go until Char: ’
>>>> (8217, #o20031, #x2019)
>>> Why do you think it should go until ’ ?
>>
>> Consider it a balanced expression closed by that char.
> I'm not sure I understand how that makes sense in a buffer not in Lisp
> mode, but maybe I'm missing something.


IMO the sense comes from the markup, from the editing point of view.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39134; Package emacs. (Mon, 16 Aug 2021 06:21:02 GMT) Full text and rfc822 format available.

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

From: mvar <mvar.40k <at> gmail.com>
To: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
Cc: 39134 <at> debbugs.gnu.org
Subject: Re: bug#39134: 28.0.50; forward-sexp fails on curved singlequotes
Date: Mon, 16 Aug 2021 09:20:34 +0300
Andreas Röhler <andreas.roehler <at> easy-emacs.de> writes:

> Please consider output of "M-x describe-function RET defun RET".
>
> Go in first line to beginning of "‘byte-run.el’". From "Char: ‘ (8216, #o20030,
> #x2018,"
> "M-x forward-sexp RET". Cursor stops at dot, but should go until Char: ’ (8217,
> #o20031, #x2019)
>
> Later on in buffer from start of "‘interactive’" it works as expected.
> Also on ‘defun-declarations-alist’.
>
> Thanks developing Emacs,
> Andreas

hi Andreas,

even for ‘interactive’ it does not work as expected - the cursor moves
right on top of the second curly singlequote instead of the character to
its right (the dot in that output). But this happens in the help
text. In scratch buffer for the below string:

boing ‘forward-sexp.test’ boing

forward-sexp acknowledges 3 sexps. But adding an extra space

boing ‘forward-sexp.test ’ boing

will break it and the second sexp ends on the newly added space.
Looks like that these specific quotation marks are not considered as equivalents
of parentheses.

do you see this as a general problem or just for the help-mode text?

thank you in advance,
Michalis




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39134; Package emacs. (Mon, 16 Aug 2021 15:40:01 GMT) Full text and rfc822 format available.

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

From: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
To: mvar <mvar.40k <at> gmail.com>
Cc: 39134 <at> debbugs.gnu.org
Subject: Re: bug#39134: 28.0.50; forward-sexp fails on curved singlequotes
Date: Mon, 16 Aug 2021 17:39:32 +0200
On 16.08.21 08:20, mvar wrote:
> Andreas Röhler <andreas.roehler <at> easy-emacs.de> writes:
>
>> Please consider output of "M-x describe-function RET defun RET".
>>
>> Go in first line to beginning of "‘byte-run.el’". From "Char: ‘ (8216, #o20030,
>> #x2018,"
>> "M-x forward-sexp RET". Cursor stops at dot, but should go until Char: ’ (8217,
>> #o20031, #x2019)
>>
>> Later on in buffer from start of "‘interactive’" it works as expected.
>> Also on ‘defun-declarations-alist’.
>>
>> Thanks developing Emacs,
>> Andreas
> hi Andreas,
>
> even for ‘interactive’ it does not work as expected - the cursor moves
> right on top of the second curly singlequote instead of the character to
> its right (the dot in that output). But this happens in the help
> text. In scratch buffer for the below string:
>
> boing ‘forward-sexp.test’ boing
>
> forward-sexp acknowledges 3 sexps. But adding an extra space
>
> boing ‘forward-sexp.test ’ boing
>
> will break it and the second sexp ends on the newly added space.
> Looks like that these specific quotation marks are not considered as equivalents
> of parentheses.
>
> do you see this as a general problem or just for the help-mode text?
>
> thank you in advance,
> Michalis

Hi Michalis,

don't have any idea WRT importance of this.

Just thought it may work  - modifying the help-mode syntax-table should 
do it.

Best,

Andreas








Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39134; Package emacs. (Tue, 17 Aug 2021 09:59:01 GMT) Full text and rfc822 format available.

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

From: "Michalis V." <mvar.40k <at> gmail.com>
To: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
Cc: mvar <mvar.40k <at> gmail.com>, 39134 <at> debbugs.gnu.org
Subject: Re: bug#39134: 28.0.50; forward-sexp fails on curved singlequotes
Date: Tue, 17 Aug 2021 12:58:46 +0300
[Message part 1 (text/plain, inline)]
Andreas Röhler <andreas.roehler <at> easy-emacs.de> writes:

> Andreas Röhler <andreas.roehler <at> easy-emacs.de> writes:
>
> Hi Michalis,
>
> don't have any idea WRT importance of this.
>
> Just thought it may work  - modifying the help-mode syntax-table should do it.
>
> Best,
>
> Andreas

hi Andreas,

Looking at the help-mode.el it wasn't very clear to me how the help-mode
syntax-table variable was actually created - there wasn't any defvar
defined but rather the syntax-table was applied inside two
defuns. Despite that "C-h v help-mode-syntax-table" would redirect 
to this line in help-mode.el

(define-derived-mode help-mode special-mode "Help"

for some cryptic reason. Anyway attached is a patch that introduces
properly the help-mode-syntax-table var which derives from the elisp one
and sets ‘’ as parens. Now forward-sexp jumps over the definitions in
the *Help* buffer as it should despite any punctuation they may contain. 

cheers,
Michalis

[help-mode.diff (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39134; Package emacs. (Tue, 17 Aug 2021 12:22:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: "Michalis V." <mvar.40k <at> gmail.com>
Cc: 39134 <at> debbugs.gnu.org,
 Andreas Röhler <andreas.roehler <at> easy-emacs.de>
Subject: Re: bug#39134: 28.0.50; forward-sexp fails on curved singlequotes
Date: Tue, 17 Aug 2021 14:21:25 +0200
"Michalis V." <mvar.40k <at> gmail.com> writes:

> for some cryptic reason. Anyway attached is a patch that introduces
> properly the help-mode-syntax-table var which derives from the elisp one
> and sets ‘’ as parens. Now forward-sexp jumps over the definitions in
> the *Help* buffer as it should despite any punctuation they may contain. 

Thanks; I've now pushed your patch to Emacs 28.

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




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 17 Aug 2021 12:22:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 39134 <at> debbugs.gnu.org and Andreas Röhler <andreas.roehler <at> easy-emacs.de> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 17 Aug 2021 12:22:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 15 Sep 2021 11:24:05 GMT) Full text and rfc822 format available.

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

Previous Next


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