unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Giorgos Keramidas <keramida@ceid.upatras.gr>
To: help-gnu-emacs@gnu.org
Subject: Re: how to make emacs aware of bash aliases
Date: Wed, 10 Sep 2008 02:39:31 +0300	[thread overview]
Message-ID: <873ak8rirw.fsf@kobe.laptop> (raw)
In-Reply-To: 43f12347-4102-4636-b034-d08158ec8ed3@j22g2000hsf.googlegroups.com

On Tue, 9 Sep 2008 01:46:44 -0700 (PDT), etay.meiri@gmail.com wrote:
> Hi,
>
> I have the following aliases in my .bashrc:
>
> alias remake="make clean && make"
> alias makedebug="make CXXFLAGS=\"-g -DDEBUG\""
> alias makerelease="make CXXFLAGS=\"-g -O3\""
>
> They work fine from a regular bash shell.
>
> I'm trying to use them via emacs compile command and get the following
> result:
>
> -*- mode: compilation; default-directory: "~/workspace/demo_12_1/" -*-
> Compilation started at Tue Sep  9 11:40:15
>
> cd ~/workspace/demo_12_1/ && makedebug
> /bin/bash: makedebug: command not found
>
> Compilation exited abnormally with code 127 at Tue Sep  9 11:40:15
>
> How can I make the emacs shell aware of the aliases I defined?

I think this is because bash runs in `non-interactive' mode when Emacs
spawns a compile process.  You can try defining BASH_ENV in the runtime
environment of Emacs.  The `BASH_ENV' variable is expanded by bash, then
it tries to read commands from this file.  So you can set its value to
something like:

    BASH_ENV='~/.bashenv'

Then add the aliases of your non-interactive bash sessions to that file.



      reply	other threads:[~2008-09-09 23:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-09  8:46 how to make emacs aware of bash aliases etay.meiri
2008-09-09 23:39 ` Giorgos Keramidas [this message]

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.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=873ak8rirw.fsf@kobe.laptop \
    --to=keramida@ceid.upatras.gr \
    --cc=help-gnu-emacs@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.
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).