GNU bug report logs -
#65591
30.0.50; ELPA pgk expreg: marking paragraph doesn't work in AUCTeX LaTeX-mode
Previous Next
Reported by: Tassilo Horn <thorn <at> fastmail.fm>
Date: Tue, 29 Aug 2023 10:33:02 UTC
Severity: normal
Found in version 30.0.50
Done: Yuan Fu <casouri <at> gmail.com>
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 65591 in the body.
You can then email your comments to 65591 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#65591
; Package
emacs
.
(Tue, 29 Aug 2023 10:33:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Tassilo Horn <thorn <at> fastmail.fm>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 29 Aug 2023 10:33:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
When using `expreg-expand' repeatedly in an AUCTeX LaTeX-mode buffer, it
will never mark the complete paragraph. The reason is that
`expreg--paragraph' tries to distinguish between programming and
text/prose modes where in the former, it wants to mark the defun whereas
in the latter, it marks the paragraph.
AUCTeX LaTeX-mode (and (La)TeX as a language) is kind of a middle ground
between prog-mode and text-mode. It is derived from text-mode (and NOT
prog-mode) but it defines a `beginning-of-defun-function' which deals
with environments, e.g., \begin{foo}...\end{foo}. It can make sense to
mark both, the current environment as well as the current paragraph.
However, currently expreg defines a programming mode to derive from
prog-mode OR define a `beginning-of-defun-function' and for a
programming mode, paragraph marking is disabled.
I guess it would be better to have separate `expreg--paragraph' and
`expreg--defun' functions instead of conflating paragraph and defun
marking in `expreg--paragraph'.
In GNU Emacs 30.0.50 (build 17, x86_64-pc-linux-gnu, GTK+ Version
3.24.38, cairo version 1.17.8) of 2023-08-29 built on thinkpad-t440p
Repository revision: 804a96af28235b8a1a1199fc9c2e96e367ce14f6
Repository branch: master
System Description: Arch Linux
Configured using:
'configure --with-tree-sitter --with-pgtk --with-modules'
Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSYSTEMD LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PGTK
PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS
TREE_SITTER WEBP XIM GTK3 ZLIB
Important settings:
value of $LC_MONETARY: de_DE.utf8
value of $LC_NUMERIC: de_DE.utf8
value of $LC_TIME: de_DE.utf8
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
Major mode: mu4e:main
Minor modes in effect:
hexl-follow-ascii: t
editorconfig-mode: t
global-aggressive-indent-mode: t
pdf-occur-global-minor-mode: t
diredfl-global-mode: t
mu4e-search-minor-mode: t
mu4e-update-minor-mode: t
mu4e-context-minor-mode: t
mu4e-modeline-mode: t
which-key-mode: t
highlight-parentheses-mode: t
yas-global-mode: t
yas-minor-mode: t
global-git-commit-mode: t
magit-auto-revert-mode: t
server-mode: t
corfu-history-mode: t
global-corfu-mode: t
corfu-mode: t
vertico-mode: t
marginalia-mode: t
minibuffer-depth-indicate-mode: t
switchy-window-minor-mode: t
electric-pair-mode: t
recentf-mode: t
pixel-scroll-precision-mode: t
pixel-scroll-mode: t
override-global-mode: t
repeat-mode: t
save-place-mode: t
savehist-mode: t
puni-global-mode: t
puni-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
buffer-read-only: 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
overwrite-mode: overwrite-mode-binary
Load-path shadows:
~/Repos/el/mu/mu4e/mu4e hides ~/Repos/el/mu/build/mu4e/mu4e
~/Repos/el/mu/mu4e/mu4e-modeline hides ~/Repos/el/mu/build/mu4e/mu4e-modeline
~/Repos/el/mu/mu4e/mu4e-context hides ~/Repos/el/mu/build/mu4e/mu4e-context
~/Repos/el/mu/mu4e/mu4e-main hides ~/Repos/el/mu/build/mu4e/mu4e-main
~/Repos/el/mu/mu4e/mu4e-vars hides ~/Repos/el/mu/build/mu4e/mu4e-vars
~/Repos/el/mu/mu4e/mu4e-window hides ~/Repos/el/mu/build/mu4e/mu4e-window
~/Repos/el/mu/mu4e/mu4e-speedbar hides ~/Repos/el/mu/build/mu4e/mu4e-speedbar
~/Repos/el/mu/mu4e/mu4e-view hides ~/Repos/el/mu/build/mu4e/mu4e-view
~/Repos/el/mu/mu4e/mu4e-thread hides ~/Repos/el/mu/build/mu4e/mu4e-thread
~/Repos/el/mu/mu4e/mu4e-bookmarks hides ~/Repos/el/mu/build/mu4e/mu4e-bookmarks
~/Repos/el/mu/mu4e/mu4e-org hides ~/Repos/el/mu/build/mu4e/mu4e-org
~/Repos/el/mu/mu4e/mu4e-lists hides ~/Repos/el/mu/build/mu4e/mu4e-lists
~/Repos/el/mu/mu4e/mu4e-actions hides ~/Repos/el/mu/build/mu4e/mu4e-actions
~/Repos/el/mu/mu4e/mu4e-helpers hides ~/Repos/el/mu/build/mu4e/mu4e-helpers
~/Repos/el/mu/mu4e/mu4e-search hides ~/Repos/el/mu/build/mu4e/mu4e-search
~/Repos/el/mu/mu4e/mu4e-server hides ~/Repos/el/mu/build/mu4e/mu4e-server
~/Repos/el/mu/mu4e/mu4e-obsolete hides ~/Repos/el/mu/build/mu4e/mu4e-obsolete
~/Repos/el/mu/mu4e/mu4e-update hides ~/Repos/el/mu/build/mu4e/mu4e-update
~/Repos/el/mu/mu4e/mu4e-draft hides ~/Repos/el/mu/build/mu4e/mu4e-draft
~/Repos/el/mu/mu4e/mu4e-message hides ~/Repos/el/mu/build/mu4e/mu4e-message
~/Repos/el/mu/mu4e/mu4e-compose hides ~/Repos/el/mu/build/mu4e/mu4e-compose
~/Repos/el/mu/mu4e/mu4e-headers hides ~/Repos/el/mu/build/mu4e/mu4e-headers
~/Repos/el/mu/mu4e/mu4e-query-items hides ~/Repos/el/mu/build/mu4e/mu4e-query-items
~/Repos/el/mu/mu4e/mu4e-notification hides ~/Repos/el/mu/build/mu4e/mu4e-notification
~/Repos/el/mu/mu4e/mu4e-contacts hides ~/Repos/el/mu/build/mu4e/mu4e-contacts
~/Repos/el/mu/mu4e/mu4e-icalendar hides ~/Repos/el/mu/build/mu4e/mu4e-icalendar
~/Repos/el/mu/mu4e/mu4e-mark hides ~/Repos/el/mu/build/mu4e/mu4e-mark
~/Repos/el/mu/mu4e/mu4e-contrib hides ~/Repos/el/mu/build/mu4e/mu4e-contrib
~/Repos/el/mu/mu4e/mu4e-folders hides ~/Repos/el/mu/build/mu4e/mu4e-folders
~/Repos/el/mu/mu4e/mu4e-mime-parts hides ~/Repos/el/mu/build/mu4e/mu4e-mime-parts
/home/horn/.emacs.d/elpa/ef-themes-1.3.0.0.20230825.34525/theme-loaddefs hides /home/horn/Repos/el/emacs/lisp/theme-loaddefs
/home/horn/.emacs.d/elpa/transient-20230825.2019/transient hides /home/horn/Repos/el/emacs/lisp/transient
Features:
(shadow expreg cap-words superword subword face-remap cus-start emacsbug
so-long view tramp-cmds puni pulse display-fill-column-indicator
display-line-numbers ef-cherie-theme generic totp-widget totp hexl
bindat yaml-mode fish-mode cargo xref project cargo-process web-mode
disp-table preview-latex tex-site editorconfig editorconfig-core
editorconfig-core-handle editorconfig-fnmatch elfeed-show elfeed-search
vc-hg vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs log-view debbugs-browse
elfeed-csv elfeed elfeed-curl elfeed-log elfeed-db elfeed-lib avl-tree
generator url-queue xml-query hl-todo aggressive-indent rainbow-mode
pdf-occur tablist tablist-filter semantic/wisent/comp semantic/wisent
semantic/wisent/wisent semantic/util-modes semantic/util semantic
semantic/tag semantic/lex semantic/fw mode-local cedet pdf-isearch
pdf-misc pdf-tools pdf-view jka-compr pdf-cache pdf-info tq pdf-util
pdf-macs image-mode exif vc-git vc-dir ewoc epa-file diredfl dired-x
mu4e-icalendar gnus-icalendar icalendar diary-lib diary-loaddefs mu4e
mu4e-org mu4e-notification notifications mu4e-main mu4e-view
mu4e-mime-parts mu4e-headers mu4e-thread mu4e-compose mu4e-draft
mu4e-actions org-capture org-refile 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-compat org-version org-macs
smtpmail mu4e-search mu4e-lists mu4e-bookmarks mu4e-mark mu4e-message
flow-fill mule-util hl-line mu4e-contacts mu4e-update mu4e-folders
mu4e-context mu4e-query-items mu4e-server mu4e-modeline mu4e-vars
mu4e-helpers mu4e-config mu4e-window magit-bookmark bookmark ido
mu4e-obsolete hippie-exp auto-dictionary flyspell ispell tramp-smb
which-key highlight-parentheses restclient yasnippet forge-list
forge-commands forge-semi forge-bitbucket buck forge-gogs gogs
forge-gitea gtea forge-gitlab glab forge-github ghub-graphql treepy
gsexp ghub let-alist forge-notify forge-revnote forge-pullreq
forge-issue forge-topic yaml forge-post markdown-mode thingatpt noutline
outline forge-repo forge forge-core forge-db closql
emacsql-sqlite-common emacsql emacsql-compiler eieio-base
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 pcvs-util add-log
magit-core magit-autorevert autorevert filenotify magit-margin
magit-transient magit-process with-editor server magit-mode magit-git
magit-base magit-section cursor-sensor crm dash visual-filename-abbrev
rg vc vc-dispatcher rg-info-hack advice rg-menu transient rg-ibuffer
rg-result wgrep-rg wgrep rg-history rg-header ibuf-ext ibuffer
ibuffer-loaddefs grep compile debbugs soap-client url-http url-auth
url-gw nsm warnings rng-xsd rng-dt rng-util xsd-regexp bug-reference
kind-icon svg-lib color corfu-history corfu vertico marginalia icomplete
mb-depth use-package-diminish switchy-window compat elec-pair recentf
tree-widget pixel-scroll cua-base edmacro kmacro use-package-bind-key
bind-key diminish repeat treesit saveplace tramp-sh savehist smiley
gnus-art mm-uu mml2015 mm-view mml-smime smime gnutls dig gnus-sum shr
pixel-fill kinsoku url-file svg dom gnus-group gnus-undo gnus-start
gnus-dbus dbus xml gnus-cloud nnimap nnmail mail-source utf7 nnoo
gnus-spec gnus-int gnus-range message sendmail yank-media puny dired
dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config
mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mailabbrev gmm-utils mailheader gnus-win gnus nnheader
gnus-util text-property-search mm-util mail-prsvr mail-utils range
ef-themes cl-extra use-package-ensure use-package-core finder-inf tramp
rx trampver tramp-integration files-x tramp-message help-mode
tramp-compat xdg shell pcomplete comint ansi-osc ring parse-time iso8601
time-date format-spec ansi-color tramp-loaddefs cus-edit pp cus-load
icons wid-edit aggressive-indent-autoloads auto-dictionary-autoloads
cape-autoloads cargo-autoloads clojure-mode-autoloads corfu-autoloads
csv-mode-autoloads debbugs-autoloads diminish-autoloads
diredfl-autoloads editorconfig-autoloads ef-themes-autoloads
elfeed-autoloads ement-autoloads expreg-autoloads fish-mode-autoloads
forge-autoloads closql-autoloads emacsql-autoloads ghub-autoloads
highlight-parentheses-autoloads hl-todo-autoloads kind-icon-autoloads
magit-autoloads pcase git-commit-autoloads marginalia-autoloads
markdown-mode-autoloads mastodon-autoloads pdf-tools-autoloads
persist-autoloads plz-autoloads puni-autoloads easy-mmode
rainbow-mode-autoloads rcirc-color-autoloads request-autoloads
restclient-autoloads rg-autoloads svg-lib-autoloads
symbol-overlay-autoloads tablist-autoloads taxy-magit-section-autoloads
taxy-autoloads magit-section-autoloads totp-autoloads
transient-autoloads treepy-autoloads ts-autoloads s-autoloads
dash-autoloads vertico-autoloads visual-filename-abbrev-autoloads
web-mode-autoloads wgrep-autoloads which-key-autoloads
with-editor-autoloads info compat-autoloads yaml-autoloads
yaml-mode-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/pgtk-win pgtk-win
term/common-win pgtk-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
dynamic-setting system-font-setting font-render-setting cairo gtk pgtk
lcms2 multi-tty move-toolbar make-network-process emacs)
Memory information:
((conses 16 706766 103479) (symbols 48 50658 20) (strings 32 228954 7359)
(string-bytes 1 6621999) (vectors 16 90668) (vector-slots 8 1082834 62919)
(floats 8 626 333) (intervals 56 1791 593) (buffers 992 15))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65591
; Package
emacs
.
(Wed, 30 Aug 2023 07:33:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 65591 <at> debbugs.gnu.org (full text, mbox):
>
> When using `expreg-expand' repeatedly in an AUCTeX LaTeX-mode buffer, it
> will never mark the complete paragraph. The reason is that
> `expreg--paragraph' tries to distinguish between programming and
> text/prose modes where in the former, it wants to mark the defun whereas
> in the latter, it marks the paragraph.
>
> AUCTeX LaTeX-mode (and (La)TeX as a language) is kind of a middle ground
> between prog-mode and text-mode. It is derived from text-mode (and NOT
> prog-mode) but it defines a `beginning-of-defun-function' which deals
> with environments, e.g., \begin{foo}...\end{foo}. It can make sense to
> mark both, the current environment as well as the current paragraph.
> However, currently expreg defines a programming mode to derive from
> prog-mode OR define a `beginning-of-defun-function' and for a
> programming mode, paragraph marking is disabled.
>
> I guess it would be better to have separate `expreg--paragraph' and
> `expreg--defun' functions instead of conflating paragraph and defun
> marking in `expreg--paragraph’.
I make expreg—paragraph to process both defun and paragraph, rather exclusively one of them. This should fix It for TeX modes. Please see if works :-)
Yuan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65591
; Package
emacs
.
(Wed, 30 Aug 2023 15:59:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 65591 <at> debbugs.gnu.org (full text, mbox):
Yuan Fu <casouri <at> gmail.com> writes:
Hi Yuan,
> I make expreg—paragraph to process both defun and paragraph, rather
> exclusively one of them. This should fix It for TeX modes. Please see
> if works :-)
Not quite. The problem is that expreg--paragraph-defun now first tries
"defun" and thereby might move point so that the "paragraph" part starts
at a completely different position as where point was originally.
Bye,
Tassilo
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65591
; Package
emacs
.
(Thu, 31 Aug 2023 00:06:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 65591 <at> debbugs.gnu.org (full text, mbox):
> On Aug 30, 2023, at 8:54 AM, Tassilo Horn <thorn <at> fastmail.fm> wrote:
>
> Yuan Fu <casouri <at> gmail.com> writes:
>
> Hi Yuan,
>
>> I make expreg—paragraph to process both defun and paragraph, rather
>> exclusively one of them. This should fix It for TeX modes. Please see
>> if works :-)
>
> Not quite. The problem is that expreg--paragraph-defun now first tries
> "defun" and thereby might move point so that the "paragraph" part starts
> at a completely different position as where point was originally.
Ah, right! I pushed a fix for that.
Thanks,
Yuan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65591
; Package
emacs
.
(Thu, 31 Aug 2023 10:37:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 65591 <at> debbugs.gnu.org (full text, mbox):
Yuan Fu <casouri <at> gmail.com> writes:
>> Not quite. The problem is that expreg--paragraph-defun now first
>> tries "defun" and thereby might move point so that the "paragraph"
>> part starts at a completely different position as where point was
>> originally.
>
> Ah, right! I pushed a fix for that.
Yes, now it looks right. Unfortunately, there seems to be a bug in
AUCTeX end-of-defun-function so right now, I only get paragraph marking
but not "defun" (aka current environment) marking. But from expreg's
point of view, this issue can be closed.
Thanks a lot,
Tassilo
Reply sent
to
Yuan Fu <casouri <at> gmail.com>
:
You have taken responsibility.
(Thu, 31 Aug 2023 19:07:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Tassilo Horn <thorn <at> fastmail.fm>
:
bug acknowledged by developer.
(Thu, 31 Aug 2023 19:07:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 65591-done <at> debbugs.gnu.org (full text, mbox):
> On Aug 31, 2023, at 3:33 AM, Tassilo Horn <thorn <at> fastmail.fm> wrote:
>
> Yuan Fu <casouri <at> gmail.com> writes:
>
>>> Not quite. The problem is that expreg--paragraph-defun now first
>>> tries "defun" and thereby might move point so that the "paragraph"
>>> part starts at a completely different position as where point was
>>> originally.
>>
>> Ah, right! I pushed a fix for that.
>
> Yes, now it looks right. Unfortunately, there seems to be a bug in
> AUCTeX end-of-defun-function so right now, I only get paragraph marking
> but not "defun" (aka current environment) marking. But from expreg's
> point of view, this issue can be closed.
>
> Thanks a lot,
> Tassilo
Great! Closing this.
Yuan
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 29 Sep 2023 11:24:10 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 224 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.