bug-gnu-emacs
[Top][All Lists]
Advanced

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

Re: make ffap wildcard-friendly


From: Benjamin Rutt
Subject: Re: make ffap wildcard-friendly
Date: Fri, 18 Mar 2005 10:30:50 -0500
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux)

I realize that a related change has now been checked into Emacs CVS.
A related lisp/Changelog entry from 2004-12-12 Juri Linkov <address@hidden>:

    (find-file-at-point): When filename matches ffap-dired-wildcards, call
     ffap-file-finder with t arg `wildcards', instead of dired.

I find that this change interrupts my workflow, as I'm so used to
doing e.g. C-x C-f /tmp/log.* RET etc, to get a nice dired listing of
files, and then I can choose one.  Would you consider making the new
behavior an option which is enabled by default which I can then
disable, to preserve my normal workflow?  How about the following
patch.  Let me know you think.  

Thanks,
Benjamin Rutt

*** ffap.el.orig        Fri Mar 18 09:59:28 2005
--- ffap.el             Fri Mar 18 10:28:48 2005
***************
*** 217,226 ****
    "*A regexp matching filename wildcard characters, or nil.
  
  If `find-file-at-point' gets a filename matching this pattern,
! it passes it on to `find-file' with non-nil WILDCARDS argument,
! which expands wildcards and visits multiple files.  To visit
! a file whose name contains wildcard characters you can suppress
! wildcard expansion by setting `find-file-wildcards'.
  
  If `dired-at-point' gets a filename matching this pattern,
  it passes it on to `dired'."
--- 217,230 ----
    "*A regexp matching filename wildcard characters, or nil.
  
  If `find-file-at-point' gets a filename matching this pattern,
! and `ffap-always-pass-wildcards-to-dired' is nil, it passes it on
! to `find-file' with non-nil WILDCARDS argument, which expands
! wildcards and visits multiple files.  To visit a file whose name
! contains wildcard characters you can suppress wildcard expansion
! by setting `find-file-wildcards'.  If `find-file-at-point' gets a
! filename matching this pattern and
! `ffap-always-pass-wildcards-to-dired' is non-nil, it passes it on
! to `dired'.
  
  If `dired-at-point' gets a filename matching this pattern,
  it passes it on to `dired'."
***************
*** 230,235 ****
--- 234,245 ----
             )
    :group 'ffap)
  
+ (defcustom ffap-always-pass-wildcards-to-dired nil
+   "*If non-nil, than always pass filenames matching
+   `ffap-dired-wildcards' to dired."
+   :type 'boolean  
+   :group 'ffap)
+ 
  (defcustom ffap-newfile-prompt nil
    ;; Suggestion from RHOGEE, 11 Jul 1994.  Disabled, I think this is
    ;; better handled by `find-file-not-found-hooks'.
***************
*** 1388,1393 ****
--- 1398,1407 ----
    (funcall ffap-url-fetcher filename)))
       ((and ffap-dired-wildcards
          (string-match ffap-dired-wildcards filename)
+            ffap-always-pass-wildcards-to-dired)
+       (dired filename))
+      ((and ffap-dired-wildcards
+         (string-match ffap-dired-wildcards filename)
             find-file-wildcards
                ;; Check if it's find-file that supports wildcards arg
                   (memq ffap-file-finder '(find-file
  find-alternate-file)))




reply via email to

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