From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Christian Seberino 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: Fri, 30 Jan 2015 18:35:44 -0600 Message-ID: <54CC2360.20102@gmail.com> References: <90b92a22-d34c-4f7e-953e-74444f42e767@googlegroups.com> <54CB109E.1030802@gmail.com> <54CC1410.1050408@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1422664566 19061 80.91.229.3 (31 Jan 2015 00:36:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 31 Jan 2015 00:36:06 +0000 (UTC) To: Drew Adams , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jan 31 01:36:06 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 1YHM2e-0003mh-Sw for geh-help-gnu-emacs@m.gmane.org; Sat, 31 Jan 2015 01:36:05 +0100 Original-Received: from localhost ([::1]:39256 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHM2e-0005vl-5E for geh-help-gnu-emacs@m.gmane.org; Fri, 30 Jan 2015 19:36:04 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39074) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHM2S-0005vg-BM for help-gnu-emacs@gnu.org; Fri, 30 Jan 2015 19:35:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YHM2N-00006D-Cs for help-gnu-emacs@gnu.org; Fri, 30 Jan 2015 19:35:52 -0500 Original-Received: from mail-oi0-x231.google.com ([2607:f8b0:4003:c06::231]:54913) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHM2N-000069-8U for help-gnu-emacs@gnu.org; Fri, 30 Jan 2015 19:35:47 -0500 Original-Received: by mail-oi0-f49.google.com with SMTP id a3so37139747oib.8 for ; Fri, 30 Jan 2015 16:35:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=uyrDM/yYJYsbvctwjYCWdrRGSHC4swBjkyE9LTv/UPk=; b=QBELAeoGrGEPe3UGt1jy5XxsOXSLlAJ+/e3lFKykPS+1Ifl5I9VrmQH0uhyXtceHjB rEjUFOtMfHfG/ZxSq4P6IYz6LBxu87CuQ31l0RKN3DzOuiSv+nvyEbn9fRZiA1SNQE+h cYKBrnhPqoE6UIuHPqORTEyOU4pqeBlkkChCjZb7AXtv49Autl7stu9WRZcjz1jtiYZN 07gKA9VfQL/gfBFQTBBCK1Fn0dWvCh53cj/M+W8idPzLCH7XQlPC92GcuRh5gkaTXzrX kT6VDZ7jcpYY6q+eCAGOQ5mi8OaW4cQDcpbtKSj5NHZy2ok3eyerVf2YfJ+zcTiA/Piq Y1Iw== X-Received: by 10.202.111.131 with SMTP id v3mr5010504oik.133.1422664546788; Fri, 30 Jan 2015 16:35:46 -0800 (PST) Original-Received: from [192.168.1.104] (r74-193-13-167.cnrocmta01.conrtx.tl.dh.suddenlink.net. [74.193.13.167]) by mx.google.com with ESMTPSA id d6sm6108173obh.4.2015.01.30.16.35.45 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Jan 2015 16:35:45 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c06::231 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:102390 Archived-At: 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.