From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alexander Shukaev Newsgroups: gmane.emacs.help Subject: Re: Update `minibuffer-line' on buffer switches Date: Sun, 28 Jun 2015 19:38:11 +0200 Message-ID: References: <87y4j517j4.fsf@web.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1435513116 6609 80.91.229.3 (28 Jun 2015 17:38:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 28 Jun 2015 17:38:36 +0000 (UTC) Cc: help-gnu-emacs To: Stefan Monnier Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jun 28 19:38:26 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 1Z9GXB-00008H-8s for geh-help-gnu-emacs@m.gmane.org; Sun, 28 Jun 2015 19:38:25 +0200 Original-Received: from localhost ([::1]:39547 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9GXA-0007oz-EG for geh-help-gnu-emacs@m.gmane.org; Sun, 28 Jun 2015 13:38:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47674) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9GWz-0007ou-Qa for help-gnu-emacs@gnu.org; Sun, 28 Jun 2015 13:38:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z9GWy-0002wq-Re for help-gnu-emacs@gnu.org; Sun, 28 Jun 2015 13:38:13 -0400 Original-Received: from mail-la0-x233.google.com ([2a00:1450:4010:c03::233]:33570) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9GWy-0002wX-Jq for help-gnu-emacs@gnu.org; Sun, 28 Jun 2015 13:38:12 -0400 Original-Received: by laar3 with SMTP id r3so40118311laa.0 for ; Sun, 28 Jun 2015 10:38:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=/MY+NGBUxqhNGEVOvfTtHHc93CsJurAHQjlG7OatgEk=; b=Yb9eFkV2vKJzYl/K+dur7O8oOEW8NFjGpiIV4yFD8dLDi2vOJ072xe1szrqrqo/rw4 fc9ozRpY2Xa8B+IUzs8QlS3YYErjCpSehyo+o8QIXecepXba1I7675lDQ/GN2svywy6n bpkqGsshNLKtppCzqbWPTfrBttudXgPtABnh9ng3s40Ke3YcW22v1gO45fjhO8c78aVB dvywOshgId5hj1DUS/pitKI0H5tdSNtEIelf/lKDTbgGDsrd57AAa2D5dMaEKs/mOaa5 V/XYz5IY/o8h/NRfQ2ogVuR/qCTbF0Sv0w9CgWe2f3VMMmBGTg8AQqNXZGOs1LlEStQq 1wMQ== X-Received: by 10.152.30.4 with SMTP id o4mr10256628lah.74.1435513091806; Sun, 28 Jun 2015 10:38:11 -0700 (PDT) Original-Received: by 10.112.36.103 with HTTP; Sun, 28 Jun 2015 10:38:11 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::233 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 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:105263 Archived-At: Looks like the correct solution is (add-function :after pre-redisplay-function #'(lambda (windows) (minibuffer-line--update))) Anyway, it would be nice to have some native support for such updates... Similar to mode line and frame title. The potential problem that I see is that this redisplay is called quite a lot, and I have not only path information in minibuffer line but also time information, and I assume that this time information is obtained via system calls, which are inherently very expensive. Furthermore, it would be nice to have hook(s) corresponding to buffer switching, e.g. tracking an event of entering (transferring focus) to another buffer. Wouldn't Emacs 25 benefit the flexibility offered by such hooks? What do you think Stefan? Regards, Alexander