From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 28 15:12:59 2011 Received: (at submit) by debbugs.gnu.org; 28 Jul 2011 19:12:59 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QmW0w-0006AI-E0 for submit@debbugs.gnu.org; Thu, 28 Jul 2011 15:12:59 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QmTQg-0008F7-18 for submit@debbugs.gnu.org; Thu, 28 Jul 2011 12:27:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QmTQe-0000dz-Ma for submit@debbugs.gnu.org; Thu, 28 Jul 2011 12:27:21 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:32891) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QmTQe-0000dv-JC for submit@debbugs.gnu.org; Thu, 28 Jul 2011 12:27:20 -0400 Received: from eggs.gnu.org ([140.186.70.92]:52398) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QmTQd-0001dT-Ku for bug-gnu-emacs@gnu.org; Thu, 28 Jul 2011 12:27:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QmTQc-0000bB-7q for bug-gnu-emacs@gnu.org; Thu, 28 Jul 2011 12:27:19 -0400 Received: from omta.toronto.rmgopenwave.com ([4.59.182.110]:42783) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QmTQc-0000Hb-3l for bug-gnu-emacs@gnu.org; Thu, 28 Jul 2011 12:27:18 -0400 Received: from torspm04.toronto.rmgopenwave.com ([99.192.108.23]) by tormtz04.toronto.rmgopenwave.com (InterMail vM.8.00.01.00 201-2244-105-20090324) with ESMTP id <20110728155743.FVBT9358.tormtz04.toronto.rmgopenwave.com@torspm04.toronto.rmgopenwave.com> for ; Thu, 28 Jul 2011 11:57:43 -0400 Received: from jdiamond-nb2.acadiau.ca ([99.192.108.23]) by torspm04.toronto.rmgopenwave.com with ESMTP id <20110728155741.KCRH28020.torspm04.toronto.rmgopenwave.com@jdiamond-nb2.acadiau.ca> for ; Thu, 28 Jul 2011 11:57:41 -0400 Received: from jdiamond-nb2.acadiau.ca (localhost [127.0.0.1]) by jdiamond-nb2.acadiau.ca (8.14.4/8.14.4) with ESMTP id p6SFvZDR002151 for ; Thu, 28 Jul 2011 12:57:35 -0300 Received: (from zsd@localhost) by jdiamond-nb2.acadiau.ca (8.14.4/8.14.4/Submit) id p6SFvYrS002145; Thu, 28 Jul 2011 12:57:34 -0300 From: Jim Diamond To: bug-gnu-emacs@gnu.org Subject: 23.3; newline-and-indent broken in shell-script (sh mode) Date: Thu, 28 Jul 2011 12:57:34 -0300 Message-ID: <8762mm5rf5.fsf@jdiamond-nb2.acadiau.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Opwv-CommTouchExtSvcRefID: str=0001.0A020202.4E3186F7.001E, ss=1, re=0.000, fgs=0 X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -6.6 (------) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 28 Jul 2011 15:12:56 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.6 (------) Create the following file #! /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. ] In GNU Emacs 23.3.1 (x86_64-slackware-linux-gnu, GTK+ Version 2.24.1) of 2011-03-12 on midas64 Windowing system distributor `The X.Org Foundation', version 11.0.10905000 configured using `configure '--prefix=/usr' '--sysconfdir=/etc' '--localstatedir=/var' '--program-prefix=' '--program-suffix=' '--mandir=/usr/man' '--infodir=/usr/info' '--enable-static=no' '--enable-shared=yes' '--with-x' '--with-x-toolkit=gtk' '--build=x86_64-slackware-linux' 'build_alias=x86_64-slackware-linux' 'CFLAGS=-O2 -fPIC'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: C value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_CA value of $XMODIFIERS: nil locale-coding-system: iso-latin-1-unix default enable-multibyte-characters: t Major mode: Shell-script 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-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: C-e C-j M-x b u g C-g M-x a p r o b u g C-s - b u g C-s C-s C-x b C-x C-f a . s h b u g g y . s h # ! SPC / b i n s / s h i f SPC [ SPC a SPC = SPC = SPC b SPC ] t h e n f i C-e a $ $ = e c h o SPC t h i s SPC i s SPC o k C-a C-j e c h o SPC " t h i s SPC i s SPC n o t " C-j SPC n e w l i n e SPC a n d SPC i n d C-w C-w - a n d - i n d e n t C-d C-d C-d C-d C-d C-e SPC h e r e M-b M-b M-b n e w M-/ SPC M-d C-d M-u SPC O K K SPC h e r e M-b M-b M-u C-e C-j C-e C-j M-x g n u - e m C-u C-g M-x r e p o r t Recent messages: Quit Mark saved where search started Type C-x 4 C-o RET to restore the other window. (New file) Setting up indent for shell type sh setting up indent stuff Indentation variables are now local. Indentation setup for shell type sh kill-region: The mark is not set now, so there is no region [2 times] Auto-saving...done Quit Load-path shadows: /usr/share/emacs/site-lisp/t-mouse hides /usr/share/emacs/23.3/lisp/t-mouse Features: (shadow sort mail-extr message idna sendmail ecomplete rfc822 mml mml-sec password-cache mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util netrc time-date mm-util mail-prsvr gmm-utils wid-edit mailheader canlock sha1 hex-util hashcash mail-utils emacsbug dabbrev help-fns apropos skeleton multi-isearch kmacro two-column iso-transl help-mode easymenu view regexp-opt sh-script executable tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd font-setting tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mldrag 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 loaddefs button minibuffer faces cus-face files text-properties overlay md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind font-render-setting gtk x-toolkit x multi-tty emacs) From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 29 00:04:27 2011 Received: (at 9193) by debbugs.gnu.org; 29 Jul 2011 04:04:28 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QmeJF-0002jH-PN for submit@debbugs.gnu.org; Fri, 29 Jul 2011 00:04:26 -0400 Received: from mail-gx0-f172.google.com ([209.85.161.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QmeJC-0002j8-33 for 9193@debbugs.gnu.org; Fri, 29 Jul 2011 00:04:23 -0400 Received: by gxk19 with SMTP id 19so2320049gxk.3 for <9193@debbugs.gnu.org>; Thu, 28 Jul 2011 21:04:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=6TEcwjPl36Dyn85OFmmgoqD8bG1LzmH6JV3jCt4sBps=; b=k7L58Vs7C4GCcM3sY5JJdIzm7tYo4sKY4BR038hk+Cc9oPYHfxYyvSaTaOIGFcOwPG PN8iaPKWcX3XDHey7c402BkU4uwtOjW5BJNY4ZwK0CbSyTf0NgWQRoco9I3/fBvebFer plci7MIh1f1A4S/waraMw2B79VxgQNzsEp6OQ= Received: by 10.142.118.23 with SMTP id q23mr469268wfc.257.1311912258297; Thu, 28 Jul 2011 21:04:18 -0700 (PDT) Received: from localhost ([123.114.52.197]) by mx.google.com with ESMTPS id z6sm1684441pbc.78.2011.07.28.21.04.14 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 28 Jul 2011 21:04:17 -0700 (PDT) From: Leo To: Jim Diamond Subject: Re: bug#9193: 23.3; newline-and-indent broken in shell-script (sh mode) References: <8762mm5rf5.fsf@jdiamond-nb2.acadiau.ca> Date: Fri, 29 Jul 2011 12:04:10 +0800 In-Reply-To: <8762mm5rf5.fsf@jdiamond-nb2.acadiau.ca> (Jim Diamond's message of "Thu, 28 Jul 2011 12:57:34 -0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3.50 (Mac OS X 10.6.8) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -3.8 (---) X-Debbugs-Envelope-To: 9193 Cc: 9193@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.8 (---) On 2011-07-28 23:57 +0800, Jim Diamond wrote: > Create the following file > 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. I cannot reproduce this on GNU Emacs 23.3.50.1 of 2011-07-27. Leo From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 30 14:23:52 2011 Received: (at 9193) by debbugs.gnu.org; 30 Jul 2011 18:23:52 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QnECU-0006cr-GH for submit@debbugs.gnu.org; Sat, 30 Jul 2011 14:23:52 -0400 Received: from omta1.toronto.rmgopenwave.com ([4.59.182.99]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QmWAD-0006OY-1S for 9193@debbugs.gnu.org; Thu, 28 Jul 2011 15:22:33 -0400 Received: from torspm02.toronto.rmgopenwave.com ([99.192.108.23]) by tormtz01.toronto.rmgopenwave.com (InterMail vM.8.00.01.05 201-2244-105-105-20091224) with ESMTP id <20110728192222.TVBD4370.tormtz01.toronto.rmgopenwave.com@torspm02.toronto.rmgopenwave.com> for <9193@debbugs.gnu.org>; Thu, 28 Jul 2011 15:22:22 -0400 Received: from jdiamond-nb2.acadiau.ca ([99.192.108.23]) by torspm02.toronto.rmgopenwave.com with ESMTP id <20110728192221.PYNX3622.torspm02.toronto.rmgopenwave.com@jdiamond-nb2.acadiau.ca> for <9193@debbugs.gnu.org>; Thu, 28 Jul 2011 15:22:21 -0400 Received: from jdiamond-nb2.acadiau.ca (localhost [127.0.0.1]) by jdiamond-nb2.acadiau.ca (8.14.4/8.14.4) with ESMTP id p6SJMLQB013865; Thu, 28 Jul 2011 16:22:21 -0300 Received: (from zsd@localhost) by jdiamond-nb2.acadiau.ca (8.14.4/8.14.4/Submit) id p6SJMKkE013862; Thu, 28 Jul 2011 16:22:20 -0300 Date: Thu, 28 Jul 2011 16:22:20 -0300 From: zlists@ns.sympatico.ca To: 9193@debbugs.gnu.org Subject: 23.3; newline-and-indent broken in shell-script (sh mode) Message-ID: <20110728192220.GA13452@jdiamond-nb2> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Microslop: Just say no User-Agent: Mutt/1.5.21 (2010-09-15) X-Opwv-CommTouchExtSvcRefID: str=0001.0A020208.4E31B6EE.0032, ss=1, re=0.000, fgs=0 X-Spam-Score: -4.6 (----) X-Debbugs-Envelope-To: 9193 X-Mailman-Approved-At: Sat, 30 Jul 2011 14:23:50 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.9 (---) I hunted a bit before sending the bug report out, but further hunting after I submitted the report reveals bug#6916: Fwd: [PATCH] fix indent bug in sh-script I expect that is the same issue, and according to the thread a fix has been submitted (presumably to Emacs 24) almost a year ago. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 02 21:47:28 2011 Received: (at 9193) by debbugs.gnu.org; 3 Aug 2011 01:47:28 +0000 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 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" 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 Received: by ceviche.home (Postfix, from userid 20848) id E85A1660CF; Tue, 2 Aug 2011 21:46:53 -0400 (EDT) From: Stefan Monnier To: Jim Diamond Subject: Re: bug#9193: 23.3; newline-and-indent broken in shell-script (sh mode) Message-ID: References: <8762mm5rf5.fsf@jdiamond-nb2.acadiau.ca> Date: Tue, 02 Aug 2011 21:46:53 -0400 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) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 9193 Cc: 9193@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.1 (--) > #! /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 From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 06 18:05:40 2011 Received: (at control) by debbugs.gnu.org; 6 Aug 2011 22:05:40 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qpozz-0007c6-Nn for submit@debbugs.gnu.org; Sat, 06 Aug 2011 18:05:40 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qpozy-0007by-6p for control@debbugs.gnu.org; Sat, 06 Aug 2011 18:05:38 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1Qpoz7-00047N-4Q for control@debbugs.gnu.org; Sat, 06 Aug 2011 18:04:45 -0400 Date: Sat, 06 Aug 2011 18:04:45 -0400 Message-Id: Subject: control message for bug 9193 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.4 (------) unarchive 6916 forcemerge 6916 9193 From unknown Sat Aug 16 21:11:20 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 04 Sep 2011 11:24:03 +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