GNU bug report logs - #35396
12.1.2; wrong interaction between auto-fill and latex comments

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: auctex; Reported by: gojjoe@HIDDEN; dated Tue, 23 Apr 2019 15:15:01 UTC; Maintainer for auctex is bug-auctex@HIDDEN.

Message received at submit <at>

Received: (at submit) by; 23 Apr 2019 15:14:39 +0000
From debbugs-submit-bounces <at> Tue Apr 23 11:14:38 2019
Received: from localhost ([]:54067
	by with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at>>)
	id 1hIx82-0001iy-Jf
	for submit <at>; Tue, 23 Apr 2019 11:14:38 -0400
Received: from ([]:43200)
 by with esmtp (Exim 4.84_2)
 (envelope-from <gojjoe@HIDDEN>) id 1hIx81-0001il-RW
 for submit <at>; Tue, 23 Apr 2019 11:14:38 -0400
Received: from ([]:55582)
 by with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <gojjoe@HIDDEN>) id 1hIx7w-0002XX-7r
 for submit <at>; Tue, 23 Apr 2019 11:14:32 -0400
Received: from ([]:57582)
 by with esmtp (Exim 4.71)
 (envelope-from <gojjoe@HIDDEN>) id 1hIx7v-0003cB-1o
 for bug-auctex@HIDDEN; Tue, 23 Apr 2019 11:14:32 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM
 autolearn=disabled version=3.3.2
Received: from Debian-exim by with spam-scanned (Exim 4.71)
 (envelope-from <gojjoe@HIDDEN>) id 1hIx7u-0002WP-0o
 for bug-auctex@HIDDEN; Tue, 23 Apr 2019 11:14:31 -0400
Received: from ([2a00:1450:4864:20::131]:45754)
 by with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <gojjoe@HIDDEN>) id 1hIx7t-0002VR-Ov
 for bug-auctex@HIDDEN; Tue, 23 Apr 2019 11:14:29 -0400
Received: by with SMTP id t11so12051588lfl.12
 for <bug-auctex@HIDDEN>; Tue, 23 Apr 2019 08:14:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025;
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025;
X-Gm-Message-State: APjAAAX30h7EiirQDpPYgSUFIj1a2sSK/pi4vzwFR7BtlVR+rXVI6dZu
X-Google-Smtp-Source: APXvYqynJg09x4qHAjqwaGyVJ1Lf9fzNYFKjr8zz3KIu4VN0mEvXJ7sDeZHYcOPnJtZKHfQkbvtsuA==
X-Received: by 2002:ac2:5495:: with SMTP id t21mr14174740lfk.3.1556032467211; 
 Tue, 23 Apr 2019 08:14:27 -0700 (PDT)
Received: from [] ([])
 by with ESMTPSA id d16sm3800413lfi.75.2019.
 for <bug-auctex@HIDDEN>
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Tue, 23 Apr 2019 08:14:26 -0700 (PDT)
To: bug-auctex@HIDDEN
From: gojjoe@HIDDEN
Subject: 12.1.2; wrong interaction between auto-fill and latex comments
Message-ID: <e96eff95-3f99-b9b5-3fa7-668a120e1cd3@HIDDEN>
Date: Tue, 23 Apr 2019 17:14:24 +0200
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:60.0) Gecko/20100101
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-CA
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by Genre and OS details not
X-Received-From: 2a00:1450:4864:20::131
X-detected-operating-system: by GNU/Linux 2.6.x
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at>
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <>
List-Unsubscribe: <>, 
 <mailto:debbugs-submit-request <at>>
List-Archive: <>
List-Post: <mailto:debbugs-submit <at>>
List-Help: <mailto:debbugs-submit-request <at>>
List-Subscribe: <>, 
 <mailto:debbugs-submit-request <at>>
Errors-To: debbugs-submit-bounces <at>
Sender: "Debbugs-submit" <debbugs-submit-bounces <at>>
X-Spam-Score: -2.3 (--)

Hi all.

– Problematic behaviour: When one is writing text in front of a comment '%' and auto-fill automatically inserts a newline, the point is suddenly moved to *within* the comment, ie on the right of '%'.

– Expected behaviour: The point in the new line should stay to the left of the comment, ie of '%'.

– Example:

1. Activate auto-fill-mode in a tex file where LaTeX mode is active.

2. Set fill-column to some value; here I use 20.

3. Suppose we have a line like this:

123456789% commented

4. Now we'd like to add some more text right before the "%", eg "-1234567890 abc".

Note that "123456789-1234567890" is twenty characters long, so auto-fill should automatically insert a newline as we type the space after "0". Expected result:

abc% commented
[with point between 'c' and '%']

Instead we get this:

% abccommented
[with point between 'c' and 'c']

That is, our text has been continued  *within* the comment, which wasn't our intention.

– Further info:

A. If the text before the comment is *already longer* than auto-fill-column when we type the space, and if auto-fill can carry some previous text to the new line, then everything works correctly. For example, If we have

123456789% commented

And now we type " 1234567890X abc" (note: space instead of "-") right before the "%", we get

1234567890X abc% commented

as desired.

B. The length of the text after "%" seems to be irrelevant for this issue.

Let me know what additional info to provide.


Emacs  : GNU Emacs 26.1 (build 1, i686-w64-mingw32)
  of 2018-05-30
Package: 12.1.2

  AUCTeX-date "2019-02-08"
  window-system 'w32
  LaTeX-version "2e"

Acknowledgement sent to gojjoe@HIDDEN:
New bug report received and forwarded. Copy sent to bug-auctex@HIDDEN. Full text available.
Report forwarded to bug-auctex@HIDDEN:
bug#35396; Package auctex. 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: Mon, 25 Nov 2019 12:00:02 UTC

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