unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Toru TSUNEYOSHI" <t_tuneyosi@hotmail.com>
To: <emacs-devel@gnu.org>
Subject: proposition about bookmark-buffer-file-name in bookmark.el
Date: Wed, 19 Nov 2008 13:27:44 +0900	[thread overview]
Message-ID: <BAY121-DAV11359788093CCA2840DCA0E20D0@phx.gbl> (raw)

Hello.

I have a proposition.
(I use GNU Emacs 22.3.1 (i386-msvc-nt5.0.2195).)

Now, `bookmark-buffer-file-name' in bookmark.el do
`abbreviate-file-name' buffer-file-name only.
So, I wish this function do `abbreviate-file-name' dired-directory (and
Info-current-file) on next version of Emacs.

`bookmark-buffer-file-name' in bookmark.el on Emacs 22.3.1:
========================================================================
(defun bookmark-buffer-file-name ()
  "Return the current buffer's file in a way useful for bookmarks.
For example, if this is a Info buffer, return the Info file's name."
  (cond
   ((eq major-mode 'Info-mode)
    Info-current-file)
   (buffer-file-name
    ;; Abbreviate the path, both so it's shorter and so it's more
    ;; portable.  E.g., the user's home dir might be a different
    ;; path on different machines, but "~/" will still reach it.
    (abbreviate-file-name buffer-file-name))
   ((and (boundp 'dired-directory) dired-directory)
    (if (stringp dired-directory)
        dired-directory
      (car dired-directory)))))
========================================================================





             reply	other threads:[~2008-11-19  4:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-19  4:27 Toru TSUNEYOSHI [this message]
2008-11-19  7:37 ` proposition about bookmark-buffer-file-name in bookmark.el Karl Fogel
2008-11-19 12:32   ` Toru TSUNEYOSHI
2008-11-19 18:21     ` Karl Fogel
2008-11-20  2:15       ` Toru TSUNEYOSHI
2008-11-20 14:28         ` Stefan Monnier
2008-11-21 18:32         ` Karl Fogel
2008-11-22  3:15           ` Toru TSUNEYOSHI
2008-11-21 19:07 ` Stefan Monnier

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BAY121-DAV11359788093CCA2840DCA0E20D0@phx.gbl \
    --to=t_tuneyosi@hotmail.com \
    --cc=emacs-devel@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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).