emacs-devel
[Top][All Lists]
Advanced

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

Re: proposition about bookmark-buffer-file-name in bookmark.el


From: Karl Fogel
Subject: Re: proposition about bookmark-buffer-file-name in bookmark.el
Date: Wed, 19 Nov 2008 02:37:08 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

"Toru TSUNEYOSHI" <address@hidden> writes:
> 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.

This sounds reasonable to me, but could you give examples of what the
new names would look like for those kinds of bookmarks?

(By the way, expressing the proposed change in 'patch' format is
probably the most precise way to communicate it.)

Thanks,
-Karl

> `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 via email to

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