From: Jacob Gerlach <jacobgerlach@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Reuse frame with emacsclient and/or use shell aliases when finding files
Date: Fri, 30 May 2014 18:57:19 -0700 (PDT) [thread overview]
Message-ID: <723a5906-bae9-4db0-8c74-763712cc1410@googlegroups.com> (raw)
In-Reply-To: <mailman.2576.1401490089.1147.help-gnu-emacs@gnu.org>
> You want the default behaviour of emacsclient then. In that case don't add
> "-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 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.
> 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 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.
> 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="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 minibuffer". 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 remains in the previous working directory.
next prev parent reply other threads:[~2014-05-31 1:57 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-30 21:56 Reuse frame with emacsclient and/or use shell aliases when finding files Jacob Gerlach
2014-05-30 22:13 ` Thorsten Jolitz
2014-05-30 22:47 ` Robert Thorpe
[not found] ` <mailman.2576.1401490089.1147.help-gnu-emacs@gnu.org>
2014-05-31 1:57 ` Jacob Gerlach [this message]
2014-05-31 11:21 ` Thien-Thi Nguyen
2014-05-31 11:22 ` Robert Thorpe
[not found] ` <mailman.2614.1401535376.1147.help-gnu-emacs@gnu.org>
2014-05-31 14:16 ` Jacob Gerlach
2014-05-31 15:49 ` Robert Thorpe
2014-05-31 11:41 ` Thorsten Jolitz
2014-05-31 13:39 ` Robert Thorpe
2014-05-31 15:54 ` Thorsten Jolitz
2014-06-01 23:42 ` lee
[not found] ` <mailman.2724.1401666174.1147.help-gnu-emacs@gnu.org>
2014-06-02 1:10 ` Jacob Gerlach
[not found] ` <mailman.2618.1401536506.1147.help-gnu-emacs@gnu.org>
2014-06-06 8:35 ` Hans BKK
2014-06-06 11:31 ` Alexander Baier
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=723a5906-bae9-4db0-8c74-763712cc1410@googlegroups.com \
--to=jacobgerlach@gmail.com \
--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.
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.