emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* run bash sessions without config files
@ 2017-08-02 15:53 Tyler Smith
  2017-08-03 20:31 ` Tyler Smith
  0 siblings, 1 reply; 3+ messages in thread
From: Tyler Smith @ 2017-08-02 15:53 UTC (permalink / raw)
  To: Emacs Org-Mode Help

Hi,

I use shell-mode a lot, and have a very complex prompt, coloured with
escape codes and lots of bells and whistles. This appears to confuse
org-babel when I'm running code blocks in a session, similar to what's
described here:

https://emacs.stackexchange.com/questions/19735/emacs-freezes-with-any-org-babel-snippet-using-session

Is it possible to configure org-babel to ignore any customization files,
such as .emacs.d/init_bash.el and .bashrc?

As a workaround, I redefine PS1 and PS2 at the top of my org buffer,
which fixes the problem temporarily. I'd like a permanent fix if
possible.

Best,

Tyler

-- 
plantarum.ca

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

* Re: run bash sessions without config files
  2017-08-02 15:53 run bash sessions without config files Tyler Smith
@ 2017-08-03 20:31 ` Tyler Smith
  2017-08-03 22:09   ` Adam Porter
  0 siblings, 1 reply; 3+ messages in thread
From: Tyler Smith @ 2017-08-03 20:31 UTC (permalink / raw)
  To: emacs-orgmode

On Wed, Aug 2, 2017, at 11:53 AM, Tyler Smith wrote:
> 
> Is it possible to configure org-babel to ignore any customization files,
> such as .emacs.d/init_bash.el and .bashrc?
> 

After some digging around, it looks like this isn't possible.
~org-babel~ starts shell sessions via the standard function ~(shell)~.
Loading ~init_bash.el~ is hard-coded into this function, so there's no
user-visible way to direct Emacs not to read it for org-mode code
blocks, while still using it in other contexts. 

Best,

Tyler

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

* Re: run bash sessions without config files
  2017-08-03 20:31 ` Tyler Smith
@ 2017-08-03 22:09   ` Adam Porter
  0 siblings, 0 replies; 3+ messages in thread
From: Adam Porter @ 2017-08-03 22:09 UTC (permalink / raw)
  To: emacs-orgmode

Tyler Smith <tyler@plantarum.ca> writes:

> On Wed, Aug 2, 2017, at 11:53 AM, Tyler Smith wrote:
>> 
>> Is it possible to configure org-babel to ignore any customization files,
>> such as .emacs.d/init_bash.el and .bashrc?
>> 
> After some digging around, it looks like this isn't possible.
> ~org-babel~ starts shell sessions via the standard function ~(shell)~.
> Loading ~init_bash.el~ is hard-coded into this function, so there's no
> user-visible way to direct Emacs not to read it for org-mode code
> blocks, while still using it in other contexts. 

Could you run the code in the source block within "bash --noprofile
--norc"?  You could use "-c" to pass the rest of the commands as a
string, or "-s" to pass to STDIN with a heredoc.  I don't know if it
will work, but it might...

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

end of thread, other threads:[~2017-08-03 22:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-02 15:53 run bash sessions without config files Tyler Smith
2017-08-03 20:31 ` Tyler Smith
2017-08-03 22:09   ` Adam Porter

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).