unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* proposition about bookmark-buffer-file-name in bookmark.el
@ 2008-11-19  4:27 Toru TSUNEYOSHI
  2008-11-19  7:37 ` Karl Fogel
  2008-11-21 19:07 ` Stefan Monnier
  0 siblings, 2 replies; 9+ messages in thread
From: Toru TSUNEYOSHI @ 2008-11-19  4:27 UTC (permalink / raw)
  To: emacs-devel

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)))))
========================================================================





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-11-22  3:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-19  4:27 proposition about bookmark-buffer-file-name in bookmark.el Toru TSUNEYOSHI
2008-11-19  7:37 ` 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

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).