[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: |
Chris 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 15:58:40 -0800 (PST) |
User-agent: |
G2/1.0 |
Michael
I tried using the function below....the advice-add part gave an error..
function definition is void: advice-add
(Emacs ver 24.3)
When I removed the advice-add part it seems to work!! i.e. this works...
(defun my-find-file-around-ad (origfun &rest args)
(interactive
(find-file-read-args "Open file: "
(confirm-nonexistent-file-or-buffer)))
(apply origfun args))
The only problem is when I use TAB completion to replace abbreviations,
it appends the TAB to the end instead of *replacing it*....find-file
does it right and I was hoping using find-file-read-args would work right
too but it didn't. Do you know why TAB remains unlike with find-file?
On Friday, January 30, 2015 at 2:42:46 AM UTC-6, Michael Heerdegen wrote:
> Christian Seberino <cseberino@gmail.com> writes:
>
> > Perhaps it would be feasible/easier to somehow add all those wonderful
> > features (TAB completion and abbreviations)
> > to my own wrapper functions? How hard is *that* by comparision?
>
> Actually it is not hard, at least for this specific case and in Emacs >=
> 24 (didn't check older Emacsen):
>
> --8<---------------cut here---------------start------------->8---
> (defun my-find-file-around-ad (origfun &rest args)
> (interactive
> (find-file-read-args "Open file: "
> (confirm-nonexistent-file-or-buffer)))
> (apply origfun args))
>
> (advice-add 'find-file :around #'my-find-file-around-ad)
> --8<---------------cut here---------------end--------------->8---
>
> But I think in the long term it's better to get used to the Emacs
> nomenclature.
>
>
> Michael.
- RE: Easy/Possible to globally change prompt strings of messages? e.g. changing find-file's prompt string from "Find file:" to "open file:" ?, (continued)
- RE: Easy/Possible to globally change prompt strings of messages? e.g. changing find-file's prompt string from "Find file:" to "open file:" ?, Drew Adams, 2015/01/29
- RE: Easy/Possible to globally change prompt strings of messages? e.g. changing find-file's prompt string from "Find file:" to "open file:" ?, Drew Adams, 2015/01/30
- Re: Easy/Possible to globally change prompt strings of messages? e.g. changing find-file's prompt string from "Find file:" to "open file:" ?, Christian Seberino, 2015/01/30
- RE: Easy/Possible to globally change prompt strings of messages? e.g. changing find-file's prompt string from "Find file:" to "open file:" ?, Drew Adams, 2015/01/30
- Re: Easy/Possible to globally change prompt strings of messages? e.g. changing find-file's prompt string from "Find file:" to "open file:" ?, Christian Seberino, 2015/01/30
- Re: Easy/Possible to globally change prompt strings of messages? e.g. changing find-file's prompt string from "Find file:" to "open file:" ?, Christian Seberino, 2015/01/30
- Message not available
- Re: Easy/Possible to globally change prompt strings of messages? e.g. changing find-file's prompt string from "Find file:" to "open file:" ?,
Chris Seberino <=