From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 10 18:56:29 2014 Received: (at submit) by debbugs.gnu.org; 10 Mar 2014 22:56:29 +0000 Received: from localhost ([127.0.0.1]:60652 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WN97U-0006wT-KU for submit@debbugs.gnu.org; Mon, 10 Mar 2014 18:56:28 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50001) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WN97S-0006wE-MF for submit@debbugs.gnu.org; Mon, 10 Mar 2014 18:56:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WN97L-00013u-N0 for submit@debbugs.gnu.org; Mon, 10 Mar 2014 18:56:26 -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.3 required=5.0 tests=BAYES_00, DATE_IN_PAST_03_06, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:40254) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WN97L-00013q-L4 for submit@debbugs.gnu.org; Mon, 10 Mar 2014 18:56:19 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51659) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WN97F-0005BB-IP for bug-gnu-emacs@gnu.org; Mon, 10 Mar 2014 18:56:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WN979-00011B-KZ for bug-gnu-emacs@gnu.org; Mon, 10 Mar 2014 18:56:13 -0400 Received: from caiajhbdcbef.dreamhost.com ([208.97.132.145]:39665 helo=homiemail-a10.g.dreamhost.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WN979-000116-Fd for bug-gnu-emacs@gnu.org; Mon, 10 Mar 2014 18:56:07 -0400 Received: from homiemail-a10.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a10.g.dreamhost.com (Postfix) with ESMTP id E8F3D280076 for ; Mon, 10 Mar 2014 15:56:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jidanni.org; h=from:to :subject:date:message-id:mime-version:content-type; s= jidanni.org; bh=hMrSjhWtixxntj4qMeoeCfRD9wU=; b=Q3UnmQR8dOTgrNyI kjNNxEeiGw9ChNmOOR5ov1A7KF6p4g8/iUTleh31cTB+GMFkQkxUqgI91pszt658 d1DINGyLu6kBw7kCwBJtQDp503wtGTdEeLnvMQbYcLVCwMCRGil+/vQ6LC/OzV1a RfOqpdlQwhZJlsNKs94W20YjmkU= Received: from jidanni.org (114-26-44-89.dynamic.hinet.net [114.26.44.89]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jidanni@jidanni.org) by homiemail-a10.g.dreamhost.com (Postfix) with ESMTPSA id ACDD028005C for ; Mon, 10 Mar 2014 15:56:06 -0700 (PDT) From: =?utf-8?B?56mN5Li55bC8?= Dan Jacobson To: bug-gnu-emacs@gnu.org Subject: indent-for-tab-command error messages could mention line numbers Date: Tue, 11 Mar 2014 02:36:33 +0800 Message-ID: <87a9cxrjda.fsf@jidanni.org> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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: -3.9 (---) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.9 (---) TAB (translated from ) runs the command indent-for-tab-command, Its messages, forward-sexp: Scan error: "Unbalanced parentheses", 1970, 1 would be improved if they could also mention line numbers and not just apparently byte numbers. E.g., Unbalanced parentheses at line 34 column 33. From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 12 09:43:08 2014 Received: (at 16985) by debbugs.gnu.org; 12 Mar 2014 13:43:08 +0000 Received: from localhost ([127.0.0.1]:33979 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WNjR5-0007Ja-Ab for submit@debbugs.gnu.org; Wed, 12 Mar 2014 09:43:07 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:25046) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WNjR0-0007J9-42 for 16985@debbugs.gnu.org; Wed, 12 Mar 2014 09:43:02 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFMCppy/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2RCgOkeoFegxM X-IPAS-Result: Av4EABK/CFFMCppy/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2RCgOkeoFegxM X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="51453635" Received: from 76-10-154-114.dsl.teksavvy.com (HELO pastel.home) ([76.10.154.114]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 12 Mar 2014 09:43:01 -0400 Received: by pastel.home (Postfix, from userid 20848) id E8D5F6057F; Wed, 12 Mar 2014 09:43:00 -0400 (EDT) From: Stefan Monnier To: =?utf-8?B?56mN5Li55bC8?= Dan Jacobson Subject: Re: bug#16985: indent-for-tab-command error messages could mention line numbers Message-ID: References: <87a9cxrjda.fsf@jidanni.org> Date: Wed, 12 Mar 2014 09:43:00 -0400 In-Reply-To: <87a9cxrjda.fsf@jidanni.org> (=?utf-8?B?IuepjeS4ueWwvA==?= Dan Jacobson"'s message of "Tue, 11 Mar 2014 02:36:33 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 16985 Cc: 16985@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > TAB (translated from ) runs the command indent-for-tab-command, > Its messages, > forward-sexp: Scan error: "Unbalanced parentheses", 1970, 1 > would be improved if they could also mention line numbers and not just > apparently byte numbers. E.g., > Unbalanced parentheses at line 34 column 33. Traditionally TAB does not signal an error for unbalanced parentheses. It may indirectly signal such a problem by indenting to "a weird place". IOW, please tell us in which case you got the above error, so we can catch it and turn it into a non-error. Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 12 14:25:13 2014 Received: (at 16985) by debbugs.gnu.org; 12 Mar 2014 18:25:13 +0000 Received: from localhost ([127.0.0.1]:34907 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WNnq4-0007pt-IL for submit@debbugs.gnu.org; Wed, 12 Mar 2014 14:25:12 -0400 Received: from caiajhbdccac.dreamhost.com ([208.97.132.202]:60444 helo=homiemail-a38.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WNnpz-0007pZ-Sc for 16985@debbugs.gnu.org; Wed, 12 Mar 2014 14:25:08 -0400 Received: from homiemail-a38.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a38.g.dreamhost.com (Postfix) with ESMTP id 0F23B10AFB7; Wed, 12 Mar 2014 11:25:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jidanni.org; h=from:to:cc :subject:references:date:message-id:mime-version:content-type; s=jidanni.org; bh=40lBHq8q9lIi+QAYAgNTeSC0kus=; b=AeO+XBzjSeuaN GyI1FDWT2WEqdqKHoYTTWGCRE0lsv4wp9upGan9dy4pPLAGXIsKygXX21QkpQDEB oayKOvnz/Uc2CZ3VzANzrHKyERo+6/01osJ0t44pvSDKctbmwsVOSnsM0rLFSpn+ c2OaUasWDi2TRIpZ6N526a4Sq6vS+4= Received: from jidanni.org (114-41-24-212.dynamic.hinet.net [114.41.24.212]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jidanni@jidanni.org) by homiemail-a38.g.dreamhost.com (Postfix) with ESMTPSA id DE52F10AFAB; Wed, 12 Mar 2014 11:25:04 -0700 (PDT) From: =?utf-8?B?56mN5Li55bC8?= Dan Jacobson To: Stefan Monnier Subject: Re: bug#16985: indent-for-tab-command error messages could mention line numbers References: Date: Thu, 13 Mar 2014 02:25:01 +0800 Message-ID: <8738inuveq.fsf@jidanni.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 16985 Cc: 16985@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) >>>>> "SM" == Stefan Monnier writes: SM> IOW, please tell us in which case you got the above error, so we can SM> catch it and turn it into a non-error. I recall it was when I was editing a perl program, so try with perl mode... But anyway I think it would be better to catch such errors. From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 12 19:27:10 2014 Received: (at 16985) by debbugs.gnu.org; 12 Mar 2014 23:27:10 +0000 Received: from localhost ([127.0.0.1]:35050 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WNsYI-0000qH-6X for submit@debbugs.gnu.org; Wed, 12 Mar 2014 19:27:10 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:35710) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WNsYH-0000q9-5G for 16985@debbugs.gnu.org; Wed, 12 Mar 2014 19:27:09 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFMCppy/2dsb2JhbABEvw4Xc4IfAQVWIxALNBIUGA0kiCTBLZEKA6R6gV6DEw X-IPAS-Result: Av4EABK/CFFMCppy/2dsb2JhbABEvw4Xc4IfAQVWIxALNBIUGA0kiCTBLZEKA6R6gV6DEw X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="51544787" Received: from 76-10-154-114.dsl.teksavvy.com (HELO ceviche.home) ([76.10.154.114]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 12 Mar 2014 19:27:08 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 8EA4066090; Wed, 12 Mar 2014 19:27:08 -0400 (EDT) From: Stefan Monnier To: =?utf-8?B?56mN5Li55bC8?= Dan Jacobson Subject: Re: bug#16985: indent-for-tab-command error messages could mention line numbers Message-ID: References: <8738inuveq.fsf@jidanni.org> Date: Wed, 12 Mar 2014 19:27:08 -0400 In-Reply-To: <8738inuveq.fsf@jidanni.org> (=?utf-8?B?IuepjeS4ueWwvA==?= Dan Jacobson"'s message of "Thu, 13 Mar 2014 02:25:01 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 16985 Cc: 16985@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) SM> IOW, please tell us in which case you got the above error, so we can SM> catch it and turn it into a non-error. > I recall it was when I was editing a perl program, so try with perl > mode... But anyway I think it would be better to catch such errors. Hmm... catch them and do what? Such a signal means that's a coding error somewhere in the indentation code, so hiding the signal is not a good idea. Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 12 21:47:08 2014 Received: (at 16985) by debbugs.gnu.org; 13 Mar 2014 01:47:08 +0000 Received: from localhost ([127.0.0.1]:35142 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WNujj-0005oi-TW for submit@debbugs.gnu.org; Wed, 12 Mar 2014 21:47:08 -0400 Received: from caiajhbdcahe.dreamhost.com ([208.97.132.74]:35070 helo=homiemail-a37.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WNujh-0005o0-Bc for 16985@debbugs.gnu.org; Wed, 12 Mar 2014 21:47:06 -0400 Received: from homiemail-a37.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a37.g.dreamhost.com (Postfix) with ESMTP id 791D520806C; Wed, 12 Mar 2014 18:46:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jidanni.org; h=from:to:cc :subject:references:date:message-id:mime-version:content-type; s=jidanni.org; bh=+5yv9E3NJvRuZR6WPXEQmQSBQQ4=; b=fRM9tQwcyxu/4 0a54Lc0foAtA/L8gxDLQTXIUz2SSvTQgbsgyjPXGR+BP8mMb93l9VrFuxxN9l0yy 5/QuKRlgdX0a5ufZqt8cMyAEfopApQbD7CZ3mH645y7fcOGgw54zl/luu+efJ4e+ +7AOIXEzn28RRijXaiDmQktof+ykh8= Received: from jidanni.org (122-118-150-105.dynamic.hinet.net [122.118.150.105]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jidanni@jidanni.org) by homiemail-a37.g.dreamhost.com (Postfix) with ESMTPSA id 1B8B120806B; Wed, 12 Mar 2014 18:46:59 -0700 (PDT) From: =?utf-8?B?56mN5Li55bC8?= Dan Jacobson To: Stefan Monnier Subject: Re: bug#16985: indent-for-tab-command error messages could mention line numbers References: Date: Thu, 13 Mar 2014 09:46:56 +0800 Message-ID: <87ob1ahnu7.fsf@jidanni.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 16985 Cc: 16985@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) >>>>> "SM" == Stefan Monnier writes: SM> IOW, please tell us in which case you got the above error, so we can SM> catch it and turn it into a non-error. >> I recall it was when I was editing a perl program, so try with perl >> mode... But anyway I think it would be better to catch such errors. SM> Hmm... catch them and do what? Such a signal means that's a coding SM> error somewhere in the indentation code, so hiding the signal is not SM> a good idea. SM> Stefan OK, this file.pl {}} }( } triggers the bug. Do C-x h TAB. Also the message should say "Help report this bug in xxx.el!" else people will think it is an error in their perl file. From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 02 15:49:56 2014 Received: (at 16985-done) by debbugs.gnu.org; 2 Apr 2014 19:49:56 +0000 Received: from localhost ([127.0.0.1]:33309 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WVRAZ-0004QQ-N5 for submit@debbugs.gnu.org; Wed, 02 Apr 2014 15:49:56 -0400 Received: from mercure.iro.umontreal.ca ([132.204.24.67]:42324) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WVRAV-0004QB-HZ for 16985-done@debbugs.gnu.org; Wed, 02 Apr 2014 15:49:53 -0400 Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id EE5BF84E3F; Wed, 2 Apr 2014 15:49:50 -0400 (EDT) Received: from lechon.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id 742081E5B74; Wed, 2 Apr 2014 15:49:26 -0400 (EDT) Received: by lechon.iro.umontreal.ca (Postfix, from userid 20848) id 5B4A4B4128; Wed, 2 Apr 2014 15:49:26 -0400 (EDT) From: Stefan Monnier To: =?utf-8?B?56mN5Li55bC8?= Dan Jacobson Subject: Re: bug#16985: indent-for-tab-command error messages could mention line numbers Message-ID: References: <87ob1ahnu7.fsf@jidanni.org> Date: Wed, 02 Apr 2014 15:49:26 -0400 In-Reply-To: <87ob1ahnu7.fsf@jidanni.org> (=?utf-8?B?IuepjeS4ueWwvA==?= Dan Jacobson"'s message of "Thu, 13 Mar 2014 09:46:56 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-2.82, requis 5, autolearn=not spam, ALL_TRUSTED -2.82, MC_TSTLAST 0.00) X-DIRO-MailScanner-From: monnier@iro.umontreal.ca X-Spam-Status: No X-Spam-Score: -2.9 (--) X-Debbugs-Envelope-To: 16985-done Cc: 16985-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.9 (--) >>>>> "=E7=A9=8D=E4=B8=B9=E5=B0=BC" =3D=3D =E7=A9=8D=E4=B8=B9=E5=B0=BC Dan = Jacobson writes: >>>>> "SM" =3D=3D Stefan Monnier writes: SM> IOW, please tell us in which case you got the above error, so we can SM> catch it and turn it into a non-error. >>> I recall it was when I was editing a perl program, so try with perl >>> mode... But anyway I think it would be better to catch such errors. SM> Hmm... catch them and do what? Such a signal means that's a coding SM> error somewhere in the indentation code, so hiding the signal is not SM> a good idea. SM> Stefan > OK, this file.pl > {}} > }( > } > triggers the bug. Do C-x h TAB. > Also the message should say "Help report this bug in xxx.el!" else people > will think it is an error in their perl file. Thanks for the simple test case. I installed the patch below which should fix those problems. Stefan =3D=3D=3D modified file 'lisp/progmodes/perl-mode.el' --- lisp/progmodes/perl-mode.el 2014-02-10 01:34:22 +0000 +++ lisp/progmodes/perl-mode.el 2014-04-02 19:46:36 +0000 @@ -854,11 +854,12 @@ (and (=3D (char-syntax (following-char)) ?\)) (save-excursion (forward-char 1) - (forward-sexp -1) + (when (condition-case nil (progn (forward-sexp -1) t) + (scan-error nil)) (perl-indent-new-calculate ;; Recalculate the parsing-start, since we may have jumped ;; dangerously close (typically in the case of nested functions= ). - 'virtual nil (save-excursion (perl-beginning-of-function))))) + 'virtual nil (save-excursion (perl-beginning-of-function)))))) (and (and (=3D (following-char) ?{) (save-excursion (forward-char) (perl-hanging-paren-p))) (+ (or default (perl-calculate-indent parse-start)) From unknown Sun Jun 15 13:00:25 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 01 May 2014 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator