--text follows this line--

If I have buffer like this:

Foo \cite{bar} bar.

And press `M-q` I get error:

LaTeX-indent-calculate-last: Wrong type argument: stringp, nil



In GNU Emacs 29.4 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.20,
 cairo version 1.16.0) of 2024-06-23 built on lcy02-amd64-050
Repository revision: 176061eb965cf945e7627ce87bb16ec5a03f8a4d
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101007
System Description: Ubuntu 23.10

Configured using:
 'configure --prefix=/snap/emacs/current/usr --with-x-toolkit=gtk3
 --without-xaw3d --with-modules --with-cairo
 --with-native-compilation=aot --without-pgtk --with-xinput2
 --with-tree-sitter --with-json
 'CFLAGS=-isystem/build/emacs/parts/emacs/install/usr/include
 -isystem/build/emacs/parts/emacs/install/usr/include/x86_64-linux-gnu
 -isystem/build/emacs/stage/usr/include -O2'
 'CPPFLAGS=-isystem/build/emacs/parts/emacs/install/usr/include
 -isystem/build/emacs/parts/emacs/install/usr/include/x86_64-linux-gnu
 -isystem/build/emacs/stage/usr/include'
 'LDFLAGS=-L/build/emacs/parts/emacs/install/lib
 -L/build/emacs/parts/emacs/install/usr/lib
 -L/build/emacs/parts/emacs/install/lib/x86_64-linux-gnu
 -L/build/emacs/parts/emacs/install/usr/lib/x86_64-linux-gnu
 -L/build/emacs/stage/usr/lib''

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES
NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3
THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER X11 XDBE XIM XINPUT2 XPM
GTK3 ZLIB

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

Major mode: LaTeX

Minor modes in effect:
  helm-mode: t
  helm-minibuffer-history-mode: t
  TeX-PDF-mode: t
  lsp-diagnostics-mode: t
  lsp-modeline-workspace-status-mode: t
  lsp-modeline-diagnostics-mode: t
  lsp-modeline-code-actions-mode: t
  savehist-mode: t
  lsp-ui-mode: t
  lsp-ui-sideline-mode: t
  flycheck-mode: t
  lsp-managed-mode: t
  lsp-mode: t
  doom-modeline-mode: t
  helm-file-preview-mode: t
  delete-selection-mode: t
  global-git-commit-mode: t
  magit-auto-revert-mode: t
  auto-revert-mode: t
  server-mode: t
  shell-dirtrack-mode: t
  async-bytecomp-package-mode: t
  override-global-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
  blink-cursor-mode: t
  line-number-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
/home/lord/.emacs.d/elpa/transient-20240831.2233/transient hides /snap/emacs/current/usr/share/emacs/29.4/lisp/transient

