From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Christopher Howard Newsgroups: gmane.emacs.help 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 Message-ID: <20140325161153.3c0eb41a@voltron.arsc.edu> References: <5331C7DB.4070907@arlsoft.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1395792656 6747 80.91.229.3 (26 Mar 2014 00:10:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 26 Mar 2014 00:10:56 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Mar 26 01:11:06 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 1WSbQv-0006xg-KG for geh-help-gnu-emacs@m.gmane.org; Wed, 26 Mar 2014 01:11:05 +0100 Original-Received: from localhost ([::1]:44962 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WSbQu-0004mX-Mt for geh-help-gnu-emacs@m.gmane.org; Tue, 25 Mar 2014 20:11:04 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34425) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WSbQd-0004dz-Ka for help-gnu-emacs@gnu.org; Tue, 25 Mar 2014 20:10:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WSbQY-0001UV-L5 for help-gnu-emacs@gnu.org; Tue, 25 Mar 2014 20:10:47 -0400 Original-Received: from mail-pb0-f47.google.com ([209.85.160.47]:33011) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WSbQY-0001UR-F5 for help-gnu-emacs@gnu.org; Tue, 25 Mar 2014 20:10:42 -0400 Original-Received: by mail-pb0-f47.google.com with SMTP id up15so1159823pbc.6 for ; Tue, 25 Mar 2014 17:10:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=+OtwDkBSNkMi+C9ac++XORhIElF6CFjajJOCWJpisI4=; b=Yz7ZJ0TZUwOA5zO5/2bZfsokpR45aaTs6qlVedC6dDl1lzDmmVrVg82LQM5mnUBdGX PBoui8pNip0B2IE5zdZ60udXPBAv/yb8f/xr8guGZuR9kEYzTxqQDs24xlv86xx4sjaY FKahepiQlmUgvVbbStQzucw4q6HMF3B7Th396zS74PnVShNeT4Oiha7436y3zQLiIAA7 1gMecFPmKAtxPGSJH26uiSXp5K73b4qLlFLXnyMGGw2Wo9yuuWYGYQn5eoI8cFIPk8+X u3fp2j1MYuJbyW9w7oxWKVVvOVMLOAc52CXRRHZSHfiKqZ5/yUzZr6oxWbiqKCErpVUr YhYA== X-Gm-Message-State: ALoCoQn3JtPKg72a72EZCq15QKte1SGgtrvTxGGTzVfzqilqqePZP2afboKd68YunF/HaK0g84vT X-Received: by 10.68.102.34 with SMTP id fl2mr83177389pbb.2.1395792640901; Tue, 25 Mar 2014 17:10:40 -0700 (PDT) Original-Received: from voltron.arsc.edu ([2607:f318:1f00:810:4261:86ff:fe2c:3e8d]) by mx.google.com with ESMTPSA id np9sm50189110pbc.31.2014.03.25.17.10.39 for (version=SSLv3 cipher=RC4-SHA bits=128/128); Tue, 25 Mar 2014 17:10:40 -0700 (PDT) In-Reply-To: <5331C7DB.4070907@arlsoft.com> X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.160.47 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:96761 Archived-At: On Tue, 25 Mar 2014 14:15:55 -0400 MBR 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 > mbr@arlsoft.com > > 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 thinking (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 gurus...?