emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Error while editing sh source code.
@ 2012-06-08 10:19 Diep Pham Van
  2012-06-08 18:28 ` Eric Schulte
  0 siblings, 1 reply; 2+ messages in thread
From: Diep Pham Van @ 2012-06-08 10:19 UTC (permalink / raw)
  To: emacs-orgmode

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


-- 
PHẠM Văn Điệp

h  : http://favadi.com
e  : imeo@favadi.com
m  : +84 984 339 841
                       _
ASCII ribbon campaign ( )
 - against HTML email  X
             & vCards / \

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Error while editing sh source code.
  2012-06-08 10:19 Error while editing sh source code Diep Pham Van
@ 2012-06-08 18:28 ` Eric Schulte
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Schulte @ 2012-06-08 18:28 UTC (permalink / raw)
  To: Diep Pham Van; +Cc: emacs-orgmode

Diep Pham Van <imeo@favadi.com> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-06-08 18:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-08 10:19 Error while editing sh source code Diep Pham Van
2012-06-08 18:28 ` Eric Schulte

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).