Features:
(mailalias mailclient textsec uni-scripts idna-mapping ucs-normalize
uni-confusable textsec-check shadow sort mail-extr emacsbug mm-archive
url-cache url-http url-auth url-gw shortdoc help-fns radix-tree python
sh-script treesit executable conf-mode vc-hg vc-bzr vc-src vc-sccs
vc-svn vc-cvs vc-rcs log-view bug-reference magit-extras chatgpt-shell
shell-maker ielm eshell esh-mode esh-cmd esh-ext esh-opt esh-proc esh-io
esh-arg esh-module esh-groups esh-util helm-command helm-elisp helm-eval
edebug debug backtrace helm-info helm-mode helm-misc misearch
multi-isearch preview tex-mode font-latex latex latex-flymake tex-ispell
tex-style tex texmathp latexenc image-file image-converter winner
helm-external helm-net tramp-archive tramp-gvfs tramp-cache time-stamp
zeroconf ffap lsp-diagnostics lsp-modeline lsp-lens mule-util
display-line-numbers lsp-zig lsp-yang lsp-yaml lsp-xml lsp-wgsl
lsp-volar lsp-vimscript lsp-vhdl lsp-vetur lsp-html lsp-verilog lsp-vala
lsp-v lsp-typeprof lsp-ttcn3 lsp-trunk lsp-toml lsp-tilt lsp-tex
lsp-terraform lsp-svelte lsp-steep lsp-sqls lsp-sql lsp-sorbet
lsp-solidity lsp-solargraph lsp-semgrep lsp-rust lsp-ruff-lsp
lsp-ruby-syntax-tree lsp-ruby-lsp lsp-rubocop lsp-roslyn lsp-rf
lsp-remark lsp-racket lsp-r lsp-qml lsp-pylsp lsp-pyls lsp-pwsh
lsp-purescript lsp-pls lsp-php lsp-perlnavigator lsp-perl lsp-openscad
lsp-ocaml lsp-nushell lsp-nix lsp-nim lsp-nginx lsp-move lsp-mojo
lsp-mint lsp-meson lsp-mdx lsp-marksman lsp-markdown lsp-magik lsp-lua
lsp-lisp lsp-kotlin lsp-json lsp-jq lsp-javascript lsp-idris lsp-haxe
lsp-hack lsp-groovy lsp-graphql lsp-golangci-lint lsp-glsl lsp-gleam
lsp-gdscript lsp-fsharp lsp-fortran lsp-eslint lsp-erlang lsp-emmet
lsp-elm lsp-elixir lsp-earthly lsp-dockerfile lsp-dhall lsp-d lsp-cypher
lsp-cucumber lsp-css lsp-csharp lsp-crystal lsp-credo lsp-cobol
lsp-cmake lsp-clojure lsp-clangd lsp-bufls lsp-go lsp-completion
lsp-beancount lsp-bash lsp-awk lsp-autotools lsp-astro lsp-asm
lsp-ansible lsp-angular lsp-ada lsp-semantic-tokens lsp-actionscript
oc-basic ol-eww eww url-queue mm-url ol-rmail ol-mhe ol-irc ol-info
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 gnus-cloud nnimap
nnmail mail-source utf7 nnoo gnus-spec gnus-int gnus-range gnus-win gnus
nnheader range ol-docview doc-view jka-compr ol-bibtex bibtex ol-bbdb
ol-w3m ol-doi org-link-doi ox-md ox-beamer zoom-frm frame-cmds frame-fns
avoid solarized-dark-theme savehist rust-utils rust-prog-mode rust-mode
rust-playpen rust-compile rust-cargo rust-common rust-rustfmt lsp-ui
lsp-ui-flycheck lsp-ui-doc goto-addr lsp-ui-imenu lsp-ui-peek
lsp-ui-sideline flycheck lsp-ui-util face-remap keytar lsp-grammarly
grammarly lsp-mode lsp-protocol tree-widget wid-edit spinner
network-stream nsm markdown-mode lv inline ht langtool ob-ein ein-cell
ein-shared-output ein-output-area ein-kernel ein-ipdb ein-query
ein-events ein-websocket websocket bindat ein-node ewoc ein-log
ein-classes ein-core request anaphora ein-utils deferred ein
org-protocol epresent 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-element
org-persist org-id org-refile avl-tree org-bullets org ob ob-tangle
ob-ref ob-lob ob-table ob-exp org-macro org-src ob-comint org-pcomplete
org-list org-footnote org-faces org-entities 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 tuareg tuareg-compat tuareg-opam flymake-proc
flymake caml-help view find-file merlin-company merlin-xref merlin-cap
merlin caml-types dune-format reformatter dune flex-mode jison-mode
bison-mode slime apropos etags fileloop generator xref arc-mode
archive-mode pp hyperspec company-coq company-coq-utils company-coq-tg
company-coq-abbrev notifications dbus pulse yasnippet smie shr
pixel-fill kinsoku url-file svg xml hideshow noutline outline
company-math math-symbol-lists company doom-modeline
doom-modeline-segments doom-modeline-env doom-modeline-core shrink-path
f s 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 org-pretty-table
helm-file-preview project delsel ws-butler iflipb helm-ag compile
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 magit-diff
smerge-mode diff git-commit log-edit message sendmail yank-media puny
rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util
text-property-search 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 magit-margin magit-transient magit-process with-editor server
magit-mode transient benchmark magit-git magit-base magit-section
cursor-sensor crm dash compat compat-30 cc-mode cc-fonts cc-guess
cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs
solarized-theme solarized solarized-faces color imenu-anywhere
helm-imenu imenu helm-flyspell helm-ls-git helm-files image-dired
image-dired-tags image-dired-external image-dired-util xdg image-mode
dired dired-loaddefs exif filenotify tramp tramp-loaddefs trampver
tramp-integration files-x tramp-compat shell pcomplete comint ansi-osc
ring parse-time iso8601 time-date helm-buffers all-the-icons
all-the-icons-faces data-material data-weathericons data-octicons
data-fileicons data-faicons data-alltheicons helm-occur helm-tags
helm-locate helm-grep helm-regexp format-spec ansi-color helm-utils
helm-help helm-types vc-git diff-mode vc vc-dispatcher helm
helm-global-bindings helm-easymenu helm-core async-bytecomp helm-source
helm-multi-match helm-lib async flyspell ispell multiple-cursors
mc-separate-operations rectangular-region-mode mc-mark-pop mc-edit-lines
mc-hide-unmatched-lines-mode mc-mark-more sgml-mode facemenu dom
thingatpt mc-cycle-cursors multiple-cursors-core advice rect edmacro
kmacro use-package-bind-key bind-key easy-mmode use-package-ensure
use-package-core finder-inf site-start comp comp-cstr warnings icons
cl-extra help-mode 0blayout-autoloads 0x0-autoloads abl-mode-autoloads
all-the-icons-autoloads bison-mode-autoloads chatgpt-shell-autoloads
company-coq-autoloads company-math-autoloads dante-autoloads
doom-modeline-autoloads dune-autoloads dune-format-autoloads
ein-autoloads deferred-autoloads anaphora-autoloads epresent-autoloads
flycheck-autoloads gnu-elpa-keyring-update-autoloads
haskell-mode-autoloads helm-ag-autoloads helm-file-preview-autoloads
helm-flyspell-autoloads helm-ls-git-autoloads helm-lsp-autoloads
helm-swoop-autoloads helm-autoloads helm-core-autoloads async-autoloads
iflipb-autoloads imenu-anywhere-autoloads keytar-autoloads
langtool-autoloads latex-extra-autoloads auctex-autoloads tex-site
lcr-autoloads lsp-grammarly-autoloads grammarly-autoloads
lsp-ui-autoloads lsp-mode-autoloads ht-autoloads lv-autoloads
magit-autoloads pcase magit-section-autoloads markdown-mode-autoloads
math-symbol-lists-autoloads merlin-company-autoloads company-autoloads
merlin-autoloads multiple-cursors-autoloads nerd-icons-autoloads
opam-switch-mode-autoloads org-bullets-autoloads pkg-info-autoloads
epl-autoloads polymode-autoloads popup-autoloads proof-general-autoloads
proof-site proof-autoloads reformatter-autoloads request-autoloads
rust-mode-autoloads shell-maker-autoloads shrink-path-autoloads
f-autoloads dash-autoloads s-autoloads slime-autoloads
macrostep-autoloads solarized-theme-autoloads spinner-autoloads
transient-autoloads transpose-frame-autoloads tree-sitter-autoloads
treesit-auto-autoloads tsc-autoloads tuareg-autoloads rx caml-autoloads
websocket-autoloads wfnames-autoloads with-editor-autoloads info
compat-autoloads ws-butler-autoloads xterm-color-autoloads
yasnippet-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 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
move-toolbar gtk x-toolkit xinput2 x multi-tty make-network-process
native-compile emacs)

Memory information:
((conses 16 2908334 59899)
 (symbols 48 74434 57)
 (strings 32 527596 20484)
 (string-bytes 1 15859871)
 (vectors 16 192370)
 (vector-slots 8 4113748 99873)
 (floats 8 1602 640)
 (intervals 56 218265 4026)
 (buffers 984 54))


-- 
"La perfection est atteinte non quand il ne reste rien a ajouter, mais quand il ne reste rien a enlever."  (Antoine de Saint-Exupery)