GNU bug report logs - #17207
24.3; html-mode incorrect indentation inside template syntax

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Jon Dufresne <jon.dufresne@HIDDEN>; dated Sun, 6 Apr 2014 17:51:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 6 Apr 2014 17:50:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 06 13:50:40 2014
Received: from localhost ([127.0.0.1]:38288 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WWrDK-0005nM-Fr
	for submit <at> debbugs.gnu.org; Sun, 06 Apr 2014 13:50:39 -0400
Received: from eggs.gnu.org ([208.118.235.92]:50433)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <jon.dufresne@HIDDEN>) id 1WWpOK-0002cw-Ee
 for submit <at> debbugs.gnu.org; Sun, 06 Apr 2014 11:53:53 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <jon.dufresne@HIDDEN>) id 1WWpOF-0005Ho-LF
 for submit <at> debbugs.gnu.org; Sun, 06 Apr 2014 11:53:52 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM,
 T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:58861)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <jon.dufresne@HIDDEN>) id 1WWpOF-0005Hj-Hm
 for submit <at> debbugs.gnu.org; Sun, 06 Apr 2014 11:53:47 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:52136)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <jon.dufresne@HIDDEN>) id 1WWpOB-0005JT-29
 for bug-gnu-emacs@HIDDEN; Sun, 06 Apr 2014 11:53:47 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <jon.dufresne@HIDDEN>) id 1WWpO6-0005Fh-ON
 for bug-gnu-emacs@HIDDEN; Sun, 06 Apr 2014 11:53:42 -0400
Received: from mail-pb0-x231.google.com ([2607:f8b0:400e:c01::231]:55083)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <jon.dufresne@HIDDEN>) id 1WWpO6-0005Fa-DS
 for bug-gnu-emacs@HIDDEN; Sun, 06 Apr 2014 11:53:38 -0400
Received: by mail-pb0-f49.google.com with SMTP id jt11so5553910pbb.8
 for <bug-gnu-emacs@HIDDEN>; Sun, 06 Apr 2014 08:53:37 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=from:to:subject:date:message-id:mime-version:content-type;
 bh=0i+iG2u53JiVGZwbdlNTLE0AsFJ281gHOZckRF0SWNw=;
 b=E7KBTTGZ+C3lsckmfO0iMk52TDcq7b7H2Vm/bqe12SJT0MpK4oUM2uJZJrA5vGoLnC
 TSUibqokpO7x6/Y4+NI7+gNfirCYTZ8AE5xvpfwash64IggIct+BqgGURQTVRQ2ITlC6
 AIWtoUWLNdoJ1UBpU9vDLjj6h8s48xOTticLzwUflTgxDnDVfWqh5ywEEurjUYj+O5Km
 +rTehvVVbEHcKWL+aad/ds3rkQFk7pGOSXfre2BUPdmgD4r3YRrXdrlLuYtcnHtuJaNA
 t1MGFXVFfLdPs4a/8GuCh0IEeZSQYD/3wzChHrpEf06l/WWYvBdNKsidr6hXqUcw3cTM
 NRcQ==
X-Received: by 10.68.235.6 with SMTP id ui6mr25864867pbc.45.1396799617171;
 Sun, 06 Apr 2014 08:53:37 -0700 (PDT)
Received: from localhost (S01060016b6e9eea4.vc.shawcable.net. [24.84.220.135])
 by mx.google.com with ESMTPSA id
 sh5sm30958820pbc.21.2014.04.06.08.53.36 for <bug-gnu-emacs@HIDDEN>
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Sun, 06 Apr 2014 08:53:36 -0700 (PDT)
From: Jon Dufresne <jon.dufresne@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 24.3; html-mode incorrect indentation inside template syntax
Date: Sun, 06 Apr 2014 08:53:04 -0700
Message-ID: <87ppkubgkf.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Sun, 06 Apr 2014 13:50:36 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

Create a test.html file. Use html-mode. Fill with the following
contents:

```
<table>
  <thead>
    <tr>
      {% for header in headers %}
	<th>{{ header.attr1 }}</th>
      <th>{{ header.attr2 }}</th>
      {% endfor %}
    </tr>
  </thead>
</table>
```

This is a mix of HTML and Django template syntax [0]. If you indent line
6 (<th>{{ header.attr2 }}</th>) I would expect the line to align itself
with the previous line (<th>{{ header.attr1 }}</th>). Instead it appears
to aligns itself with the "for" template tag or perhaps the <tr> plus an
offset. The final result after indenting line 6 is as it appears above.

The mode pony-tpl-mode [1] uses html-mode to calculate indentation when
then previous line looks like HTML and not special syntax. See my bug
report there: https://github.com/davidmiller/pony-mode/issues/81

[0] https://docs.djangoproject.com/en/dev/topics/templates/
[1] https://github.com/davidmiller/pony-mode


In GNU Emacs 24.3.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.9.10)
 of 2013-08-14 on buildvm-17.phx2.fedoraproject.org
Windowing system distributor `Fedora Project', version 11.0.11404000
System Description:	Fedora release 20 (Heisenbug)

Configured using:
 `configure '--build=x86_64-redhat-linux-gnu'
 '--host=x86_64-redhat-linux-gnu' '--program-prefix='
 '--disable-dependency-tracking' '--prefix=/usr' '--exec-prefix=/usr'
 '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc'
 '--datadir=/usr/share' '--includedir=/usr/include'
 '--libdir=/usr/lib64' '--libexecdir=/usr/libexec'
 '--localstatedir=/var' '--sharedstatedir=/var/lib'
 '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-dbus'
 '--with-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff'
 '--with-xft' '--with-xpm' '--with-x-toolkit=gtk3' '--with-gpm=no'
 'build_alias=x86_64-redhat-linux-gnu'
 'host_alias=x86_64-redhat-linux-gnu' 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g
 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
 -fstack-protector-strong --param=ssp-buffer-size=4
 -grecord-gcc-switches -m64 -mtune=generic' 'LDFLAGS=-Wl,-z,relro ''

Important settings:
  value of $LANG: en_US.utf8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: HTML

Minor modes in effect:
  tooltip-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

Recent input:
<down> <down> <down> <down> <down> <tab> M-x b u <tab> 
<backspace> <backspace> r e p o <tab> r <tab> <ret
urn>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
`flet' is an obsolete macro (as of 24.3); use either `cl-flet' or `cl-letf'.
Loading /home/jon/pony-mode/src/pony-tpl.el (source)...done
Loading vc-git...done
Making completion list... [2 times]

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils help-mode vc-git pony-mode easy-mmode edmacro
kmacro help-fns cl-macs gv which-func imenu sql thingatpt sgml-mode
python rx easymenu comint ring ansi-color files-x dired-aux dired cl
cl-lib time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel
x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list
newcomment lisp-mode register page menu-bar rfn-eshadow timer select
scroll-bar 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 minibuffer loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty emacs)




Acknowledgement sent to Jon Dufresne <jon.dufresne@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#17207; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

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