From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ken Newsgroups: gmane.emacs.help Subject: Re: how to use bash alias in emacs compile Date: Mon, 07 May 2012 16:04:01 -0400 Message-ID: <4FA82AB1.6030702@mousecar.com> References: <87wr4tll18.fsf@kuiper.lan.informatimago.com> <9478bdbc-94cd-4b58-bea3-ed63453a39c5@kw17g2000pbb.googlegroups.com> Reply-To: gebser@mousecar.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1336421061 2856 80.91.229.3 (7 May 2012 20:04:21 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 7 May 2012 20:04:21 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon May 07 22:04:16 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SRUAI-0007R0-Fn for geh-help-gnu-emacs@m.gmane.org; Mon, 07 May 2012 22:04:14 +0200 Original-Received: from localhost ([::1]:54712 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SRUAH-0007qN-St for geh-help-gnu-emacs@m.gmane.org; Mon, 07 May 2012 16:04:13 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:55918) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SRUAC-0007q7-Ln for help-gnu-emacs@gnu.org; Mon, 07 May 2012 16:04:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SRUAA-0006UK-UG for help-gnu-emacs@gnu.org; Mon, 07 May 2012 16:04:08 -0400 Original-Received: from mout.perfora.net ([74.208.4.194]:55218) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SRUAA-0006U0-NE for help-gnu-emacs@gnu.org; Mon, 07 May 2012 16:04:06 -0400 Original-Received: from dellap.mousecar.net (dsl093-011-016.cle1.dsl.speakeasy.net [66.93.11.16]) by mrelay.perfora.net (node=mrus0) with ESMTP (Nemesis) id 0LzMJF-1S5x3b34zp-014F4I; Mon, 07 May 2012 16:04:04 -0400 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.4) Gecko/20120424 Thunderbird/10.0.4 In-Reply-To: <9478bdbc-94cd-4b58-bea3-ed63453a39c5@kw17g2000pbb.googlegroups.com> X-Provags-ID: V02:K0:cmK/FyVhmos1S81RC8BGUl+NWSMu7tg/2YCxJNgFcpr DMWZtYGhDxO6GDWAX8R2hvk7h41MOHlRNVBCPOqf0CRGiAIW1Q 70NHmK0ZO5HhdQQk1xa6iDjjVRNRExOJf3dcOvAzFIGsBkB5Oo lFmqHORWwIhOzfuxMvg7nF8+nCGWIZOrqoiQhdPZ57PWp7Cdfi mRDCUg7Yobcpqq95FCwhVY7e0cjSFuRwVUaL3LmFIJuuP40VRO CqTE8mU/5Cf47VYi/SHqLXkwdTm56mtWU0RgYOtb4zryOXrZKX PV1FGRylEGiHEWgUJK46N1+RLcb0kREHXS+ZjAu099V37iw7zQ 8hzIzbUU/KfSST0S06gyj5YSdbT3qImMC5GAh5SFw X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 74.208.4.194 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:84759 Archived-At: On 05/07/2012 03:48 PM Daniel (Youngwhan) wrote: > On May 3, 1:35 am, "Pascal J. Bourguignon" > wrote: >> "Daniel (Youngwhan)" writes: >>> Hi, >> >>> I have alias like this: >> >>> alias dm='cd ~/XYZ&& ./mycompile.sh' >> >> Where do you have it? >> > > The lots of aliases are defined in a file, where is in $HOME/bin, and > the $PATH has it, too. > >>> I typed M-x compile, and tried to run by just typing "dm", but it >>> doesn't recognize. >> >> Try: M-x compile RET C-a C-k bash -i -c dm RET >> > > Yeah, it works!, but if I typed only dm, it doesn't. > >>> I searched and some suggest BASH_ENV, so I tried, but not working. >> >> man bash explains in details what file it will load and when, but it's >> complicated. I put everything in ~/.bashrc >> > > Let me study you've mentioned here, but if you can share your > experience in detail, it would be appreciated. Yes, ~/.bashrc is the place to put aliases... because then they are loaded whenever you log in. If this isn't the behavior you want, then you can put them somewhere else, e.g., in ~/bin/aliases, but then you'll have to invoke them yourself. This can be done with either of these commands: source ~/bin/aliases or . ~/bin/aliases (Note that "~/bin/aliases" is an example name I made up. Just about any normal filename can be given.) If you edit ~/.bashrc, including new aliases in it, you can use the same commands as above to read those new aliases into the current environment with: source ~/.bashrc or . ~/.bashrc Then you don't have to log out and then log back in to put your new aliases into effect. hth