[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to make Emacs paths in the minibuffer start at root (/) instead

From: Christopher Howard
Subject: Re: How to make Emacs paths in the minibuffer start at root (/) instead of $HOME (~)?
Date: Tue, 25 Mar 2014 16:11:53 -0800

On Tue, 25 Mar 2014 14:15:55 -0400
MBR <address@hidden> wrote:

> There are times when I'd like to make an Emacs buffer's current 
> directory available to be pasted into other applications.  I can do
> this by typing:
>     C-x C-f              (this asks what file you want to open, and
> puts the current directory in the mini-buffer with the cursor at the
> end) C-a (move to the beginning of the minibuffer)
>     C-k (kill the contents of the minibuffer, and as a side effect
> make the line you just killed available to be pasted)
>     C-g (cancel the file open operation)
> A bit of a kludge, I know, but it works.  Except that for
> subdirectories of my home directory the path starts at "~" instead of
> "/", and some of the applications I might want to paste it into don't
> understand "~".
> Is there any way to force Emacs to always start paths in the
> minibuffer at "/" instead of starting some of them at "~"?
>     Mark Rosenthal
>     address@hidden

I'm not a guru, but I would think you could get a similiar result
writing an interactive lisp function. Just looking at the docs, I was

(expand-file-name (pwd))

with a function around that to save it for pasting. Only problem is
that, apparently, the `pwd' function includes other junk in the string
along with the expanded file name. Any thoughts from the real

reply via email to

[Prev in Thread] Current Thread [Next in Thread]