From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#9193: 23.3; newline-and-indent broken in shell-script (sh mode) Date: Tue, 02 Aug 2011 21:46:53 -0400 Message-ID: References: <8762mm5rf5.fsf@jdiamond-nb2.acadiau.ca> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1312336060 19124 80.91.229.12 (3 Aug 2011 01:47:40 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 3 Aug 2011 01:47:40 +0000 (UTC) Cc: 9193@debbugs.gnu.org To: Jim Diamond Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Aug 03 03:47:36 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QoQYa-00025l-0k for geb-bug-gnu-emacs@m.gmane.org; Wed, 03 Aug 2011 03:47:36 +0200 Original-Received: from localhost ([::1]:60214 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QoQYZ-00040p-70 for geb-bug-gnu-emacs@m.gmane.org; Tue, 02 Aug 2011 21:47:35 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:37886) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QoQYW-00040j-Ho for bug-gnu-emacs@gnu.org; Tue, 02 Aug 2011 21:47:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QoQYV-000110-JE for bug-gnu-emacs@gnu.org; Tue, 02 Aug 2011 21:47:32 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42563) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QoQYV-00010v-AT for bug-gnu-emacs@gnu.org; Tue, 02 Aug 2011 21:47:31 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QoQYz-00031C-Oz; Tue, 02 Aug 2011 21:48:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 03 Aug 2011 01:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9193 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 9193-submit@debbugs.gnu.org id=B9193.131233604811562 (code B ref 9193); Wed, 03 Aug 2011 01:48:01 +0000 Original-Received: (at 9193) by debbugs.gnu.org; 3 Aug 2011 01:47:28 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QoQYS-00030Q-3m for submit@debbugs.gnu.org; Tue, 02 Aug 2011 21:47:28 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QoQYQ-00030J-Bo for 9193@debbugs.gnu.org; Tue, 02 Aug 2011 21:47:27 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EADuoOE5FxKfe/2dsb2JhbABCp1h4gUABAQQBViMFCwsOJhIUGA0kh3++S4ZCBJ9KhDE X-IronPort-AV: E=Sophos;i="4.67,307,1309752000"; d="scan'208";a="128496872" Original-Received: from 69-196-167-222.dsl.teksavvy.com (HELO ceviche.home) ([69.196.167.222]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 02 Aug 2011 21:46:54 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id E85A1660CF; Tue, 2 Aug 2011 21:46:53 -0400 (EDT) In-Reply-To: <8762mm5rf5.fsf@jdiamond-nb2.acadiau.ca> (Jim Diamond's message of "Thu, 28 Jul 2011 12:57:34 -0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 02 Aug 2011 21:48:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:49863 Archived-At: > #! /bin/sh > if [ $a == $b ] > then > echo newline-and-indent is OK here > echo "newline-and-indent is NOT OK here" > fi > Now, put the cursor at the end of the first "echo" line and type ^J > (bound to newline-and-indent). As expected, it does a > newline-and-indent. Now put the cursor at the end of the second "echo" > line and type ^J. It does the newline, but not the indent. > [ Other possibly completely irrelevant information: > Playing around a bit, I found that if I create my own function and > instead of using (newline-and-indent) I use > (newline) > (sit-for .001) > (indent-according-to-mode) > then calling that function Does The Right Thing. > ] FWIW it seems to be fixed in the trunk (i.e. in the upcoming Emacs-24). Could you try it out to confirm it fixes your problems? Stefan