all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* emacs + ansi-term on OSX
@ 2014-01-24  6:19 Jai Dayal
  2014-01-24 15:51 ` Alp Aker
  0 siblings, 1 reply; 3+ messages in thread
From: Jai Dayal @ 2014-01-24  6:19 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

I have compiled and installed gnu emacs from source (I am not using
Aquamacs or EmacsForMac), however, when I run M-x ansi-term, it does not
run my .profile script (Mac doesn't use .bashrc). How can I setup the
ansi-term to run my .profile for each bash shell it runs? I typically have
multiple ansi-shells.

I also do something like this to make spawning ansi-shells and renaming
them easier:

(defun aterm (buffer-name)
  "Start a terminal and rename buffer."
  (interactive "sbuffer name: ")
  (ansi-term "/bin/bash")
  (rename-buffer buffer-name t))

Thanks much,
Jai


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

* Re: emacs + ansi-term on OSX
  2014-01-24  6:19 emacs + ansi-term on OSX Jai Dayal
@ 2014-01-24 15:51 ` Alp Aker
  2014-01-24 15:54   ` Jai Dayal
  0 siblings, 1 reply; 3+ messages in thread
From: Alp Aker @ 2014-01-24 15:51 UTC (permalink / raw)
  To: Jai Dayal; +Cc: help-gnu-emacs

> I have compiled and installed gnu emacs from source (I am not using
> Aquamacs or EmacsForMac), however, when I run M-x ansi-term, it does not
> run my .profile script (Mac doesn't use .bashrc). How can I setup the
> ansi-term to run my .profile for each bash shell it runs? I typically have
> multiple ansi-shells.

You're used to the fact that the default terminal emulator on OS X starts a
login shell; you'll get the behavior you want by ensuring that bash is
invoked with the "--login" switch.  No straightforward way to do that that
I see, but I don't use this functionality.  One way would be to redefine
the function ansi-term so that it passes the proper parameter to
term-ansi-make-term.   (BTW, it looks like you can just pass the desired
buffer name as an argument to ansi-term, rather than renaming after that
fact.)


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

* Re: emacs + ansi-term on OSX
  2014-01-24 15:51 ` Alp Aker
@ 2014-01-24 15:54   ` Jai Dayal
  0 siblings, 0 replies; 3+ messages in thread
From: Jai Dayal @ 2014-01-24 15:54 UTC (permalink / raw)
  To: Alp Aker; +Cc: help-gnu-emacs

Thanks for the reply. The weird thing is, when I do it on a Linux machine,
I don't have this problem: when invoking ansi-term, it executes the script
automagically. I'm just at a loss as to how to do it on the Mac.

Thanks.


On Fri, Jan 24, 2014 at 10:51 AM, Alp Aker <alptekin.aker@gmail.com> wrote:

> > I have compiled and installed gnu emacs from source (I am not using
> > Aquamacs or EmacsForMac), however, when I run M-x ansi-term, it does not
> > run my .profile script (Mac doesn't use .bashrc). How can I setup the
> > ansi-term to run my .profile for each bash shell it runs? I typically
> have
> > multiple ansi-shells.
>
> You're used to the fact that the default terminal emulator on OS X starts
> a login shell; you'll get the behavior you want by ensuring that bash is
> invoked with the "--login" switch.  No straightforward way to do that that
> I see, but I don't use this functionality.  One way would be to redefine
> the function ansi-term so that it passes the proper parameter to
> term-ansi-make-term.   (BTW, it looks like you can just pass the desired
> buffer name as an argument to ansi-term, rather than renaming after that
> fact.)
>


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

end of thread, other threads:[~2014-01-24 15:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-24  6:19 emacs + ansi-term on OSX Jai Dayal
2014-01-24 15:51 ` Alp Aker
2014-01-24 15:54   ` Jai Dayal

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.