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

[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:35:44 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

You may have seen my post regarding this...

(defun my-find-file-around-ad (origfun &rest args)
  (interactive
   (find-file-read-args "Open file: "
                        (confirm-nonexistent-file-or-buffer)))
  (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.

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




reply via email to

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