From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help 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) Message-ID: References: <90b92a22-d34c-4f7e-953e-74444f42e767@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1422591621 21746 80.91.229.3 (30 Jan 2015 04:20:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 30 Jan 2015 04:20:21 +0000 (UTC) To: Chris Seberino , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jan 30 05:20:20 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YH347-0004Z9-9f for geh-help-gnu-emacs@m.gmane.org; Fri, 30 Jan 2015 05:20:19 +0100 Original-Received: from localhost ([::1]:34703 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YH346-00065M-9R for geh-help-gnu-emacs@m.gmane.org; Thu, 29 Jan 2015 23:20:18 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52281) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YH33u-00063q-UO for help-gnu-emacs@gnu.org; Thu, 29 Jan 2015 23:20:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YH33r-0001iY-NO for help-gnu-emacs@gnu.org; Thu, 29 Jan 2015 23:20:06 -0500 Original-Received: from userp1040.oracle.com ([156.151.31.81]:51030) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YH33r-0001hW-FS for help-gnu-emacs@gnu.org; Thu, 29 Jan 2015 23:20:03 -0500 Original-Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t0U4JxkD022448 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 30 Jan 2015 04:20:00 GMT Original-Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id t0U4Jwbq028477 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Fri, 30 Jan 2015 04:19:59 GMT Original-Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id t0U4JwR4028462; Fri, 30 Jan 2015 04:19:58 GMT In-Reply-To: <90b92a22-d34c-4f7e-953e-74444f42e767@googlegroups.com> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8.2 (807160) [OL 12.0.6691.5000 (x86)] X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:102378 Archived-At: > Is it easy/possible to change the prompt strings of various Emacs command= s? >=20 > 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= :". >=20 > 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:=09 (filename (car (find-file-read-args "Find file: " mustm= atch)))) 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:=09 (filename (car (find-file-read-args "Find file: " mustm= atch)))) 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.