GNU bug report logs - #47836
tcl-mode indentation/quoting problems

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: Hadrien Lacour <hadrien.lacour@HIDDEN>; Keywords: confirmed; dated Sat, 17 Apr 2021 09:10:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Added tag(s) confirmed. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

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


Received: (at 47836) by debbugs.gnu.org; 4 May 2021 10:24:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 04 06:24:48 2021
Received: from localhost ([127.0.0.1]:52351 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ldsEI-0005ha-Ip
	for submit <at> debbugs.gnu.org; Tue, 04 May 2021 06:24:48 -0400
Received: from quimby.gnus.org ([95.216.78.240]:52032)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1ldsEG-0005hR-KI
 for 47836 <at> debbugs.gnu.org; Tue, 04 May 2021 06:24:37 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=JypwsXXc5dOJievZnpETrZQ6TcK1woih4og9tQ58Kj4=; b=l67rrmQE7DS50rJgkCrCm7vubk
 81aVmqt4DGW6zSTpIPcwjTG8UiRuwL5vZk3ajrE1UVwjYwPPWPpC5L7AwjbwEqQDHGpv/eAcBwcjw
 xm+4ZjGTMxn/Q/V+HpaPZoTqkIZR8c6/xZ6cH3HF+82hoj8+zUYC1vOoxPXD1idtnKeo=;
Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1ldsE8-00016d-HB; Tue, 04 May 2021 12:24:30 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Hadrien Lacour <hadrien.lacour@HIDDEN>
Subject: Re: bug#47836: tcl-mode indentation/quoting problems
References: <20210417090906.4xta7vglaae674a4@gentoo-zen2700x>
X-Now-Playing: Burial Hex's _Burial Hex - Zola Jesus_: "Temple of the Flood"
Date: Tue, 04 May 2021 12:24:28 +0200
In-Reply-To: <20210417090906.4xta7vglaae674a4@gentoo-zen2700x> (Hadrien
 Lacour's message of "Sat, 17 Apr 2021 09:09:06 +0000")
Message-ID: <87pmy694pv.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  Hadrien Lacour <hadrien.lacour@HIDDEN> writes: > Hello, 
 I have found the following problems in tcl-mode, examples show how Emacs
 > indents them and what text I get with tcl-explain-indentation set to t >
 (when relevant): > * Indentation after decl [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 47836
Cc: 47836 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://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: -1.0 (-)

Hadrien Lacour <hadrien.lacour@HIDDEN> writes:

> Hello, I have found the following problems in tcl-mode, examples show how Emacs
> indents them and what text I get with tcl-explain-indentation set to t
> (when relevant):
> * Indentation after declaring a proc goes to column 0, example:
> namespace eval myns {
> 	proc p1 {} {}
> variable x
> proc p2 {} {}
> }

I can reproduce this in Emacs 27, but it has been fixed in Emacs 28.

> * Procs named ? , ' or ^ botch indentation (thankfully only inside):
> proc ? {} {
> 	    puts hello
>        }
> puts world

This is still present in Emacs 28.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47836; Package emacs. Full text available.

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


Received: (at submit) by debbugs.gnu.org; 17 Apr 2021 09:09:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 17 05:09:20 2021
Received: from localhost ([127.0.0.1]:42277 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lXgx6-0007nO-9j
	for submit <at> debbugs.gnu.org; Sat, 17 Apr 2021 05:09:20 -0400
Received: from lists.gnu.org ([209.51.188.17]:54130)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <hadrien.lacour@HIDDEN>) id 1lXgx3-0007nF-JH
 for submit <at> debbugs.gnu.org; Sat, 17 Apr 2021 05:09:19 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:46550)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <hadrien.lacour@HIDDEN>)
 id 1lXgx3-0003Dm-F0
 for bug-gnu-emacs@HIDDEN; Sat, 17 Apr 2021 05:09:17 -0400
Received: from mout01.posteo.de ([185.67.36.65]:46201)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <hadrien.lacour@HIDDEN>)
 id 1lXgx0-0001OO-MA
 for bug-gnu-emacs@HIDDEN; Sat, 17 Apr 2021 05:09:17 -0400
Received: from submission (posteo.de [89.146.220.130]) 
 by mout01.posteo.de (Postfix) with ESMTPS id 082A5240027
 for <bug-gnu-emacs@HIDDEN>; Sat, 17 Apr 2021 11:09:09 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1618650550; bh=Lt7FHXv4c6Xb/y92lbNjJVErfAEHuU+lTl4W6aSTb+U=;
 h=Date:From:To:Subject:From;
 b=gnXeWXnVg3P6SI3yoyv+x47awdjB/VNWdJJrQkMJPWGoLHvVnMUa+guElvKBKHlC8
 zCzXm0zHecr4rYVJCBZmd5uMGHtg1tuX6h31UzPyKlRm++9yVVeNnqbVsy4pzObw9i
 ZOun4XkysO/jFTp4oyH7wTgE+jWIAWON/ED81kY+AOSAZAj+OuryScK3XHXsXcZRgN
 e+5eCJ4XGaXYHEoIdOjks5aS+8/9VRFuKBUffKmt22tTtgjwpwabkgI6ckNWm/NSxj
 xjlOVIW80h1gaRqzyhTLf6AgULAhQ5WcWesjZN4iXbLNejo/fIQ2CrjsGB1ChDNlFJ
 LuDfWPuy3h8mg==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4FMnM936fTz9rxM
 for <bug-gnu-emacs@HIDDEN>; Sat, 17 Apr 2021 11:09:09 +0200 (CEST)
