* Problem with #+BEGIN_SRC shell, and export
@ 2013-12-06 4:58 François Pinard
2013-12-10 18:53 ` Eric Schulte
0 siblings, 1 reply; 4+ messages in thread
From: François Pinard @ 2013-12-06 4:58 UTC (permalink / raw)
To: emacs-orgmode
Hi, Org people.
Let me make this report from memory, now that I'm back home! :-)
In an Org file, a coworker used "#+BEGIN_SRC shell" where he should have
written "#+BEGIN_SRC sh". While this looks like a benign error to me,
it broke my publishing script, and I did not figure at once what was
happening. At export time, when Emacs is called in batch, the export
procedure dies. Emacs says that some process disappeared, and I think I
got that the batch Emacs tries to start "M-x shell" under the scene.
Could the HTML exporter (or all of them) protect itself (themselves)
better? Or else, maybe, if this is a reasonable to do, could Org tell
us, somehow, whenever a source mode (like "shell", here) is "wrong"?
François
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Problem with #+BEGIN_SRC shell, and export
2013-12-06 4:58 Problem with #+BEGIN_SRC shell, and export François Pinard
@ 2013-12-10 18:53 ` Eric Schulte
2014-01-03 14:53 ` Bastien
0 siblings, 1 reply; 4+ messages in thread
From: Eric Schulte @ 2013-12-10 18:53 UTC (permalink / raw)
To: François Pinard; +Cc: emacs-orgmode
François Pinard <pinard@iro.umontreal.ca> writes:
> Hi, Org people.
>
> Let me make this report from memory, now that I'm back home! :-)
>
> In an Org file, a coworker used "#+BEGIN_SRC shell" where he should have
> written "#+BEGIN_SRC sh". While this looks like a benign error to me,
> it broke my publishing script, and I did not figure at once what was
> happening. At export time, when Emacs is called in batch, the export
> procedure dies. Emacs says that some process disappeared, and I think I
> got that the batch Emacs tries to start "M-x shell" under the scene.
>
> Could the HTML exporter (or all of them) protect itself (themselves)
> better? Or else, maybe, if this is a reasonable to do, could Org tell
> us, somehow, whenever a source mode (like "shell", here) is "wrong"?
>
> François
>
Perhaps one could add '("shell" . 'sh) to org-src-lang-modes. That
would protect against this particular error. Whatever solution is
adopted should be easily discovered and sidestepped in case anyone
actually did want to export code using shell-mode for highlighting.
Best,
--
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Problem with #+BEGIN_SRC shell, and export
2013-12-10 18:53 ` Eric Schulte
@ 2014-01-03 14:53 ` Bastien
2014-01-03 15:10 ` Sharon Kimble
0 siblings, 1 reply; 4+ messages in thread
From: Bastien @ 2014-01-03 14:53 UTC (permalink / raw)
To: Eric Schulte; +Cc: François Pinard, emacs-orgmode
Hi,
Eric Schulte <schulte.eric@gmail.com> writes:
> Perhaps one could add '("shell" . 'sh) to org-src-lang-modes. That
> would protect against this particular error. Whatever solution is
> adopted should be easily discovered and sidestepped in case anyone
> actually did want to export code using shell-mode for highlighting.
In this particular case, I don't think adding
'("shell" . 'sh)
to `org-src-lang-modes' will help, as shell-mode is a mode for
shell interactions, not just shell editing. So the user probably
wanted sh-mode instead.
As for making it easier to discover I don't know, the docstring
seems complete enough to me.
--
Bastien
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Problem with #+BEGIN_SRC shell, and export
2014-01-03 14:53 ` Bastien
@ 2014-01-03 15:10 ` Sharon Kimble
0 siblings, 0 replies; 4+ messages in thread
From: Sharon Kimble @ 2014-01-03 15:10 UTC (permalink / raw)
To: Bastien; +Cc: François Pinard, emacs-orgmode, Eric Schulte
[-- Attachment #1: Type: text/plain, Size: 1371 bytes --]
On Fri, 03 Jan 2014 15:53:34 +0100
Bastien <bzg@gnu.org> wrote:
> Hi,
>
> Eric Schulte <schulte.eric@gmail.com> writes:
>
> > Perhaps one could add '("shell" . 'sh) to org-src-lang-modes. That
> > would protect against this particular error. Whatever solution is
> > adopted should be easily discovered and sidestepped in case anyone
> > actually did want to export code using shell-mode for highlighting.
>
> In this particular case, I don't think adding
>
> '("shell" . 'sh)
>
> to `org-src-lang-modes' will help, as shell-mode is a mode for
> shell interactions, not just shell editing. So the user probably
> wanted sh-mode instead.
>
> As for making it easier to discover I don't know, the docstring
> seems complete enough to me.
>
Also using 'foobar.sh' is deprecated in current-day bash scripting, it
should just be 'foobar'. But one thing is always current, the shebang -
#!/bin/bash. That, or whatever scripting language is being used
bash/dash/zsh/whatever, it will always say '#!/bin/WHATEVER' applicable
to its scripting language.
Sharon.
--
A taste of linux = http://www.sharons.org.uk
efever = http://www.efever.blogspot.com/
efever = http://sharon04.livejournal.com/
my git repo = https://bitbucket.org/boudiccas/dots
Debian testing, Fluxbox 1.3.5, LibreOffice 4.1.4.2
Registered Linux user 561944
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-01-03 15:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-06 4:58 Problem with #+BEGIN_SRC shell, and export François Pinard
2013-12-10 18:53 ` Eric Schulte
2014-01-03 14:53 ` Bastien
2014-01-03 15:10 ` Sharon Kimble
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).