GNU bug report logs -
#11646
23.2; latex-close-block indenting \end{verbatim} incorrectly
Previous Next
Reported by: Norman Ramsey <nr <at> cs.tufts.edu>
Date: Thu, 7 Jun 2012 16:26:01 UTC
Severity: minor
Found in version 23.2
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
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 11646 in the body.
You can then email your comments to 11646 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#11646
; Package
emacs
.
(Thu, 07 Jun 2012 16:26:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Norman Ramsey <nr <at> cs.tufts.edu>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 07 Jun 2012 16:26:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
C-x C-f /tmp/foo.text
Enter
\begin{verbatim} RET SPC SPC SPC hello RET C-c C-e
and the resulting \end{verbatim} is indented three spaces instead of in
column 0 as it should be.
The problem does not manifest with \begin{quote}.
In GNU Emacs 23.2.1 (x86_64-pc-linux-gnu, GTK+ Version 2.20.1)
of 2010-12-11 on brahms, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.10707000
configured using `configure '--build' 'x86_64-linux-gnu' '--build' 'x86_64-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.2/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.2/leim' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS=''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: nil
value of $XMODIFIERS: nil
locale-coding-system: nil
default enable-multibyte-characters: t
Major mode: TeX
Minor modes in effect:
flyspell-mode: t
shell-dirtrack-mode: t
tooltip-mode: t
mouse-wheel-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
abbrev-mode: t
Recent input:
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p
C-p C-p C-p C-p C-o b n { a r r y <backspace> a y }
{ c } C-a C-x C-s C-n C-x 4 b i n t e r p s . t e <tab>
C-g C-x 4 f <M-backspace> <M-backspace> <M-backspace>
p a p <tab> h o i <tab> <backspace> t <tab> u l u <tab>
p <tab> i n t <tab> t e <tab> <return> C-s \ c a p
t i o n C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-a
<prior> C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-l
C-p C-p C-SPC C-n M-w C-x o C-n C-n C-o C-o <return>
C-p C-p C-e \ \ <return> C-y C-p M-f M-f _ 2 C-f C-f
v _ 1 SPC \ o p l k <backspace> u s M-d SPC C-a \ t
r a n s i t i o n SPC { C-e M-b M-b M-b M-f C-a M-f
M-f C-f C-f <M-backspace> <backspace> M-f M-f M-f M-e
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-e <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <return>
SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC { v
, SPC \ s t a c k , SPC r h o <backspace> <backspace>
<backspace> \ r h o \ SPC <backspace> <backspace> ,
SPC \ s i g m a } \ \ <return> C-c C-e C-a C-c C-e
C-p C-p C-p <backspace> <backspace> <backspace> C-a
C-n C-c C-e C-p C-p C-p SPC SPC SPC C-a C-n <return>
C-c C-e C-h k C-c C-e M-x r e p o <tab> r <tab> <r
eturn>
Recent messages:
Starting new Ispell process [american] ...
Mark saved where search started
Mark set
Ispell process killed
Starting new Ispell process [american] ...
Mark set
Auto-saving...done
Auto-saving...done
Type C-x 4 C-o RET to restore the other window.
Making completion list...
Load-path shadows:
/usr/share/emacs/site-lisp/haskell-mode/haskell-font-lock hides /usr/share/emacs/23.2/site-lisp/haskell-mode/haskell-font-lock
/usr/share/emacs/site-lisp/haskell-mode/haskell-indentation hides /usr/share/emacs/23.2/site-lisp/haskell-mode/haskell-indentation
/usr/share/emacs/site-lisp/haskell-mode/inf-haskell hides /usr/share/emacs/23.2/site-lisp/haskell-mode/inf-haskell
/usr/share/emacs/site-lisp/haskell-mode/haskell-mode hides /usr/share/emacs/23.2/site-lisp/haskell-mode/haskell-mode
/usr/share/emacs/site-lisp/haskell-mode/haskell-hugs hides /usr/share/emacs/23.2/site-lisp/haskell-mode/haskell-hugs
/usr/share/emacs/site-lisp/haskell-mode/haskell-site-file hides /usr/share/emacs/23.2/site-lisp/haskell-mode/haskell-site-file
/usr/share/emacs/site-lisp/haskell-mode/haskell-cabal hides /usr/share/emacs/23.2/site-lisp/haskell-mode/haskell-cabal
/usr/share/emacs/site-lisp/haskell-mode/ghc-core hides /usr/share/emacs/23.2/site-lisp/haskell-mode/ghc-core
/usr/share/emacs/site-lisp/haskell-mode/haskell-decl-scan hides /usr/share/emacs/23.2/site-lisp/haskell-mode/haskell-decl-scan
/usr/share/emacs/site-lisp/haskell-mode/haskell-doc hides /usr/share/emacs/23.2/site-lisp/haskell-mode/haskell-doc
/usr/share/emacs/site-lisp/haskell-mode/haskell-c hides /usr/share/emacs/23.2/site-lisp/haskell-mode/haskell-c
/usr/share/emacs/site-lisp/haskell-mode/haskell-indent hides /usr/share/emacs/23.2/site-lisp/haskell-mode/haskell-indent
/usr/share/emacs/site-lisp/haskell-mode/haskell-ghci hides /usr/share/emacs/23.2/site-lisp/haskell-mode/haskell-ghci
/usr/share/emacs/site-lisp/haskell-mode/haskell-simple-indent hides /usr/share/emacs/23.2/site-lisp/haskell-mode/haskell-simple-indent
/usr/share/emacs/23.2/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup
~nr/emacs/noweb-mode hides /usr/share/emacs/site-lisp/noweb-mode
~nr/emacs/longlines hides /usr/share/emacs/23.2/lisp/longlines
~nr/emacs/mwheel hides /usr/share/emacs/23.2/lisp/mwheel
/usr/share/emacs23/site-lisp/dictionaries-common/flyspell hides /usr/share/emacs/23.2/lisp/textmodes/flyspell
/usr/share/emacs23/site-lisp/dictionaries-common/ispell hides /usr/share/emacs/23.2/lisp/textmodes/ispell
Features:
(shadow sort mail-extr message sendmail ecomplete rfc822 mml mml-sec
password-cache mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231
rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util netrc
time-date mm-util mail-prsvr gmm-utils wid-edit mailheader canlock sha1
hex-util hashcash mail-utils emacsbug latexenc debug help-mode view
skeleton multi-isearch sml-menus sml-mode cc-mode cc-fonts cc-menus
cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs haskell-font-lock
haskell-decl-scan haskell-doc haskell-indentation haskell-indent
haskell-mode byte-opt bytecomp byte-compile pp haskell-cabal dired
sh-script executable caml vc-git vc-hg flyspell ispell tex-mode
regexp-opt shell desktop darcsum easymenu add-log rect assoc
scroll-in-place noweb derived easy-mmode cl cl-19 multi-mode advice
help-fns advice-preload imenu compile comint ring edmacro kmacro tooltip
ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd font-setting
tool-bar dnd fontset image fringe lisp-mode register page menu-bar
rfn-eshadow timer select scroll-bar mldrag mouse jit-lock font-lock
syntax facemenu font-core frame cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button
minibuffer faces cus-face files text-properties overlay md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process dbusbind system-font-setting
font-render-setting gtk x-toolkit x multi-tty emacs)
Reply sent
to
Stefan Monnier <monnier <at> iro.umontreal.ca>
:
You have taken responsibility.
(Wed, 13 Jun 2012 14:01:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Norman Ramsey <nr <at> cs.tufts.edu>
:
bug acknowledged by developer.
(Wed, 13 Jun 2012 14:01:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 11646-done <at> debbugs.gnu.org (full text, mbox):
> C-x C-f /tmp/foo.text
I presume you meant "foo.tex" ;-)
> Enter
> \begin{verbatim} RET SPC SPC SPC hello RET C-c C-e
> and the resulting \end{verbatim} is indented three spaces instead of in
> column 0 as it should be.
> The problem does not manifest with \begin{quote}.
Yes, verbatim is special in LaTeX, and hence so it is in latex-mode.
The bug actually seems to require you be at EOB when hitting C-c C-e.
I've installed the patch below which seems to fix the root cause.
Stefan
=== modified file 'lisp/textmodes/tex-mode.el'
--- lisp/textmodes/tex-mode.el 2012-04-16 23:57:09 +0000
+++ lisp/textmodes/tex-mode.el 2012-06-13 13:55:17 +0000
@@ -2686,7 +2686,9 @@
"Syntax table used while computing indentation.")
(defun latex-indent (&optional arg)
- (if (and (eq (get-text-property (line-beginning-position) 'face)
+ (if (and (eq (get-text-property (if (and (eobp) (bolp))
+ (max (point-min) (1- (point)))
+ (line-beginning-position)) 'face)
'tex-verbatim))
'noindent
(with-syntax-table tex-latex-indent-syntax-table
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 12 Jul 2012 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 13 years and 59 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.