From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: Error while editing sh source code. Date: Fri, 08 Jun 2012 12:28:58 -0600 Message-ID: <874nqlk68l.fsf@gmx.com> References: <20120608171956.0a04d175@favadi.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:37561) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sd3wD-0005RI-8W for emacs-orgmode@gnu.org; Fri, 08 Jun 2012 14:29:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sd3wB-0004Ye-8p for emacs-orgmode@gnu.org; Fri, 08 Jun 2012 14:29:32 -0400 Received: from mailout-us.gmx.com ([74.208.5.67]:48141 helo=mailout-us.mail.com) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1Sd3wB-0004YP-1k for emacs-orgmode@gnu.org; Fri, 08 Jun 2012 14:29:31 -0400 In-Reply-To: <20120608171956.0a04d175@favadi.com> (Diep Pham Van's message of "Fri, 8 Jun 2012 17:19:56 +0700") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Diep Pham Van Cc: emacs-orgmode@gnu.org Diep Pham Van writes: > I want to write some shell script in my org file, so I add these line > in it. > > #+name: random line > #+begin_src sh > cat filename.txt | sort --random-sort | sed -e '1!d' > #+end_src > > But when I put cursor in src block and press `C-c '`, emacs show that > error: > byte-code: Language mode `sh-mode' fails with: "Invalid file-name" > > The other modes (at least python, sql) is run without problem. > > Can anybody show me how to fix this? > > My emacs version: 23.4.1 > My org-mode version: 7.8.11 > > And this is my config: https://github.com/favadi/dotemacs I am able to edit the above with C-' and run it successfully. However you should note that spaces are not allowed in code block names, so when I run this code block my results are simply named "random". Please try the above with emacs started with the "-Q" option to see if the problem lies somewhere in your personal configuration. Thanks, -- Eric Schulte http://cs.unm.edu/~eschulte