all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#73778: 30.0.91; cpp-ts-mode indentation never finishes
@ 2024-10-12 19:20 Augustin Chéneau via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-10-19  8:12 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Augustin Chéneau via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-10-12 19:20 UTC (permalink / raw)
  To: 73778

--text follows this line--

In c++-ts-mode, there is a bug when I indent a line with <tab>.

This is trivially reproducible with the below code:

int func() {
	int a;
	int b;
     }

Place your point before "int b;", press <tab>, and the indentation
process never finishes.

This is caused by an error in c-ts-mode--anchor-prev-sibling, as the
condition of the last "or" in the function has incorrect
delimitation. Which means that the "if" will run the second test on
success, which then cause the function to be stuck in an infinite loop.

I would gladly send you a patch, but I've been stuck in the legal limbo 
of the copyright assignment for months now and I cannot contribute to
GNU Emacs (or any GNU project for the matter).

I hope my description will be enough.




In GNU Emacs 30.0.91 (build 6, x86_64-pc-linux-gnu, GTK+ Version
  3.24.43, cairo version 1.18.2) of 2024-10-12 built on inspiron-5567
Repository revision: 0f8f0773183a07a229b23d3f970723ceb9585aef
Repository branch: makepkg
Windowing system distributor 'The X.Org Foundation', version 11.0.12401003
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-libotf --without-m17n-flt --without-gconf
  --with-native-compilation=yes --with-native-compilation=aot
  --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
LCMS2 LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP 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 $LANG: fr_FR.UTF-8
   locale-coding-system: utf-8-unix

Major mode: ELisp/l

Minor modes in effect:
   bug-reference-prog-mode: t
   yas-global-mode: t
   yas-minor-mode: t
   rainbow-delimiters-mode: t
   ws-butler-mode: t
   delete-selection-mode: t
   global-subword-mode: t
   subword-mode: t
   save-place-mode: t
   editorconfig-mode: t
   drag-stuff-global-mode: t
   drag-stuff-mode: t
   doom-modeline-mode: t
   treemacs-filewatch-mode: t
   treemacs-follow-mode: t
   treemacs-git-mode: t
   treemacs-fringe-indicator-mode: t
   global-hl-line-mode: t
   nerd-icons-completion-mode: t
   global-git-commit-mode: t
   magit-auto-revert-mode: t
   global-auto-revert-mode: t
   server-mode: t
   adaptive-wrap-prefix-mode: t
   global-undo-tree-mode: t
   undo-tree-mode: t
   global-anzu-mode: t
   anzu-mode: t
   which-key-mode: t
   projectile-mode: t
   global-corfu-mode: t
   corfu-mode: t
   flymake-mode: t
   TeX-PDF-mode: t
   TeX-source-correlate-mode: t
   vertico-mode: t
   marginalia-mode: t
   override-global-mode: t
   straight-use-package-mode: t
   straight-package-neutering-mode: t
   savehist-mode: t
   global-display-line-numbers-mode: t
   display-line-numbers-mode: t
   electric-pair-mode: t
   tooltip-mode: t
   global-eldoc-mode: t
   eldoc-mode: t
   show-paren-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
   minibuffer-regexp-mode: t
   size-indication-mode: t
   column-number-mode: t
   line-number-mode: t
   global-visual-line-mode: t
   visual-line-mode: t
   transient-mark-mode: t
   auto-composition-mode: t
   auto-encryption-mode: t
   auto-compression-mode: t

