|
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 |
(define-abbrev-table 'tramp-abbrev-table '(("d" "/ssh:cs@philfour.com:/home/cs/Ws") ("dr" "/ssh:cs@philfour.com|su:philfour.com:/home") ("w" "/ssh:cs@services.philfour.com:/home/webwork_custom") ("wr" "/ssh:cs@services.philfour.com|su:services.philfour.com:/home"))) (add-hook 'minibuffer-setup-hook (lambda () (abbrev-mode t)(setq local-abbrev-table tramp-abbrev-table)))
(defadvice minibuffer-complete (before my-minibuffer-complete activate) (expand-abbrev)) 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) (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.
-- ___________________________ Christian Seberino, Ph.D cseberino@gmail.com (936) 828-8747 ___________________________
[Prev in Thread] | Current Thread | [Next in Thread] |