Date: Sat, 17 Apr 2021 09:09:06 +0000
From: Hadrien Lacour <hadrien.lacour@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: tcl-mode indentation/quoting problems
Message-ID: <20210417090906.4xta7vglaae674a4@gentoo-zen2700x>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Received-SPF: pass client-ip=185.67.36.65;
 envelope-from=hadrien.lacour@HIDDEN; helo=mout01.posteo.de
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://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: -2.3 (--)

Hello, I have found the following problems in tcl-mode, examples show how Emacs
indents them and what text I get with tcl-explain-indentation set to t
(when relevant):
* Indentation after declaring a proc goes to column 0, example:
namespace eval myns {
	proc p1 {} {}
variable x
proc p2 {} {}
}

"Indentation type nil" all along

* Mismatched parentheses when quoted:
puts {hel[lo}
puts {hel(lo}

* Procs named ? , ' or ^ botch indentation (thankfully only inside):
proc ? {} {
	    puts hello
       }
puts world

"Indentation type tcl-expr" for these,
"Indentation type tcl-commands" for other proc names.

Sorry if I can't offer a patch, my elisp skill and available time is basically
nil. The comment associated with the `defconst tcl-omit-ws-regexp` line seem
related to (3).
Obviously, only (1) and (2) are really annoying, basically forcing me to use mg
for Tcl.

-------------------------------------------------------------------------------

In GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, X toolkit)
 of 2021-03-26 built on localhost
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Gentoo/Linux

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
user-error: Beginning of history; no preceding item
Quit [2 times]
next-line: End of buffer
Making completion list...

Configured using:
 'configure --prefix=/usr --build=x86_64-pc-linux-gnu
 --host=x86_64-pc-linux-gnu --mandir=/usr/share/man
 --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc
 --localstatedir=/var/lib --disable-silent-rules
 --docdir=/usr/share/doc/emacs-27.2
 --htmldir=/usr/share/doc/emacs-27.2/html --libdir=/usr/lib64
 --program-suffix=-emacs-27 --includedir=/usr/include/emacs-27
 --infodir=/usr/share/info/emacs-27 --localstatedir=/var
 --enable-locallisppath=/etc/emacs:/usr/share/emacs/site-lisp
 --without-compress-install --without-hesiod --without-pop
 --with-file-notification=inotify --with-pdumper --enable-acl
 --without-dbus --without-modules --without-gameuser --with-libgmp
 --without-gpm --with-json --without-kerberos --without-kerberos5
 --without-lcms2 --without-xml2 --without-mailutils --without-selinux
 --with-gnutls --without-libsystemd --with-threads --without-wide-int
 --with-zlib --with-sound=no --with-x --without-ns --without-gconf
 --without-gsettings --without-toolkit-scroll-bars --without-gif
 --without-jpeg --without-png --without-rsvg --without-tiff --with-xpm
 --without-imagemagick --with-xft --without-cairo --without-harfbuzz
 --without-libotf --without-m17n-flt --with-x-toolkit=lucid
 --without-xaw3d --with-dumping=pdumper 'CFLAGS=-march=native -pipe -O2'
 CPPFLAGS= 'LDFLAGS=-Wl,-O1 -Wl,--as-needed''

Configured features:
XPM NOTIFY INOTIFY ACL GNUTLS FREETYPE XFT ZLIB LUCID X11 XDBE XIM
THREADS JSON PDUMPER GMP

Important settings:
  value of $LANG: en_US.utf8
  locale-coding-system: utf-8-unix

Major mode: Tcl

Minor modes in effect:
  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:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
format-spec rfc822 mml mml-sec password-cache epa derived epg epg-config
gnus-util rmail rmail-loaddefs text-property-search time-date subr-x seq
byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib
sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils tcl
easymenu comint ansi-color ring 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 tab-bar menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame minibuffer 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 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 threads inotify dynamic-setting font-render-setting x-toolkit
x multi-tty make-network-process emacs)

Memory information:
((conses 16 48863 10100)
 (symbols 48 6404 1)
 (strings 32 17346 2153)
 (string-bytes 1 551906)
 (vectors 16 10563)
 (vector-slots 8 134917 13058)
 (floats 8 22 48)
 (intervals 56 302 0)
 (buffers 1000 12))




Acknowledgement sent to Hadrien Lacour <hadrien.lacour@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#47836; 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: Tue, 4 May 2021 10:30:01 UTC

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