GNU bug report logs - #36617
26.1; Indentation depends on earlier file contents

Previous Next

Package: emacs;

Reported by: Volker Weißmann <volker.weissmann <at> gmx.de>

Date: Fri, 12 Jul 2019 14:13:04 UTC

Severity: minor

Found in version 26.1

Done: Sebastian Urban <mrsebastianurban <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 36617 in the body.
You can then email your comments to 36617 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#36617; Package emacs. (Fri, 12 Jul 2019 14:13:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Volker Weißmann <volker.weissmann <at> gmx.de>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 12 Jul 2019 14:13:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Volker Weißmann <volker.weissmann <at> gmx.de>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.1; Indentation depends on earlier file contents
Date: Fri, 12 Jul 2019 13:50:23 +0200

How to reproduce:
1. Create the emtpy file "a.tex"
2. Create the file "b.tex" with $\frac{a}{b}$ in it
3. Put (electric-pair-mode) in your emacs init.

4. Open "a.tex". Type "{" and press enter. Your result should look like
this:
{
|
}
("|" marks the cursor Position)

5. Open "b.tex". Delete the hole text, type "{" and press enter. Your
result should look like this:
$\frac{a}{b}$
{
|
}
("|" marks the cursor Position)

Explanation why this is a bug and not a feature: Indentation in 4. and
5. should be the same, but they are different.

If you fix this bug, please create an option to get the behavior in 5.





In GNU Emacs 26.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.7)
of 2019-04-11, modified by Debian built on lcy01-amd64-021
Windowing system distributor 'The X.Org Foundation', version 11.0.12004000
System Description: Ubuntu 19.04

Recent messages:
Loading /etc/emacs/site-start.d/50latex-cjk-thai.el (source)...done
Loading /etc/emacs/site-start.d/50texlive-lang-english.el (source)...done
Loading /home/volker/Nextcloud/DatenVolker/workenv/emacs/init...done
For information about GNU Emacs and the GNU system, type C-h C-a.
b.tex has auto save data; consider M-x recover-this-file
user-error: Beginning of history; no preceding item
Making completion list...
user-error: Beginning of history; no preceding item
user-error: End of history; no default available
delete-backward-char: Text is read-only

Configured using:
'configure --build x86_64-linux-gnu --prefix=/usr
--sharedstatedir=/var/lib --libexecdir=/usr/lib
--localstatedir=/var/lib --infodir=/usr/share/info
--mandir=/usr/share/man --enable-libsystemd --with-pop=yes
--enable-locallisppath=/etc/emacs:/usr/local/share/emacs/26.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/26.1/site-lisp:/usr/share/emacs/site-lisp

--with-sound=alsa --without-gconf --with-mailutils --build
x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib
--libexecdir=/usr/lib --localstatedir=/var/lib
--infodir=/usr/share/info --mandir=/usr/share/man --enable-libsystemd
--with-pop=yes
--enable-locallisppath=/etc/emacs:/usr/local/share/emacs/26.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/26.1/site-lisp:/usr/share/emacs/site-lisp

--with-sound=alsa --without-gconf --with-mailutils --with-x=yes
--with-x-toolkit=gtk3 --with-toolkit-scroll-bars 'CFLAGS=-g -O2
-fdebug-prefix-map=/build/emacs-cQxEw2/emacs-26.1+1=.
-fstack-protector-strong
-Wformat -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time
-D_FORTIFY_SOURCE=2' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro''

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY
ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 THREADS LIBSYSTEMD LCMS2

Important settings:
value of $LC_MONETARY: de_DE.UTF-8
value of $LC_NUMERIC: de_DE.UTF-8
value of $LC_TIME: de_DE.UTF-8
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: @im=ibus
locale-coding-system: utf-8-unix

Major mode: TeX

Minor modes in effect:
shell-dirtrack-mode: t
electric-pair-mode: t
tooltip-mode: t
global-eldoc-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
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t

Load-path shadows:
/usr/share/emacs/site-lisp/latex-cjk-thai/thai-word hides
/usr/share/emacs/26.1/lisp/language/thai-word

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
format-spec rfc822 mml mml-sec epa derived epg gnus-util rmail
rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils tex-mode compile shell pcomplete comint
ansi-color ring latexenc elec-pair finder-inf edmacro kmacro info
package easymenu epg-config url-handlers url-parse auth-source cl-seq
eieio eieio-core cl-macs eieio-loaddefs password-cache url-vars seq
byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib time-date
mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type 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 elisp-mode lisp-mode prog-mode register page menu-bar
rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame cl-generic 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 charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote dbusbind inotify lcms2
dynamic-setting system-font-setting font-render-setting move-toolbar gtk
x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 136219 9467)
(symbols 48 24157 1)
(miscs 40 49 151)
(strings 32 43902 1327)
(string-bytes 1 1256756)
(vectors 16 19150)
(vector-slots 8 548060 6348)
(floats 8 58 307)
(intervals 56 296 0)
(buffers 992 13))





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36617; Package emacs. (Sat, 07 Sep 2019 09:19:01 GMT) Full text and rfc822 format available.

Message #8 received at 36617 <at> debbugs.gnu.org (full text, mbox):

From: Sebastian Urban <mrsebastianurban <at> gmail.com>
To: Volker Weißmann <volker.weissmann <at> gmx.de>,
 36617 <at> debbugs.gnu.org
Subject: Re: bug#36617: 26.1; Indentation depends on earlier file contents
Date: Sat, 7 Sep 2019 11:18:34 +0200
That's (probably) because when you open empty file (step 4) you are in
'latex-mode' (LaTeX in mode line) and when you open file with ONLY
$\frac{a}{b}$ (step 5) - you'll be in 'tex-mode' (TeX in mode line).
Simply switch to 'latex-mode' (M-x latex-mode) and you will have the
same indentation.


S. U.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36617; Package emacs. (Sun, 08 Sep 2019 22:04:02 GMT) Full text and rfc822 format available.

Message #11 received at 36617 <at> debbugs.gnu.org (full text, mbox):

From: Volker Weißmann <volker.weissmann <at> gmx.de>
To: 36617 <at> debbugs.gnu.org
Subject: Solved
Date: Sun, 8 Sep 2019 22:40:51 +0200
Thank you Sebastian Urban. It is kind of embarrassing that I did not
noticed this for so long. This explains a lot fo weird behaviou. This
bug is solved.





Reply sent to Sebastian Urban <mrsebastianurban <at> gmail.com>:
You have taken responsibility. (Thu, 12 Sep 2019 13:31:01 GMT) Full text and rfc822 format available.

Notification sent to Volker Weißmann <volker.weissmann <at> gmx.de>:
bug acknowledged by developer. (Thu, 12 Sep 2019 13:31:02 GMT) Full text and rfc822 format available.

Message #16 received at 36617-done <at> debbugs.gnu.org (full text, mbox):

From: Sebastian Urban <mrsebastianurban <at> gmail.com>
To: 36617-done <at> debbugs.gnu.org
Subject: Re: bug#36617: Solved
Date: Thu, 12 Sep 2019 13:30:02 +0200
I'm just closing this bug.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 11 Oct 2019 11:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 170 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.