unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Re: recentf: abbreviate paths? tilde for home folder?
       [not found] <mailman.2231.1122900523.20277.help-gnu-emacs@gnu.org>
@ 2005-08-01 14:18 ` Reiner Steib
       [not found]   ` <v93bptd9lz.fsf-WZbs9ZYJ0ya4nSHvGpykACzlmkwuQ7VwhC4ANOJQIlc@public.gmane.org>
                     ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Reiner Steib @ 2005-08-01 14:18 UTC (permalink / raw)


On Mon, Aug 01 2005, David Reitter wrote:

> How can I get recentf to show abbreviated paths in the "Open Recent"
> menu?  That is, show paths just like in buffer names, where path
> names are shown only where necessary in order to distinguish between
> existing buffers.

[ In Emacs 22 (CVS)...]

(setq recentf-menu-filter 'recentf-show-basenames) or
`M-x customize-variable RET recentf-menu-filter RET'

> At least, I'd like to be able to replace my home folder with a tilde  where
> possible.

(defun rs-recentf-filename-handler (name)
  (replace-regexp-in-string (concat "\\`" (expand-file-name "~")) "~" name))
(setq recentf-filename-handler 'rs-recentf-filename-handler)

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

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

* Making recentf-menu-filter a list (was: recentf: abbreviate paths? tilde for home folder?)
       [not found]   ` <v93bptd9lz.fsf-WZbs9ZYJ0ya4nSHvGpykACzlmkwuQ7VwhC4ANOJQIlc@public.gmane.org>
@ 2005-08-01 14:53     ` Jochen Küpper
  0 siblings, 0 replies; 6+ messages in thread
From: Jochen Küpper @ 2005-08-01 14:53 UTC (permalink / raw)


Reiner Steib <reinersteib+from-uce-ZTO5kqT2PaM@public.gmane.org> writes:

> (setq recentf-menu-filter 'recentf-show-basenames) or
> `M-x customize-variable RET recentf-menu-filter RET'

Could recentf-menu-filter be change into list of filter functions, so
that one could write the following, for example?
,----
| (setq recentf-menu-filter '(recentf-show-basenames recentf-arrange-by-mode))
`----

Greetings,
Jochen
-- 
Einigkeit und Recht und Freiheit                http://www.Jochen-Kuepper.de
    Liberté, Égalité, Fraternité                GnuPG key: CC1B0B4D
        (Part 3 you find in my messages before fall 2003.)

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

* Re: recentf: abbreviate paths? tilde for home folder?
  2005-08-01 14:18 ` recentf: abbreviate paths? tilde for home folder? Reiner Steib
       [not found]   ` <v93bptd9lz.fsf-WZbs9ZYJ0ya4nSHvGpykACzlmkwuQ7VwhC4ANOJQIlc@public.gmane.org>
@ 2005-08-02 17:25   ` Kevin Rodgers
       [not found]   ` <mailman.2244.1122908513.20277.help-gnu-emacs@gnu.org>
       [not found]   ` <mailman.2353.1123004606.20277.help-gnu-emacs@gnu.org>
  3 siblings, 0 replies; 6+ messages in thread
From: Kevin Rodgers @ 2005-08-02 17:25 UTC (permalink / raw)


Reiner Steib wrote:
 > On Mon, Aug 01 2005, David Reitter wrote:
 >>At least, I'd like to be able to replace my home folder with a tilde 
  where
 >>possible.
 >
 > (defun rs-recentf-filename-handler (name)
 >   (replace-regexp-in-string (concat "\\`" (expand-file-name "~")) "~" 
name))
 > (setq recentf-filename-handler 'rs-recentf-filename-handler)

Why not just (setq recentf-filename-handler 'abbreviate-file-name)

-- 
Kevin Rodgers

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

* Re: Making recentf-menu-filter a list
       [not found]   ` <mailman.2244.1122908513.20277.help-gnu-emacs@gnu.org>
@ 2005-08-02 18:14     ` Reiner Steib
  2005-08-04 18:00       ` Kevin Rodgers
  0 siblings, 1 reply; 6+ messages in thread
From: Reiner Steib @ 2005-08-02 18:14 UTC (permalink / raw)


On Mon, Aug 01 2005, Jochen Küpper wrote:

> Reiner Steib <reinersteib+from-uce@imap.cc> writes:
>
>> (setq recentf-menu-filter 'recentf-show-basenames) or
>> `M-x customize-variable RET recentf-menu-filter RET'
>
> Could recentf-menu-filter be change into list of filter functions, so
> that one could write the following, for example?
> ,----
> | (setq recentf-menu-filter '(recentf-show-basenames recentf-arrange-by-mode))
> `----

Probably, just a small matter of programming I'd guess. :-)
Maybe the sorting an displaying should be decoupled.

IMHO `recentf-arrange-rules' should have more entries e.g. like
`msb-mode' (see `msb--few-menus' or `msb--very-many-menus').  Maybe
these lists or `auto-mode-alist' could be used in `recentf.el'.  (The
problem is that msb checks the mode of buffers whereas recentf has to
rely on the filename.)

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

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

* Re: recentf: abbreviate paths? tilde for home folder?
       [not found]   ` <mailman.2353.1123004606.20277.help-gnu-emacs@gnu.org>
@ 2005-08-02 18:47     ` Reiner Steib
  0 siblings, 0 replies; 6+ messages in thread
From: Reiner Steib @ 2005-08-02 18:47 UTC (permalink / raw)


On Tue, Aug 02 2005, Kevin Rodgers wrote:

> Reiner Steib wrote:
[...]
>  > (defun rs-recentf-filename-handler (name)
>  >   (replace-regexp-in-string (concat "\\`" (expand-file-name "~")) "~"
>      name))
>  > (setq recentf-filename-handler 'rs-recentf-filename-handler)
>
> Why not just (setq recentf-filename-handler 'abbreviate-file-name)

Thanks for pointing this out.  I think `abbreviate-file-name' should
be added as a choice in the defcustom of `recentf-filename-handler'.

[ BTW: Emacs 21 doesn't offer `recentf-filename-handler' so it might
  not be useful for David. ]

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

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

* Re: Making recentf-menu-filter a list
  2005-08-02 18:14     ` Making recentf-menu-filter a list Reiner Steib
@ 2005-08-04 18:00       ` Kevin Rodgers
  0 siblings, 0 replies; 6+ messages in thread
From: Kevin Rodgers @ 2005-08-04 18:00 UTC (permalink / raw)


Reiner Steib wrote:
 > On Mon, Aug 01 2005, Jochen Küpper wrote:
 >>Could recentf-menu-filter be change into list of filter functions, so
 >>that one could write the following, for example?
 >>,----
 >>| (setq recentf-menu-filter '(recentf-show-basenames 
recentf-arrange-by-mode))
 >>`----
 >
 > Probably, just a small matter of programming I'd guess. :-)
 > Maybe the sorting an displaying should be decoupled.

How about:

(setq recentf-menu-filter
       (lambda (menu-elements)
         (recentf-show-basenames (recentf-arrange-by-mode menu-elements))))

-- 
Kevin Rodgers

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

end of thread, other threads:[~2005-08-04 18:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.2231.1122900523.20277.help-gnu-emacs@gnu.org>
2005-08-01 14:18 ` recentf: abbreviate paths? tilde for home folder? Reiner Steib
     [not found]   ` <v93bptd9lz.fsf-WZbs9ZYJ0ya4nSHvGpykACzlmkwuQ7VwhC4ANOJQIlc@public.gmane.org>
2005-08-01 14:53     ` Making recentf-menu-filter a list (was: recentf: abbreviate paths? tilde for home folder?) Jochen Küpper
2005-08-02 17:25   ` recentf: abbreviate paths? tilde for home folder? Kevin Rodgers
     [not found]   ` <mailman.2244.1122908513.20277.help-gnu-emacs@gnu.org>
2005-08-02 18:14     ` Making recentf-menu-filter a list Reiner Steib
2005-08-04 18:00       ` Kevin Rodgers
     [not found]   ` <mailman.2353.1123004606.20277.help-gnu-emacs@gnu.org>
2005-08-02 18:47     ` recentf: abbreviate paths? tilde for home folder? Reiner Steib

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