all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Chris Seberino <cseberino@gmail.com>, help-gnu-emacs@gnu.org
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: Thu, 29 Jan 2015 20:19:58 -0800 (PST)	[thread overview]
Message-ID: <cb885bb0-0773-4d75-92a8-47d1e06dd979@default> (raw)
In-Reply-To: <90b92a22-d34c-4f7e-953e-74444f42e767@googlegroups.com>

> Is it easy/possible to change the prompt strings of various Emacs commands?
> 
> For example, what Emacs calls find-file I think of as "opening a file"
> and hence would like to change the prompt from "Find file:" to "open file:".
> 
> Are global changes like that possible/easy?  Perhaps it would require
> an Lisp style macro or something?

Generally speaking, no.  Typically, a general function that reads
input is called by a command, and it is passed a literal string as
the prompt to use.

Anything is possible, of course.  You can replace, for example, the
standard definition of `find-file-read-args' (which reads the file
name for `find-file' and similar commands), so that it uses your
preferred prompt.

But there is a reason that such functions take a PROMPT argument:
so that they can be called by different commands or in different
contexts, using different prompts.  For `find-file-read-args',
for example:

files.el:1433:   (find-file-read-args "Find file: "
files.el:1453:   (find-file-read-args "Find file in other window: "
files.el:1476:   (find-file-read-args "Find file in other frame: "
files.el:1490:   (interactive (nbutlast (find-file-read-args "Find existing file: " t)))
files.el:1513:   (find-file-read-args "Find file read-only: "
files.el:1522:   (find-file-read-args "Find file read-only other window: "
files.el:1531:   (find-file-read-args "Find file read-only other frame: "
menu-bar.el:206:	 (filename (car (find-file-read-args "Find file: " mustmatch))))
files.el:1433:   (find-file-read-args "Find file: "
files.el:1453:   (find-file-read-args "Find file in other window: "
files.el:1476:   (find-file-read-args "Find file in other frame: "
files.el:1490:   (interactive (nbutlast (find-file-read-args "Find existing file: " t)))
files.el:1513:   (find-file-read-args "Find file read-only: "
files.el:1522:   (find-file-read-args "Find file read-only other window: "
files.el:1531:   (find-file-read-args "Find file read-only other frame: "
menu-bar.el:206:	 (filename (car (find-file-read-args "Find file: " mustmatch))))

Alternatively, you could replace not the utility functions that read
input but the commands that call the utility functions.  In that case,
you would have even more to change. ;-)

In sum, don't bother to try.  Just learn to live with "Find file" etc.



  reply	other threads:[~2015-01-30  4:19 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-30  4:08 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
2015-01-30  4:19 ` Drew Adams [this message]
2015-01-30  5:03   ` Christian Seberino
2015-01-30  8:42     ` Michael Heerdegen
2015-01-30 16:19       ` [OT] " Harry Putnam
2015-01-30 16:33         ` Drew Adams
2015-02-05 20:57           ` Harry Putnam
2015-02-05 21:41             ` Michael Heerdegen
2015-02-06 14:35               ` Harry Putnam
2015-01-30 14:41     ` Drew Adams
2015-01-30 23:30       ` Christian Seberino
2015-01-31  0:31         ` Drew Adams
2015-01-31  0:35           ` Christian Seberino
2015-01-31  0:38             ` Christian Seberino
2015-02-01 13:55               ` Michael Heerdegen
2015-02-01 23:18                 ` Christian Seberino
2015-02-02 21:43                   ` Marcin Borkowski
2015-02-02 22:11                     ` Drew Adams
     [not found]                     ` <mailman.19192.1422915104.1147.help-gnu-emacs@gnu.org>
2015-02-03  3:31                       ` Rusi
     [not found]     ` <mailman.18960.1422607363.1147.help-gnu-emacs@gnu.org>
2015-01-30 23:58       ` Chris Seberino
2015-02-01 13:51         ` Michael Heerdegen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cb885bb0-0773-4d75-92a8-47d1e06dd979@default \
    --to=drew.adams@oracle.com \
    --cc=cseberino@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.