From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: Fontification of the interactive prompt string? Date: Sat, 06 Jun 2015 00:12:45 +0200 Message-ID: <87k2vhby8y.fsf@gnu.org> References: <87vbf17rtx.fsf@mbork.pl> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1433542417 17920 80.91.229.3 (5 Jun 2015 22:13:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 5 Jun 2015 22:13:37 +0000 (UTC) Cc: Help Gnu Emacs mailing list To: Marcin Borkowski Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jun 06 00:13:27 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 1Z0zrP-0002se-Pn for geh-help-gnu-emacs@m.gmane.org; Sat, 06 Jun 2015 00:13:07 +0200 Original-Received: from localhost ([::1]:49854 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0zrO-0001Fy-Ha for geh-help-gnu-emacs@m.gmane.org; Fri, 05 Jun 2015 18:13:06 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57789) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0zrA-0001Fs-2s for help-gnu-emacs@gnu.org; Fri, 05 Jun 2015 18:12:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z0zr7-0007DY-5N for help-gnu-emacs@gnu.org; Fri, 05 Jun 2015 18:12:52 -0400 Original-Received: from out4-smtp.messagingengine.com ([66.111.4.28]:50115) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0zr6-0007DT-UJ for help-gnu-emacs@gnu.org; Fri, 05 Jun 2015 18:12:49 -0400 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 5B58121AD2 for ; Fri, 5 Jun 2015 18:12:48 -0400 (EDT) Original-Received: from frontend1 ([10.202.2.160]) by compute4.internal (MEProxy); Fri, 05 Jun 2015 18:12:48 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=3ecWyakD6/9qUPX cu/Fbs94PMOQ=; b=jNAUdXeGOBSfR7HO+WjZ13PzoDgpIAQN+OWU7BbvU8wL4yE gDcuf9alohnjAXTsyJXzCdIc0nw1dzwiVvNWm3ufIFT70Yo5A++88uUZ6Lebm05K qUuBL0c0gBn0tsKIsHQKUAnmiz6lGDtYtKcK9bRGhUoGAX6ykjpm0DttY3jc= X-Sasl-enc: nnElM/tdRCIuT/BsXtHOhTBO5oNW+/TzwzmrUXERubEu 1433542367 Original-Received: from thinkpad-t440p (unknown [2.161.21.19]) by mail.messagingengine.com (Postfix) with ESMTPA id B11B1C00021; Fri, 5 Jun 2015 18:12:47 -0400 (EDT) Mail-Followup-To: Marcin Borkowski , Help Gnu Emacs mailing list In-Reply-To: <87vbf17rtx.fsf@mbork.pl> (Marcin Borkowski's message of "Fri, 05 Jun 2015 23:44:58 +0200") User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 66.111.4.28 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:104784 Archived-At: Marcin Borkowski writes: Hi Marcin, > I have an (interactive "cprompt\n") call, and I'd like the prompt to > list possible characters (they define a few options for my function, > and I have good reasons to implement it this way and not with C-u > etc.) I'd like to have the relevant characters highlighted, like in: > > "file: _n_ew, _o_pen, _c_lose" > > where the underscores mean that something is e.g. in a different > color. > > Is it possible? The `interactive' argument may also be a form which reads the arguments as it sees fit. ,----[ (info "(elisp)Using Interactive") ] | =E2=80=A2 It may be a Lisp expression that is not a string; then it sh= ould be | a form that is evaluated to get a list of arguments to pass to the | command. Usually this form will call various functions to read | input from the user, most often through the minibuffer (*note | Minibuffers::) or directly from the keyboard (*note Reading | Input::). `---- > Bonus points if instead of colors the relevant letter might be > e.g. put in brackets on terminals not supporting colors. I don't know but I would refrain from trying to test terminal capabilities from elisp and then act differently. Bye, Tassilo