From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jacob Gerlach Newsgroups: gmane.emacs.help Subject: Re: Reuse frame with emacsclient and/or use shell aliases when finding files Date: Fri, 30 May 2014 18:57:19 -0700 (PDT) Message-ID: <723a5906-bae9-4db0-8c74-763712cc1410@googlegroups.com> References: <06de416b-9d9d-4e86-bc41-f6b9a06404f4@googlegroups.com> (message from Jacob Gerlach on Fri, 30 May 2014 14:56:33 -0700 (PDT))> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1401501625 27921 80.91.229.3 (31 May 2014 02:00:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 31 May 2014 02:00:25 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat May 31 04:00:19 2014 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 1WqYap-00016m-2N for geh-help-gnu-emacs@m.gmane.org; Sat, 31 May 2014 04:00:19 +0200 Original-Received: from localhost ([::1]:57322 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WqYao-0008OJ-4p for geh-help-gnu-emacs@m.gmane.org; Fri, 30 May 2014 22:00:18 -0400 X-Received: by 10.67.4.202 with SMTP id cg10mr8035941pad.42.1401501439693; Fri, 30 May 2014 18:57:19 -0700 (PDT) X-Received: by 10.140.100.204 with SMTP id s70mr4845qge.9.1401501439528; Fri, 30 May 2014 18:57:19 -0700 (PDT) Original-Path: usenet.stanford.edu!news.glorb.com!c1no21256851igq.0!news-out.google.com!qf4ni17772igc.0!nntp.google.com!c1no21256847igq.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=98.217.114.175; posting-account=Hx-_8AoAAACyMXgs4MCS3wNERNLct_lk Original-NNTP-Posting-Host: 98.217.114.175 User-Agent: G2/1.0 Injection-Date: Sat, 31 May 2014 01:57:19 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:205703 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:97973 Archived-At: > You want the default behaviour of emacsclient then. In that case don't a= dd > "-c" to the emacsclient command. I'm sure you tried that though. I'm > not sure why it doesn't work on your setup. Do you have (server-start) > in your init file? Are you using emacs --daemon? If I use just emacsclient, I get a terminal window. With -c I get a GUI win= dow. I don't have any problem with the client not starting. I didn't have (= server-start) in my init, but adding it didn't change anything. > You could setup bookmarks with C-x r m that have the same names as the > aliases. You can bookmark a dired buffer in a certain directory and > recalling the bookmark will return you there. That's a pretty good idea! I've just recently started experimenting with bo= okmarks. I wonder if I could come up with some utility function to read in = bash aliases and create the associated dired bookmarks when I start emacs. = That way I don't have to maintain two lists of aliases and keep them synced= . =20 > Well, if you do use an Emacs shell then when you press C-x C-f it will > default to your current directory. Suppose you do M-x shell and you > have a bash alias 'alias pro1=3D"cd ~\Projects\FooCorp\MainProject"'. If= you > type "pro1 RET" it'll take you to the directory. Then C-x C-f, C-x d, > etc will default to \Projects\FooCorp\MainProject. "Shell" and "Term" > modes don't replace the shell they run it as a sub-process, only > "Eshell" replaces it with a different shell. I'm not certain I understood this correctly. After `M-x shell', I can use C= -x C-f RET to get dired for the current directory. If I try C-x C-f, C-x d = as you suggested, I get "Command attempted to use minibuffer while in minib= uffer". In any case, if I change directories manually, `cd ~/foobar', find-= file defaults to ~/foobar. If I use an alias to cd to ~/foobar, find-file r= emains in the previous working directory.