From: "Berry, Charles" <ccberry@ucsd.edu>
To: Marian Schubert <marian.schubert@gmail.com>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Babel problem: Output incomplete if it contains # character (only in session)
Date: Tue, 5 Jun 2018 01:38:51 +0000 [thread overview]
Message-ID: <DBD84E53-24A0-4BBF-B50A-0B675D77655D@ucsd.edu> (raw)
In-Reply-To: <CAAd4LWyfxhgjrJ5EvQbwKvpG5cdXqxNdjx=qQG9tF5oqJYycsg@mail.gmail.com>
> On Jun 4, 2018, at 9:42 AM, Marian Schubert <marian.schubert@gmail.com> wrote:
>
> I'm having trouble with babel block like this:
>
>
> #+BEGIN_SRC shell :results output :session abc
> echo foo#bar
> #+END_SRC
>
> When I execute it for the first time I get this result:
>
> #+RESULTS:
> :
> : foo#bar
>
> When I execute it again I get this:
>
> #+RESULTS:
> :
> : bar
>
> (foo# is missing)
>
> Any idea what might be wrong? I'm using version 9.1.13.
>
After running that I get this in the abc buffer for
M-x describe-variable RET comint-prompt-regexp RET
,----
| comint-prompt-regexp is a variable defined in ‘comint.el’.
| Its value is "^[^#$%>
| ]*[#$%>] *"
| Local in buffer abc; global value is "^"
|
| Documentation:
| Regexp to recognize prompts in the inferior process.
| Defaults to "^", the null string at BOL.
|
| This variable is only used if the variable
| ‘comint-use-prompt-regexp’ is non-nil.
|
| Good choices:
| Canonical Lisp: "^[^> \n]*>+:? *" (Lucid, franz, kcl, T, cscheme, oaklisp)
| Lucid Common Lisp: "^\\(>\\|\\(->\\)+\\) *"
| franz: "^\\(->\\|<[0-9]*>:\\) *"
| kcl: "^>+ *"
| shell: "^[^#$%>\n]*[#$%>] *"
| T: "^>+ *"
|
| This is a good thing to set in mode hooks.
|
| [back]
`----
The first hash is not recognized as a prompt, but the rest are.
If you really need to use the hash, then running
: (set-local comint-prompt-regexp "^[^$%>\n]*[$%>] *")
in the `abc' buffer might help.
This has obvious problems if you run as root and do not reset the prompt to something other than #.
HTH,
Chuck
next prev parent reply other threads:[~2018-06-05 1:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-04 16:42 Babel problem: Output incomplete if it contains # character (only in session) Marian Schubert
2018-06-05 1:38 ` Berry, Charles [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-05-26 16:01 Marian Schubert
2018-06-12 15:01 ` Narendra Joshi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DBD84E53-24A0-4BBF-B50A-0B675D77655D@ucsd.edu \
--to=ccberry@ucsd.edu \
--cc=emacs-orgmode@gnu.org \
--cc=marian.schubert@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.