Load-path shadows:
/home/arch-aug/.config/emacs/straight/build/cmake-mode/cmake-mode hides 
/usr/share/emacs/site-lisp/cmake-mode
/home/arch-aug/.config/emacs/straight/build/which-key/which-key hides 
/usr/share/emacs/30.0.91/lisp/which-key
/home/arch-aug/.config/emacs/straight/build/transient/transient hides 
/usr/share/emacs/30.0.91/lisp/transient
/home/arch-aug/.config/emacs/straight/build/editorconfig/editorconfig 
hides /usr/share/emacs/30.0.91/lisp/editorconfig
/home/arch-aug/.config/emacs/straight/build/editorconfig/editorconfig-tools 
hides /usr/share/emacs/30.0.91/lisp/editorconfig-tools
/home/arch-aug/.config/emacs/straight/build/editorconfig/editorconfig-fnmatch 
hides /usr/share/emacs/30.0.91/lisp/editorconfig-fnmatch
/home/arch-aug/.config/emacs/straight/build/editorconfig/editorconfig-core 
hides /usr/share/emacs/30.0.91/lisp/editorconfig-core
/home/arch-aug/.config/emacs/straight/build/editorconfig/editorconfig-core-handle 
hides /usr/share/emacs/30.0.91/lisp/editorconfig-core-handle
/home/arch-aug/.config/emacs/straight/build/editorconfig/editorconfig-conf-mode 
hides /usr/share/emacs/30.0.91/lisp/editorconfig-conf-mode
/home/arch-aug/.config/emacs/straight/build/bind-key/bind-key hides 
/usr/share/emacs/30.0.91/lisp/bind-key
/home/arch-aug/.config/emacs/straight/build/use-package/use-package 
hides /usr/share/emacs/30.0.91/lisp/use-package/use-package
/home/arch-aug/.config/emacs/straight/build/use-package/use-package-lint 
hides /usr/share/emacs/30.0.91/lisp/use-package/use-package-lint
/home/arch-aug/.config/emacs/straight/build/use-package/use-package-jump 
hides /usr/share/emacs/30.0.91/lisp/use-package/use-package-jump
/home/arch-aug/.config/emacs/straight/build/use-package/use-package-ensure 
hides /usr/share/emacs/30.0.91/lisp/use-package/use-package-ensure
/home/arch-aug/.config/emacs/straight/build/use-package/use-package-diminish 
hides /usr/share/emacs/30.0.91/lisp/use-package/use-package-diminish
/home/arch-aug/.config/emacs/straight/build/use-package/use-package-delight 
hides /usr/share/emacs/30.0.91/lisp/use-package/use-package-delight
/home/arch-aug/.config/emacs/straight/build/use-package/use-package-core 
hides /usr/share/emacs/30.0.91/lisp/use-package/use-package-core
/home/arch-aug/.config/emacs/straight/build/use-package/use-package-bind-key 
hides /usr/share/emacs/30.0.91/lisp/use-package/use-package-bind-key
/home/arch-aug/.config/emacs/straight/build/soap-client/soap-inspect 
hides /usr/share/emacs/30.0.91/lisp/net/soap-inspect
/home/arch-aug/.config/emacs/straight/build/soap-client/soap-client 
hides /usr/share/emacs/30.0.91/lisp/net/soap-client
/home/arch-aug/.config/emacs/straight/build/seq/seq hides 
/usr/share/emacs/30.0.91/lisp/emacs-lisp/seq
/home/arch-aug/.config/emacs/straight/build/let-alist/let-alist hides 
/usr/share/emacs/30.0.91/lisp/emacs-lisp/let-alist
/home/arch-aug/.config/emacs/straight/build/compat/compat hides 
/usr/share/emacs/30.0.91/lisp/emacs-lisp/compat

