[Top][All Lists]

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

Re: Easy/Possible to globally change prompt strings of messages? e.g. ch

From: Christian Seberino
Subject: Re: Easy/Possible to globally change prompt strings of messages? e.g. changing find-file's prompt string from "Find file:" to "open file:" ?
Date: Fri, 30 Jan 2015 18:38:56 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

Here is how I configured my Tramp abbreviations in case the problem is there...

 '(("d"  "/")
   ("dr" "/|")
   ("w"  "/")
   ("wr" "/|")))

(add-hook 'minibuffer-setup-hook (lambda ()
                                  (abbrev-mode t)
(setq local-abbrev-table tramp-abbrev-table)))

(defadvice minibuffer-complete
           (before my-minibuffer-complete activate)

On 01/30/2015 06:35 PM, Christian Seberino wrote:
You may have seen my post regarding this...

(defun my-find-file-around-ad (origfun &rest args)
   (find-file-read-args "Open file: "
  (apply origfun args))

I don't know why that has the same issue of NOT removing the TAB properly
like find-file does.

Dunno why.

On 01/30/2015 06:31 PM, Drew Adams wrote:
But yes, you certainly can call `find-file-read-args' (or
`read-file-name') yourself, passing it any prompt you like. You will
get all of the usual TAB completion etc. - no problem.
Can I ask if the 2 functions you mentioned above would fix a minor
problem with this simple wrapper below?...
(defun my-find-file (name) (interactive "sopen file: ") (find-file name))
Yes.  `find-file-read-args' is made to order for `find-file' and
similar commands.  `read-file-name' is more general - it is called
by `find-file-read-args'.  These provide file-name completion.

You want to read a file name, not a string.


Christian Seberino, Ph.D
(936) 828-8747

reply via email to

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