From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Amos Bird Newsgroups: gmane.emacs.help Subject: Re: How can I force updating mini window's header line when mode line is updated? Date: Thu, 26 Apr 2018 01:12:38 +0800 Message-ID: <87h8nzqkft.fsf@gmail.com> References: <87in8fqx0a.fsf@gmail.com> <83po2nuv1c.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-Trace: blaine.gmane.org 1524676285 31816 195.159.176.226 (25 Apr 2018 17:11:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 25 Apr 2018 17:11:25 +0000 (UTC) User-Agent: mu4e 1.0-alpha3; emacs 27.0.50 Cc: help-gnu-emacs@gnu.org To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Apr 25 19:11:21 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fBNwt-0008A6-RQ for geh-help-gnu-emacs@m.gmane.org; Wed, 25 Apr 2018 19:11:19 +0200 Original-Received: from localhost ([::1]:38239 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fBNz0-000390-MP for geh-help-gnu-emacs@m.gmane.org; Wed, 25 Apr 2018 13:13:30 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60147) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fBNyO-00037w-9f for help-gnu-emacs@gnu.org; Wed, 25 Apr 2018 13:12:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fBNyN-0004d3-7M for help-gnu-emacs@gnu.org; Wed, 25 Apr 2018 13:12:52 -0400 Original-Received: from mail-pg0-x232.google.com ([2607:f8b0:400e:c05::232]:42070) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fBNyH-0004Yb-JD; Wed, 25 Apr 2018 13:12:45 -0400 Original-Received: by mail-pg0-x232.google.com with SMTP id e12so13775801pgn.9; Wed, 25 Apr 2018 10:12:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=BdIHxfzvzVY2QbFvYK39HYNuvWIAzxuvx0x+qRB8HJY=; b=czvahAHsTJ489Y0vUlR6h/Rn+3IF1zgdVNbMJhwLCPKsa6zi9wkDyPLI8lpA7p85F8 kWJIYfcdEcyl7/5/xiakzGdbP78TWhjeTkznUpwvU5rPATHaS76y3AGNGw4lXjkfojai yY8xzaYzO686Zr0/LjkKvRc/Frmmb8GoojQ6TKYEuQQ4Wei+IVhgX4UhOU7TBMAUnUpq qb0iJgDztCIlP2tFoOyd2iyMgskXoxHho6pRygVZh3RqKgHlixU9BEcFfwi5kdKW7p01 1JkqxvTF5PHgjT4thESnicvrkJYOLkSdDprlmlIqriqJ80KhYg9Gzs6CTfLwPSp7LiEE Kvug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=BdIHxfzvzVY2QbFvYK39HYNuvWIAzxuvx0x+qRB8HJY=; b=oVGyliK75cubQQ1JXCMMKrlpq6qrb4atKtY7uHuGiSPWMjPtXsS5Q6aCliUYWvPpJW YVL3UBIAvW8Gi8Uv/HIosoRmXYxOdcnZVcWrLtQLeoFgkjZD0fuEp9UncyOk5zku0xDi 8PV0ypURthcN6lUTzLOZ6/BGWqUe2z6pKtKgTh5iDHRLoR+FwmGyPWjb9BJybEf2TyQM IFHzLtT4d9tzRoVNIXqi2yaigHfMzZt9l6/XHcbOvml84QtIca7RSj5kn7P98mR8xV/T Ii58+xyW9xBh/51pfskbTnEByD+3xDZaDZnzspnjbbNHU3LvAZVPcPsWEL8EbhjjvHbB pWhg== X-Gm-Message-State: ALQs6tAMrDh4gaac+N2u1TzSz6sftQr76Tx/5BPMPpdFpvEAZbFOIRIe AcNRZG6oMB17LVqd106/XBtv/Q== X-Google-Smtp-Source: AIpwx49JLhgninqHzq+ea0dh097U+9JLrSQLNiNlvajA9aJqQdYnZJq805MNUCVLsJa6NlsSuTy2gw== X-Received: by 10.99.116.76 with SMTP id e12mr24243394pgn.270.1524676364388; Wed, 25 Apr 2018 10:12:44 -0700 (PDT) Original-Received: from localhost ([168.235.105.19]) by smtp.gmail.com with ESMTPSA id z23sm25281127pfe.110.2018.04.25.10.12.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 25 Apr 2018 10:12:43 -0700 (PDT) In-reply-to: <83po2nuv1c.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::232 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.help:116598 Archived-At: Thanks for the kind help. I've made some progress and I'll report it on emacs-devel :) Eli Zaretskii writes: >> From: Amos Bird >> Date: Wed, 25 Apr 2018 20:41:09 +0800 >> >> Dear community, >> >> I'm trying to setup one mode line per frame. Here is what I've >> done. >> >> 1. turn on the head line of mini window by tweaking >> window_wants_header_line. >> 2. change shrink_mini_window so that it shrinks mini window to >> two >> lines instead of one. >> 3. (setq-default header-line-format mode-line-format) > > It's great to hear someone hacks the display code to add > features. > However, these issues are best discussed on emacs-devel, not > here. > Who knows, we could even ask you to contribute the code ;-) > >> However the header line doesn't get updated at all. It seems >> xdisp.c only provides ways to update mode line, and I've >> reached >> the limit of my emacs-fu. How can I achieve this without >> hacking >> tons of the display logic? Many thanks! > > I think you need to modify window_wants_header_line, it > currently has > hard-wired knowledge that a minibuffer window will never display > a > header line. > > Once that is done, the feature should work, because the same > triggers > that update the mode line also update the header line, so this: > >> It seems xdisp.c only provides ways to update mode line > > is inaccurate. See the part of redisplay_window immediately > following > the 'done' label: it calls display_mode_lines, which displays > both the > mode line and the header line. -- Amos Bird amosbird@gmail.com