* bug#68111: 30.0.50; backward-kill-word too eager in cc-mode
@ 2023-12-29 16:23 Platon Pronko
2023-12-29 18:54 ` Eli Zaretskii
2023-12-31 11:15 ` Alan Mackenzie
0 siblings, 2 replies; 5+ messages in thread
From: Platon Pronko @ 2023-12-29 16:23 UTC (permalink / raw)
To: 68111
In cc-mode (C lang files) calling backward-kill-word seems to be too eager. For example, given the following file and cursor position:
```
int main() {
printf("alpha beta gamma<cursor>
}
```
calling backward-kill-word results in
```
int main() {
<cursor>
}
```
while the expected result is probably:
```
int main() {
printf("alpha beta <cursor>
}
```
It seems that this is a regression in commit dae8aab52874441a70a94435d50f25b27301d9b0, by Alan Mackenzie on 2023-06-21.
In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.39, cairo version 1.18.0) of 2023-12-29 built on the-big-maker
Repository revision: ea3d211f3f7ecc5b59d5affc1aed812a2ded62b0
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101010
System Description: Arch Linux
Configured using:
'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
--localstatedir=/var --mandir=/usr/share/man --with-gameuser=:games
--with-modules --without-m17n-flt --without-gconf
--with-native-compilation=no --with-xinput2 --with-x-toolkit=gtk3
--without-xaw3d --with-sound=no --with-tree-sitter --without-gpm
--without-compress-install
'--program-transform-name=s/\([ec]tags\)/\1.emacs/'
'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions
-Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security
-fstack-clash-protection -fcf-protection'
LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'
Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
LCMS2 LIBOTF LIBSYSTEMD LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG RSVG
SECCOMP SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11
XDBE XIM XINPUT2 XPM GTK3 ZLIB
Important settings:
value of $LC_TIME: en_SE.UTF-8
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
Major mode: C/*l
Minor modes in effect:
rainbow-delimiters-mode: t
global-git-gutter-mode: t
global-git-commit-mode: t
magit-auto-revert-mode: t
counsel-mode: t
ivy-mode: t
global-whitespace-mode: t
whitespace-mode: t
global-dvorak-mode: t
dvorak-minor-mode: t
global-auto-revert-mode: t
global-so-long-mode: t
tooltip-mode: t
global-eldoc-mode: t
show-paren-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
minibuffer-regexp-mode: t
column-number-mode: t
line-number-mode: t
transient-mark-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
abbrev-mode: t
Load-path shadows:
/home/platon/.emacs.d/elpa/lispy-20230314.1738/elpa hides /home/platon/.emacs.d/elpa/ivy-20231025.2311/elpa
/home/platon/.emacs.d/elpa/transient-20231216.1908/transient hides /usr/share/emacs/30.0.50/lisp/transient
/home/platon/.emacs.d/elpa/less-css-mode-20161001.453/less-css-mode hides /usr/share/emacs/30.0.50/lisp/textmodes/less-css-mode
Features:
(shadow sort mail-extr emacsbug smartparens-c cc-mode cc-fonts cc-guess
cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs
rainbow-delimiters ol-w3m ol-rmail ol-mhe ol-irc ol-info org-habit
org-agenda org-element org-persist org-id avl-tree org-refile ol-gnus
nnselect gnus-art mm-uu mml2015 mm-view mml-smime smime gnutls dig
gnus-sum gnus-group gnus-undo gnus-start gnus-dbus dbus gnus-cloud
nnimap nnmail mail-source utf7 nnoo gnus-spec gnus-int gnus-range
gnus-win ol-eww eww url-queue shr pixel-fill kinsoku url-file svg xml
dom mm-url gnus nnheader range ol-docview doc-view jka-compr image-mode
exif ol-bibtex bibtex ol-bbdb ucs-normalize dabbrev lispy lispy-inline
avy etags fileloop generator edebug debug backtrace help-fns radix-tree
lispy-tags mode-local zoutline tramp trampver tramp-integration files-x
tramp-message tramp-compat parse-time iso8601 tramp-loaddefs lpr
smartparens-rust rust-utils rust-mode rust-rustfmt rust-playpen
rust-compile rust-cargo flymake warnings lsp-pyright lsp lsp-mode
lsp-protocol tree-widget wid-edit spinner network-stream nsm
smartparens-markdown markdown-mode inline ht f s ewoc company-box
company-box-doc frame-local company-box-icons company git-gutter-fringe
fringe-helper git-gutter magit-submodule magit-blame magit-stash
magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone
magit-remote magit-commit magit-sequence magit-notes magit-worktree
magit-tag magit-merge magit-branch magit-reset magit-files magit-refs
magit-status magit magit-repos magit-apply magit-wip magit-log
which-func imenu magit-diff smerge-mode diff diff-mode git-commit
log-edit message sendmail yank-media puny rfc822 mml mml-sec epa derived
epg rfc6068 epg-config gnus-util mm-decode mm-bodies mm-encode
mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr
mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log magit-core
magit-autorevert magit-margin magit-transient magit-process with-editor
shell server magit-mode transient magit-git magit-base magit-section
cursor-sensor crm compat org-archive smartparens-org org ob ob-tangle
ob-ref ob-lob ob-table ob-exp org-macro org-src ob-comint org-pcomplete
pcomplete org-list org-footnote org-faces org-entities time-date
noutline outline icons ob-emacs-lisp ob-core ob-eval org-cycle org-table
ol org-fold org-fold-core org-keys oc org-loaddefs find-func cal-menu
calendar cal-loaddefs org-version org-compat org-macs counsel xdg xref
project dired dired-loaddefs compile text-property-search comint
ansi-osc ansi-color swiper ivy delsel ivy-faces ivy-overlay colir color
cl-extra hydra ring lv rx format-spec edmacro kmacro smartparens-config
smartparens-text smartparens advice loadhist thingatpt dash disp-table
whitespace quail help-mode easy-mmode darcula-theme autorevert
filenotify so-long finder-inf company-box-autoloads company-autoloads
counsel-autoloads editorconfig-autoloads frame-local-autoloads
git-gutter-autoloads go-mode-autoloads haskell-mode-autoloads
helm-bibtex-autoloads helm-autoloads bibtex-completion-autoloads
biblio-autoloads biblio-core-autoloads helm-core-autoloads
async-autoloads ivy-hydra-autoloads lispy-autoloads hydra-autoloads
ace-window-autoloads avy-autoloads literate-calc-mode-autoloads
lorem-ipsum-autoloads lsp-pyright-autoloads lsp-mode-autoloads
ht-autoloads f-autoloads magit-autoloads pcase git-commit-autoloads
magit-section-autoloads markdown-mode-autoloads parsebib-autoloads
php-mode-autoloads popup-autoloads rust-mode-autoloads s-autoloads
scala-mode-autoloads smartparens-autoloads dash-autoloads
solidity-mode-autoloads swiper-autoloads ivy-autoloads
transient-autoloads typescript-mode-autoloads web-mode-autoloads
wfnames-autoloads wgrep-autoloads with-editor-autoloads info
compat-autoloads yaml-mode-autoloads package browse-url url url-proxy
url-privacy url-expand url-methods url-history url-cookie
generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse
auth-source cl-seq eieio eieio-core cl-macs password-cache json subr-x
map byte-opt gv bytecomp byte-compile url-vars cl-loaddefs cl-lib rmc
iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook
vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win
term/common-win x-dnd touch-screen 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 nadvice seq simple cl-generic indonesian philippine
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 abbrev obarray oclosure
cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp
files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads dbusbind inotify lcms2 dynamic-setting system-font-setting
font-render-setting cairo gtk x-toolkit xinput2 x multi-tty move-toolbar
make-network-process emacs)
Memory information:
((conses 16 746092 348433) (symbols 48 49727 15) (strings 32 214140 26823) (string-bytes 1 6389877) (vectors 16 112049)
(vector-slots 8 1195403 232516) (floats 8 483 1044) (intervals 56 766 228) (buffers 992 12))
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#68111: 30.0.50; backward-kill-word too eager in cc-mode
2023-12-29 16:23 bug#68111: 30.0.50; backward-kill-word too eager in cc-mode Platon Pronko
@ 2023-12-29 18:54 ` Eli Zaretskii
2023-12-31 11:15 ` Alan Mackenzie
1 sibling, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2023-12-29 18:54 UTC (permalink / raw)
To: Platon Pronko, Alan Mackenzie; +Cc: 68111
> Date: Fri, 29 Dec 2023 21:23:54 +0500
> From: Platon Pronko <platon7pronko@gmail.com>
>
> In cc-mode (C lang files) calling backward-kill-word seems to be too eager. For example, given the following file and cursor position:
>
> ```
> int main() {
> printf("alpha beta gamma<cursor>
> }
> ```
>
> calling backward-kill-word results in
>
> ```
> int main() {
> <cursor>
> }
> ```
>
> while the expected result is probably:
>
> ```
> int main() {
> printf("alpha beta <cursor>
> }
> ```
>
> It seems that this is a regression in commit dae8aab52874441a70a94435d50f25b27301d9b0, by Alan Mackenzie on 2023-06-21.
Adding Alan to the discussion.
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#68111: 30.0.50; backward-kill-word too eager in cc-mode
2023-12-29 16:23 bug#68111: 30.0.50; backward-kill-word too eager in cc-mode Platon Pronko
2023-12-29 18:54 ` Eli Zaretskii
@ 2023-12-31 11:15 ` Alan Mackenzie
2024-01-03 15:15 ` Platon Pronko
1 sibling, 1 reply; 5+ messages in thread
From: Alan Mackenzie @ 2023-12-31 11:15 UTC (permalink / raw)
To: Platon Pronko; +Cc: acm, 68111, Eli Zaretskii
Hello, Platon.
Thanks for taking the trouble to report this bug, and sorry for the
annoyance it must have caused.
On Fri, Dec 29, 2023 at 21:23:54 +0500, Platon Pronko wrote:
> In cc-mode (C lang files) calling backward-kill-word seems to be too
> eager. For example, given the following file and cursor position:
> ```
> int main() {
> printf("alpha beta gamma<cursor>
> }
> ```
> calling backward-kill-word results in
> ```
> int main() {
> <cursor>
> }
> ```
> while the expected result is probably:
> ```
> int main() {
> printf("alpha beta <cursor>
> }
> ```
> It seems that this is a regression in commit
> dae8aab52874441a70a94435d50f25b27301d9b0, by Alan Mackenzie on
> 2023-06-21.
Indeed, yes. Thanks for doing the bisection, it saved me a lot of work.
I've committed a fix for the bug to the master branch of the repository.
Would you please update your copy of Emacs, test the fix, then either
confirm the fix is complete, or say what is still not working. Then we
can close the bug.
Happy New Year!
> In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
> 3.24.39, cairo version 1.18.0) of 2023-12-29 built on the-big-maker
> Repository revision: ea3d211f3f7ecc5b59d5affc1aed812a2ded62b0
> Repository branch: master
> Windowing system distributor 'The X.Org Foundation', version 11.0.12101010
> System Description: Arch Linux
[ .... ]
--
Alan Mackenzie (Nuremberg, Germany).
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#68111: 30.0.50; backward-kill-word too eager in cc-mode
2023-12-31 11:15 ` Alan Mackenzie
@ 2024-01-03 15:15 ` Platon Pronko
2024-01-06 11:45 ` Alan Mackenzie
0 siblings, 1 reply; 5+ messages in thread
From: Platon Pronko @ 2024-01-03 15:15 UTC (permalink / raw)
To: Alan Mackenzie; +Cc: 68111, Eli Zaretskii
On 2023-12-31 16:15, Alan Mackenzie wrote:
> I've committed a fix for the bug to the master branch of the repository.
> Would you please update your copy of Emacs, test the fix, then either
> confirm the fix is complete, or say what is still not working. Then we
> can close the bug.
>
> Happy New Year!
>
Thank you! I've tested the fix, it works for me.
--
Best regards,
Platon Pronko
PGP 2A62D77A7A2CB94E
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#68111: 30.0.50; backward-kill-word too eager in cc-mode
2024-01-03 15:15 ` Platon Pronko
@ 2024-01-06 11:45 ` Alan Mackenzie
0 siblings, 0 replies; 5+ messages in thread
From: Alan Mackenzie @ 2024-01-06 11:45 UTC (permalink / raw)
To: Platon Pronko; +Cc: acm, 68111-done, Eli Zaretskii
Hello, Platon.
On Wed, Jan 03, 2024 at 20:15:46 +0500, Platon Pronko wrote:
> On 2023-12-31 16:15, Alan Mackenzie wrote:
> > I've committed a fix for the bug to the master branch of the repository.
> > Would you please update your copy of Emacs, test the fix, then either
> > confirm the fix is complete, or say what is still not working. Then we
> > can close the bug.
> > Happy New Year!
> Thank you! I've tested the fix, it works for me.
Thanks for the testing. I'm closing the bug with this post.
> --
> Best regards,
> Platon Pronko
> PGP 2A62D77A7A2CB94E
--
Alan Mackenzie (Nuremberg, Germany).
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-01-06 11:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-29 16:23 bug#68111: 30.0.50; backward-kill-word too eager in cc-mode Platon Pronko
2023-12-29 18:54 ` Eli Zaretskii
2023-12-31 11:15 ` Alan Mackenzie
2024-01-03 15:15 ` Platon Pronko
2024-01-06 11:45 ` Alan Mackenzie
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).