From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Robert Thorpe Newsgroups: gmane.emacs.help Subject: Re: Reuse frame with emacsclient and/or use shell aliases when finding files Date: Sat, 31 May 2014 12:22:36 +0100 Message-ID: <87egzaqjk3.fsf@robertthorpeconsulting.com> References: <723a5906-bae9-4db0-8c74-763712cc1410@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1401535396 17971 80.91.229.3 (31 May 2014 11:23:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 31 May 2014 11:23:16 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Jacob Gerlach Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat May 31 13:23:09 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 1WqhNU-0002iA-Ga for geh-help-gnu-emacs@m.gmane.org; Sat, 31 May 2014 13:23:08 +0200 Original-Received: from localhost ([::1]:58946 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WqhNU-0000Ce-2p for geh-help-gnu-emacs@m.gmane.org; Sat, 31 May 2014 07:23:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45074) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WqhN9-0008V0-3B for help-gnu-emacs@gnu.org; Sat, 31 May 2014 07:22:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WqhN0-0007ON-R1 for help-gnu-emacs@gnu.org; Sat, 31 May 2014 07:22:47 -0400 Original-Received: from outbound-smtp05.blacknight.com ([81.17.249.38]:40923) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WqhN0-0007O7-En for help-gnu-emacs@gnu.org; Sat, 31 May 2014 07:22:38 -0400 Original-Received: from mail.blacknight.com (pemlinmail04.blacknight.ie [81.17.254.17]) by outbound-smtp05.blacknight.com (Postfix) with ESMTP id 50D0099139 for ; Sat, 31 May 2014 11:20:18 +0000 (UTC) Original-Received: (qmail 21752 invoked from network); 31 May 2014 11:22:37 -0000 Original-Received: from unknown (HELO RTLaptop) (rt@robertthorpeconsulting.com@[109.78.94.25]) by 81.17.254.9 with ESMTPSA (DHE-RSA-AES128-SHA encrypted, authenticated); 31 May 2014 11:22:37 -0000 In-Reply-To: <723a5906-bae9-4db0-8c74-763712cc1410@googlegroups.com> (message from Jacob Gerlach on Fri, 30 May 2014 18:57:19 -0700 (PDT)) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 81.17.249.38 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:97976 Archived-At: Jacob Gerlach writes: > If I use just emacsclient, I get a terminal window. With -c I get a > GUI window. 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. That's wierd. Have a look at the section on "Emacs Server" in the Emacs manual. Emacsclient can only work if you have an Emacs server running. To get one you have to start Emacs then run (server-start). After that emacsclient will send a message to the running Emacs server telling it to open the file. Try the following: * Close all Emacs instances. * From the command line type "Emacs &" and minimize the Emacs. * Execute (server-start) e.g. by typing it into scratch and pressing C-x C-e with the cursor at the end of the line. * From a shell type "emacsclient file.txt". After the last step the existing Emacs should pop-up with the file open in it. > That's a pretty good idea! I've just recently started experimenting > with bookmarks. 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. I expect that's possible with a little bit of elisp. If you look at .emacs.bmk it's quite a simple format. > 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 minibuffer". In any case, if I change > directories manually, `cd ~/foobar', find-file defaults to ~/foobar. When I wrote "C-x C-f, C-x d" I meant you could use C-x C-f or C-x d.# > If I use an alias to cd to ~/foobar, find-file remains in the > previous working directory. So it does. I'd say that's a bug in shell mode. BR, Robert Thorpe