From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: dynamic prompt Date: Sun, 06 May 2012 10:56:45 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1336316416 28234 80.91.229.3 (6 May 2012 15:00:16 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 6 May 2012 15:00:16 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun May 06 17:00:16 2012 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 1SR2wZ-0003Kt-68 for geh-help-gnu-emacs@m.gmane.org; Sun, 06 May 2012 17:00:15 +0200 Original-Received: from localhost ([::1]:49475 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SR2wY-0004Cf-Hq for geh-help-gnu-emacs@m.gmane.org; Sun, 06 May 2012 11:00:14 -0400 Original-Path: usenet.stanford.edu!postnews.google.com!news2.google.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!newsfe09.iad.POSTED!00000000!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) Cancel-Lock: sha1:ztV+1kqY+GNPMMyYisWbLkNdN5M= Original-Lines: 21 Original-X-Complaints-To: abuse@UsenetServer.com Original-NNTP-Posting-Date: Sun, 06 May 2012 14:56:46 UTC X-Received-Bytes: 1627 Original-Xref: usenet.stanford.edu gnu.emacs.help:192328 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:84736 Archived-At: >> > I'd like to have a prompt that shows the number of characters entered >> > in the response >> > Prompt (3): bla >> > Prompt (7): bla bla >> > Is that in any way possible? >> Of course: the prompt is normal text present in the (mini)buffer, which >> itself is a perfectly normal buffer (tho displayed in a special >> (mini)window) and you can edit it like any other buffer text. > I suspect he wants the character count to be updated automatically. Of course. But that can use any of the standard hooks for that: post-command-hook or after-change-functions. > Seems like he needs to enable a hook when he goes into the mini-buffer, > that modifies the prompt after each command. minibuffer-setup-hook should do the trick, or minibuffer-with-setup-hook depending on whether he wants it in one particular case or in all cases. Stefan