From: "Cook, Malcolm" <MEC@stowers.org>
To: Org-mode <emacs-orgmode@gnu.org>
Subject: org-babel-execute-src-block filters characters from :session *shell* output
Date: Thu, 13 Jun 2024 14:32:47 +0000 [thread overview]
Message-ID: <DS7PR20MB4671713A14EAE018354B0C8CBEC12@DS7PR20MB4671.namprd20.prod.outlook.com> (raw)
Hi,
While using:
Org mode version 9.7.3 (9.7.3-2f1844 @ /home/mec/.dotfiles/emacs/.emacs.d/elpa/org-9.7.3/)
GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo
Let me walk you through the issue:
#+begin_src sh
printf 'a\nb\nc\n>d\n<e\n'
#+end_src
#+RESULTS:
: a
: b
: c
: >d
: <e
Results look as expected. So far so good.
Now create a shell buffer (which will be named "*shell*")
#+begin_src elisp
(shell)
#+end_src
and try it again
#+begin_src sh
printf 'a\nb\nc\n>d\n<e\n'
#+end_src
#+RESULTS:
: a
: b
: c
: d
: <e
Huh? what happened to the ">" before the "d"?
Let's try it again.
First kill the *shell* buffer:
#+begin_src elisp
(let ((kill-buffer-query-functions nil)) (kill-buffer "*shell*"))
#+end_src
#+RESULTS:
: t
and try it again:
#+begin_src sh
printf 'a\nb\nc\n>d\n<e\n'
#+end_src
#+RESULTS:
: a
: b
: c
: >d
: <e
The ">" is back!
What is going on.
I'm pretty sure that `org-babel-comint--prompt-filter` is implicated which has had some recent changes (https://list.orgmode.org/87ttmn9fg0.fsf@localhost/T/) related to prompt filtering.
Any workarounds / patches most welcome!
Thanks!
~ Malcolm
next reply other threads:[~2024-06-13 14:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-13 14:32 Cook, Malcolm [this message]
2024-06-14 14:09 ` org-babel-execute-src-block filters characters from :session *shell* output Ihor Radchenko
2024-06-14 14:29 ` Cook, Malcolm
2024-06-15 13:19 ` Ihor Radchenko
2024-06-16 12:47 ` Max Nikulin
2024-06-17 17:57 ` Ihor Radchenko
2024-06-17 15:48 ` Cook, Malcolm
2024-06-17 18:03 ` Ihor Radchenko
2024-06-17 22:40 ` Cook, Malcolm
2024-06-17 23:09 ` Cook, Malcolm
2024-06-19 14:40 ` Ihor Radchenko
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
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DS7PR20MB4671713A14EAE018354B0C8CBEC12@DS7PR20MB4671.namprd20.prod.outlook.com \
--to=mec@stowers.org \
--cc=emacs-orgmode@gnu.org \
/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 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).