Features:
(shadow sort mail-extr emacsbug magit-delta xterm-color bug-reference
vertico-directory checkdoc doom-snippets doom-snippets-lib cus-start
yasnippet rainbow-delimiters ws-butler delsel cap-words superword
subword saveplace tramp-sh proof-general proof-general-autoloads
proof-site proof-autoloads indent-bars-autoloads mu4e mu4e-org
mu4e-notification notifications mu4e-main smtpmail mu4e-view
mu4e-mime-parts gnus-art mm-uu mml2015 mm-view mml-smime smime gnutls
dig gnus-sum gnus-group gnus-undo gnus-start gnus-dbus gnus-cloud nnimap
nnmail mail-source utf7 nnoo gnus-spec gnus-int gnus-range gnus-win gnus
mu4e-headers mu4e-thread mu4e-actions mu4e-compose nnheader range
mu4e-search mu4e-lists mu4e-bookmarks mu4e-mark mu4e-message shr
pixel-fill kinsoku url-file svg dom flow-fill mule-util mu4e-contacts
mu4e-update mu4e-folders mu4e-context mu4e-query-items mu4e-server
mu4e-modeline mu4e-vars mu4e-helpers mu4e-config mu4e-window ido
mu4e-obsolete bison-mode-autoloads dired-x cmake-mode rst
cmake-mode-autoloads utop utop-minor-mode tuareg tuareg-compat
tuareg-opam caml-help view find-file utop-autoloads flycheck-ocaml
flycheck flycheck-ocaml-autoloads let-alist-autoloads
merlin-eldoc-autoloads merlin-xref merlin-cap merlin caml-types
merlin-autoloads dune dune-autoloads tuareg-autoloads caml-autoloads
pkgbuild-mode tramp trampver tramp-integration files-x tramp-message
tramp-compat parse-time iso8601 tramp-loaddefs pkgbuild-mode-autoloads
lua-mode lua-mode-autoloads debbugs soap-client url-http url-auth url-gw
nsm rng-xsd xsd-regexp debbugs-compat debbugs-autoloads
soap-client-autoloads expand-region-autoloads jinx-autoloads builder
vc-git vc-dispatcher dir-var builder-autoloads hare-mode-autoloads
flycheck-autoloads vertico-search general general-autoloads
combobulate-autoloads editorconfig editorconfig-core
editorconfig-core-handle editorconfig-fnmatch editorconfig-autoloads
ws-butler-autoloads bel-coloration rainbow-delimiters-autoloads
drag-stuff drag-stuff-autoloads doom-modeline doom-modeline-segments
doom-modeline-env doom-modeline-core shrink-path f
doom-modeline-autoloads shrink-path-autoloads f-autoloads
nerd-icons-dired-autoloads treemacs-nerd-icons treemacs
treemacs-header-line treemacs-compatibility treemacs-mode
treemacs-bookmarks treemacs-tags xref treemacs-interface
treemacs-persistence treemacs-filewatch-mode treemacs-follow-mode
treemacs-rendering treemacs-annotations treemacs-async
treemacs-workspaces treemacs-dom treemacs-visuals
treemacs-fringe-indicator pulse color treemacs-faces treemacs-icons
treemacs-scope treemacs-themes treemacs-core-utils pfuture hl-line ht
treemacs-logging treemacs-customization treemacs-macros s
treemacs-nerd-icons-autoloads treemacs-autoloads cfrs-autoloads
posframe-autoloads ht-autoloads hydra-autoloads lv-autoloads
pfuture-autoloads ace-window-autoloads avy-autoloads s-autoloads
nerd-icons-completion nerd-icons-completion-autoloads nerd-icons
nerd-icons-faces nerd-icons-data nerd-icons-data-mdicon
nerd-icons-data-flicon nerd-icons-data-codicon nerd-icons-data-devicon
nerd-icons-data-sucicon nerd-icons-data-wicon nerd-icons-data-faicon
nerd-icons-data-powerline nerd-icons-data-octicon
nerd-icons-data-pomicon nerd-icons-data-ipsicon nerd-icons-autoloads
doom-themes-ext-org doom-themes-ext-visual-bell face-remap
doom-dracula-theme doom-themes doom-themes-base doom-themes-autoloads
magit-delta-autoloads xterm-color-autoloads magit-bookmark pcase
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-mode track-changes git-commit log-edit message sendmail
yank-media puny dired dired-loaddefs 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 autorevert filenotify magit-margin magit-transient
magit-process with-editor comp comp-cstr comp-run comp-common shell
server magit-mode transient benchmark magit-git magit-base magit-section
cursor-sensor dash magit-autoloads with-editor-autoloads
transient-autoloads magit-section-autoloads dash-autoloads
embark-consult-autoloads embark-autoloads consult bookmark
consult-autoloads adaptive-wrap adaptive-wrap-autoloads undo-tree diff
queue undo-tree-autoloads queue-autoloads anzu anzu-autoloads which-key
which-key-autoloads projectile grep ibuf-ext ibuffer ibuffer-loaddefs
projectile-autoloads doom-snippets-autoloads yasnippet-autoloads
finder-inf cape-autoloads corfu corfu-autoloads ox-man 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 ox-html table
ox-ascii ox-publish ox org-attach org-element org-persist xdg org-id
org-refile org-element-ast inline org ob ob-tangle ob-ref ob-lob
ob-table org-macro org-src sh-script smie treesit executable ob-comint
org-pcomplete pcomplete org-list org-footnote org-faces org-entities
time-date noutline outline org-version ob-emacs-lisp org-table org-keys
org-loaddefs find-func cal-menu calendar cal-loaddefs avl-tree generator
ol rx oc ob-exp ob-core org-cycle org-fold org-fold-core org-compat
ob-eval org-macs format-spec auctex-latexmk advice latex latex-flymake
flymake project compile text-property-search comint ansi-osc ansi-color
ring warnings thingatpt tex-ispell tex-style auctex-latexmk-autoloads
tex dbus xml crm texmathp auctex lisp-mnt 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 eieio eieio-core password-cache json map url-vars
auctex-autoloads tex-site vertico vertico-autoloads marginalia edmacro
kmacro byte-opt marginalia-autoloads use-package-bind-key bind-key
easy-mmode orderless compat orderless-autoloads compat-autoloads
seq-autoloads use-package-ensure use-package-autoloads info
bind-key-autoloads straight-autoloads cl-seq cl-extra help-mode straight
subr-x cl-macs gv use-package-core bytecomp byte-compile cus-edit pp
icons wid-edit cl-loaddefs cl-lib savehist display-line-numbers
elec-pair cus-load 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
native-compile emacs)

Memory information:
((conses 16 804926 311256) (symbols 48 52158 1)
  (strings 32 212315 45016) (string-bytes 1 7195847) (vectors 16 93432)
  (vector-slots 8 1755152 108157) (floats 8 1707 7448)
  (intervals 56 7431 5533) (buffers 992 19))







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

end of thread, other threads:[~2024-10-19 11:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-12 19:20 bug#73778: 30.0.91; cpp-ts-mode indentation never finishes Augustin Chéneau via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-19  8:12 ` Eli Zaretskii
2024-10-19 10:58   ` Augustin Chéneau via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-19 11:10     ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.