GNU bug report logs -
#15014
24.3.50; In text-mode, incorrect forward-sexp causes delete-pair malfunction
Previous Next
Reported by: Barry OReilly <gundaetiapo <at> gmail.com>
Date: Fri, 2 Aug 2013 22:16:02 UTC
Severity: minor
Found in version 24.3.50
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 15014 in the body.
You can then email your comments to 15014 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15014
; Package
emacs
.
(Fri, 02 Aug 2013 22:16:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Barry OReilly <gundaetiapo <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 02 Aug 2013 22:16:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
In a file with text-mode, try forward-sexp across a double quoted
string: "foo". Unlike in programming modes, point goes before the
closing double quote instead of after.
A consequence of this is that delete-pair on
"foo"
results in
fo"
instead of
foo
as expected.
In GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.10.4)
of 2013-06-18 on psd15
Windowing system distributor `The X.Org Foundation', version 11.0.70101000
System Description: Red Hat Enterprise Linux Client release 5.4 (Tikanga)
Configured using:
`configure
--prefix=/redacted/user/boreilly/sw/emacs-install-trunk-20899d085afe62520113b5acbfe3dbba57823dc9
--with-gif=no'
Important settings:
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: @im=none
locale-coding-system: utf-8-unix
default enable-multibyte-characters: t
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-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
line-number-mode: t
transient-mark-mode: t
Recent input:
M-x r e p o r t <tab> <return>
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Load-path shadows:
None found.
Features:
(shadow sort nadvice gnus-util mail-extr emacsbug message format-spec
rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils time-date tooltip ediff-hook
vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list newcomment lisp-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process dbusbind dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty emacs)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15014
; Package
emacs
.
(Sat, 03 Aug 2013 01:24:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 15014 <at> debbugs.gnu.org (full text, mbox):
> In a file with text-mode, try forward-sexp across a double quoted
> string: "foo". Unlike in programming modes, point goes before the
> closing double quote instead of after.
In text-mode, double-quotes are not considered as pair-delimiters, so
the behavior is "the expected one". E.g. point stops after the second
`o', because the sexp it skipped is the symbol `foo' and the " are
considered as irrelevant punctuation.
So, IIUC you're arguing for marking " as having paired-delimiter syntax,
as is the case in most programming modes.
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15014
; Package
emacs
.
(Sat, 03 Aug 2013 17:02:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 15014 <at> debbugs.gnu.org (full text, mbox):
> So, IIUC you're arguing for marking " as having paired-delimiter
> syntax, as is the case in most programming modes.
I'm arguing for behavior that makes sense for the user. This seems
like the way to achieve that.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15014
; Package
emacs
.
(Sun, 04 Aug 2013 21:18:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 15014 <at> debbugs.gnu.org (full text, mbox):
>> So, IIUC you're arguing for marking " as having paired-delimiter
>> syntax, as is the case in most programming modes.
> I'm arguing for behavior that makes sense for the user.
You mean "to this user" ;-)
> This seems like the way to achieve that.
Indeed. I do expect that most programmers will use " in text-mode in
ways that behave well when treated as string delimiters, so that might
be a good option in general, but if some text contains a non-matched "
the behavior tends to be pretty annoying, so I'm not sure it's a safe
enough change.
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15014
; Package
emacs
.
(Mon, 05 Aug 2013 14:16:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 15014 <at> debbugs.gnu.org (full text, mbox):
> You mean "to this user"
Oh, I'm the only user who thinks this is wrong behavior for
forward-sexp and delete-pair?
> I do expect that most programmers will use " in text-mode in ways
> that behave well when treated as string delimiters, so that might be
> a good option in general, but if some text contains a non-matched "
> the behavior tends to be pretty annoying, so I'm not sure it's a
> safe enough change.
I'm not arguing here that we font lock double quoted strings (though
I'm not convinced either). Without font locking, I can't think of a
concrete case that yields the "pretty annoying behavior". What do you
have in mind?
I added
(modify-syntax-entry ?\" "$")
to my configuration and find that forward-sexp and delete-pair seem to
work without confusion, even in the presence of odd double quotes. It
seems forward-sexp just scans forward from point.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15014
; Package
emacs
.
(Mon, 06 Sep 2021 10:06:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 15014 <at> debbugs.gnu.org (full text, mbox):
Barry OReilly <gundaetiapo <at> gmail.com> writes:
> In a file with text-mode, try forward-sexp across a double quoted
> string: "foo". Unlike in programming modes, point goes before the
> closing double quote instead of after.
>
> A consequence of this is that delete-pair on
>
> "foo"
>
> results in
>
> fo"
>
> instead of
>
> foo
>
> as expected.
(I'm going through old bug reports that unfortunately weren't resolved
at the time.)
When I try this in Emacs 28, I get:
delete-pair: Not before matching pair
Which is the expected behaviour, since " isn't paired in text modes. So
it seems like this has been fixed in the eight years since you reported
it (although not in the way you requested -- but we're not going to make
" a paired delimited in text modes by default, because that'd be pretty
confusing, I think), so I'm closing this bug report. If there's more to
be worked on here, please respond to the debbugs address and we'll
reopen.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
bug closed, send any further explanations to
15014 <at> debbugs.gnu.org and Barry OReilly <gundaetiapo <at> gmail.com>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Mon, 06 Sep 2021 10:06:02 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
.
(Mon, 04 Oct 2021 11:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 253 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.