* Babel problem: Output incomplete if it contains # character (only in session)
@ 2018-05-26 16:01 Marian Schubert
2018-06-12 15:01 ` Narendra Joshi
0 siblings, 1 reply; 4+ messages in thread
From: Marian Schubert @ 2018-05-26 16:01 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 333 bytes --]
Hello,
I'm having trouble with babel block like this:
#+BEGIN_SRC shell :results output :session xyz
echo "foo#bar"
#+END_SRC
#+RESULTS:
:
: bar
I expect results to be foo#bar, but it's just bar.
If I remove :session xyz it displays correct value, i.e.:
#+RESULTS:
: foo#bar
Any idea what might be wrong?
Best regards,
Marian
[-- Attachment #2: Type: text/html, Size: 635 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Babel problem: Output incomplete if it contains # character (only in session)
@ 2018-06-04 16:42 Marian Schubert
2018-06-05 1:38 ` Berry, Charles
0 siblings, 1 reply; 4+ messages in thread
From: Marian Schubert @ 2018-06-04 16:42 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 579 bytes --]
Hello,
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.
Best regards,
Marian
Full example.org:
* Example
#+BEGIN_SRC shell :results output :session abc
echo foo#bar
#+END_SRC
#+RESULTS:
:
: foo#bar
#+BEGIN_SRC shell :results output :session abc
echo foo#bar
#+END_SRC
#+RESULTS:
:
: bar
[-- Attachment #2: Type: text/html, Size: 3152 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Babel problem: Output incomplete if it contains # character (only in session)
2018-06-04 16:42 Marian Schubert
@ 2018-06-05 1:38 ` Berry, Charles
0 siblings, 0 replies; 4+ messages in thread
From: Berry, Charles @ 2018-06-05 1:38 UTC (permalink / raw)
To: Marian Schubert; +Cc: emacs-orgmode@gnu.org
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Babel problem: Output incomplete if it contains # character (only in session)
2018-05-26 16:01 Babel problem: Output incomplete if it contains # character (only in session) Marian Schubert
@ 2018-06-12 15:01 ` Narendra Joshi
0 siblings, 0 replies; 4+ messages in thread
From: Narendra Joshi @ 2018-06-12 15:01 UTC (permalink / raw)
To: Marian Schubert; +Cc: emacs-orgmode
Marian Schubert <marian.schubert@gmail.com> writes:
> Hello,
>
> I'm having trouble with babel block like this:
>
> #+BEGIN_SRC shell :results output :session xyz
> echo "foo#bar"
> #+END_SRC
>
> #+RESULTS:
> :
> : bar
>
> I expect results to be foo#bar, but it's just bar.
> If I remove :session xyz it displays correct value, i.e.:
I also face issues when there is a session involved with shell.
Why don't you try:
export PS1=$
at the beginning of the session as the first command and see if this
fixes it for you?
> #+RESULTS:
> : foo#bar
>
> Any idea what might be wrong?
>
> Best regards,
> Marian
>
--
Narendra Joshi
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-06-12 15:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-26 16:01 Babel problem: Output incomplete if it contains # character (only in session) Marian Schubert
2018-06-12 15:01 ` Narendra Joshi
-- strict thread matches above, loose matches on Subject: below --
2018-06-04 16:42 Marian Schubert
2018-06-05 1:38 ` Berry, Charles
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.