[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Reuse frame with emacsclient and/or use shell aliases when finding f
From: |
Jacob Gerlach |
Subject: |
Re: Reuse frame with emacsclient and/or use shell aliases when finding files |
Date: |
Fri, 30 May 2014 18:57:19 -0700 (PDT) |
User-agent: |
G2/1.0 |
> 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.
Re: Reuse frame with emacsclient and/or use shell aliases when finding files, Thorsten Jolitz, 2014/05/31