all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: miniaturising the file name displayed.
Date: Tue, 06 Jul 2004 11:51:56 -0600	[thread overview]
Message-ID: <40EAE6BC.1040103@yahoo.com> (raw)
In-Reply-To: k21xjs61ar.fsf@vayu.cs.iitm.ernet.in

Abi wrote:
 > yup, but i'd like to see ~/../../usr/etc/ when i access other files as
 > well.
 > or more preferable, the absolute path, or the path relative to my home
 > directory or the one from my CWD, whichever is shorter. I know this is
 > too much in the asking, but then if there is some elisp code to do
 > this, i'd be glad to add it to my .emacs.

In emacs, your current working directory is different for every buffer
(default-directory is a buffer local variable), so every path is
relative to the default directory.  If you don't want the directory
included in the minibuffer, set insert-default-directory to nil.

But here's an attempt to always prompt you with a path relative to your
home directory:

(defadvice find-file (before read-relative-file-name activate)
   ;; -literally, -other-window, -other-frame,
   ;; -read-only, -read-only-other-window, -read-only-other-frame
   "Always read FILENAME relative to ~."
   (interactive (list (read-file-name "Find file: "
				     (file-relative-name default-directory "~"))
		     (prefix-numeric-value current-prefix-arg))))

-- 
Kevin Rodgers

      reply	other threads:[~2004-07-06 17:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-28 14:59 miniaturising the file name displayed Abi
2004-06-30 13:34 ` Kai Grossjohann
2004-07-01 18:46 ` Kevin Rodgers
2004-07-04  0:53   ` Abi
2004-07-06 17:51     ` Kevin Rodgers [this message]

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=40EAE6BC.1040103@yahoo.com \
    --to=ihs_4664@yahoo.com \
    /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.