From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alexander Shukaev Newsgroups: gmane.emacs.help Subject: Re: Autogen in Emacs Shell Date: Fri, 1 May 2015 21:46:53 +0200 Message-ID: References: <83twvzszjv.fsf@gnu.org> <20150501092657.GA19316@tuxteam.de> <20150501150340.GB30776@tuxteam.de> <83sibgqjb3.fsf@gnu.org> <83d22kqeal.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1430509630 31596 80.91.229.3 (1 May 2015 19:47:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 1 May 2015 19:47:10 +0000 (UTC) Cc: help-gnu-emacs To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri May 01 21:47:09 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YoGtv-00067C-6H for geh-help-gnu-emacs@m.gmane.org; Fri, 01 May 2015 21:47:07 +0200 Original-Received: from localhost ([::1]:55337 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YoGtu-00085B-Am for geh-help-gnu-emacs@m.gmane.org; Fri, 01 May 2015 15:47:06 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54262) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YoGtk-00084o-Qi for help-gnu-emacs@gnu.org; Fri, 01 May 2015 15:46:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YoGtj-0006w4-Uv for help-gnu-emacs@gnu.org; Fri, 01 May 2015 15:46:56 -0400 Original-Received: from mail-la0-x229.google.com ([2a00:1450:4010:c03::229]:33321) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YoGti-0006vd-Dj; Fri, 01 May 2015 15:46:54 -0400 Original-Received: by layy10 with SMTP id y10so70209168lay.0; Fri, 01 May 2015 12:46:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=FpErfhH/6MPK7N2/ds1fDfz5HCkywD9uUGDdqA0sqco=; b=PaGqVTChBQGb6PrVhX0mId0R09t7FTVjPfiShxKs82PgUgfnNdM/jpv9SVGG8va8/a rVa9JV5/ZQPnQVct4McR4Fmlcs9aflQZEGmx+cvtdWenJEoZuJlNAg4nAI1ud9eEoSHU 6g6qtCxKv4/ECKSVXCTupMf+iKBET1LdZPmLhk3QqGLA6BfYEb3zCC6UOPpcIKF3hKFk 8Am+plw+ywYzrvxGprsJ5gdu9LW3FDtxrmqG/4KgnEtqZte8Lme8fj5UfN66rYKpukkQ VZ4/cpp3GBLgz+fIMFec0U7PQHPcv48T52LIq/Io9RBBr54MWIwMkTYtwu+0SfgSqgqQ iRQg== X-Received: by 10.112.167.166 with SMTP id zp6mr9628266lbb.80.1430509613483; Fri, 01 May 2015 12:46:53 -0700 (PDT) Original-Received: by 10.112.36.103 with HTTP; Fri, 1 May 2015 12:46:53 -0700 (PDT) In-Reply-To: <83d22kqeal.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::229 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:104152 Archived-At: > > > Finally, do you have any comments on the issue with > "~/emacs.d/init_bash.sh" > > that I've described before. Let me introduce another test case briefly. > Put > > > > # Hello, World! > > # Hello, World! > > # Hello, World! > > > > into "~/emacs.d/init_bash.sh". > > > > Then start 'bash' from Emacs. Here is what I see: > > > > 2015.05.01 Friday 20:30:46 > > Haroogan@G75VW:~ > > $ > > 2015.05.01 Friday 20:30:46 > > Haroogan@G75VW:~ > > $ > > 2015.05.01 Friday 20:30:46 > > Haroogan@G75VW:~ > > $ > > 2015.05.01 Friday 20:30:46 > > Haroogan@G75VW:~ > > $ > > > > Those 3 newlines were really typed into the shell. How come? > > Now that we know that the contents of this file are sent as an input > string to the shell when it starts, what did you expect? The shell > gets 3 lines, each one of which is a comment, so it does nothing, but > displays the newline. What is surprising here? > =E2=80=8B The point then is that this file actually does not serve its purpose. It does not behave as, for example, ".bashrc" does. In other words, one cannot simply write multiline shell code in there without experiencing this ugly side effect. I understand the problem here, but why not, for instance, concatenate lines with " ; " =E2=80=8B=E2=80=8B =E2=80=8Bin order to make one line out of them=E2=80=8B before sending them to 'bash'? =E2=80=8B