unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#36617: 26.1; Indentation depends on earlier file contents
@ 2019-07-12 11:50 Volker Weißmann
  2019-09-07  9:18 ` Sebastian Urban
  2019-09-08 20:40 ` bug#36617: Solved Volker Weißmann
  0 siblings, 2 replies; 4+ messages in thread
From: Volker Weißmann @ 2019-07-12 11:50 UTC (permalink / raw)
  To: 36617



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))






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

* bug#36617: 26.1; Indentation depends on earlier file contents
  2019-07-12 11:50 bug#36617: 26.1; Indentation depends on earlier file contents Volker Weißmann
@ 2019-09-07  9:18 ` Sebastian Urban
  2019-09-08 20:40 ` bug#36617: Solved Volker Weißmann
  1 sibling, 0 replies; 4+ messages in thread
From: Sebastian Urban @ 2019-09-07  9:18 UTC (permalink / raw)
  To: Volker Weißmann, 36617

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.





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

* bug#36617: Solved
  2019-07-12 11:50 bug#36617: 26.1; Indentation depends on earlier file contents Volker Weißmann
  2019-09-07  9:18 ` Sebastian Urban
@ 2019-09-08 20:40 ` Volker Weißmann
  2019-09-12 11:30   ` Sebastian Urban
  1 sibling, 1 reply; 4+ messages in thread
From: Volker Weißmann @ 2019-09-08 20:40 UTC (permalink / raw)
  To: 36617

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.






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

* bug#36617: Solved
  2019-09-08 20:40 ` bug#36617: Solved Volker Weißmann
@ 2019-09-12 11:30   ` Sebastian Urban
  0 siblings, 0 replies; 4+ messages in thread
From: Sebastian Urban @ 2019-09-12 11:30 UTC (permalink / raw)
  To: 36617-done

I'm just closing this bug.





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

end of thread, other threads:[~2019-09-12 11:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-12 11:50 bug#36617: 26.1; Indentation depends on earlier file contents Volker Weißmann
2019-09-07  9:18 ` Sebastian Urban
2019-09-08 20:40 ` bug#36617: Solved Volker Weißmann
2019-09-12 11:30   ` Sebastian Urban

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).