From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Manuel Giraud Newsgroups: gmane.emacs.devel Subject: Re: Keep global-mode-string on its own "modeline"? Date: Sun, 30 Oct 2022 09:01:21 +0100 Message-ID: <87mt9d68q6.fsf@elite.giraud> References: <87czabzmuk.fsf@gmail.com> <87czaa389d.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30769"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Thuna , emacs-devel@gnu.org To: Visuwesh Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Oct 30 09:02:26 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1op3H0-0007nG-Df for ged-emacs-devel@m.gmane-mx.org; Sun, 30 Oct 2022 09:02:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1op3GF-0007ni-9Z; Sun, 30 Oct 2022 04:01:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1op3G6-0007n0-EW for emacs-devel@gnu.org; Sun, 30 Oct 2022 04:01:31 -0400 Original-Received: from ledu-giraud.fr ([51.159.28.247]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1op3G4-0005bH-8K for emacs-devel@gnu.org; Sun, 30 Oct 2022 04:01:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=M8LMrIhwboTa0KKK TvYwQn9taeTN/niTy+ju23lR3Sw=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=nFHtdg+uK+Clz3biocrP8W1gHAq75V3W3ch5AC /mLn0hY2bFwtLZ1g4M+fhASIkR7lXrxyu8yCLFUGhaLxI3xMPTm7U1T9GwzO1S8YhBh3cE GV9OM0JPk1R4HGZ8s6VkCqEPMvrXCARbVE9Z8x2Yk8XfMZwjOPOqB3MxXAhUwPfWm2ey+m Nnno6w6s2pTRT1AIbIo2wTCXXrcUNq8R3KF4rflU+VHnL34VthJgn742AmwoCFShcluwwn sUdCxzqUDQHGRSUfg2VPTF9xgjK2i3Cc7wEsuVY6AT8WKX2c/KZihhoxkyfnuzJJK6DoMb QJVIlrjAJJ48Ea/pAWBixAtA== Original-Received: from elite.giraud ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 9045925d (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sun, 30 Oct 2022 09:01:22 +0100 (CET) In-Reply-To: <87czaa389d.fsf@gmail.com> (Visuwesh's message of "Sat, 29 Oct 2022 21:57:26 +0530") Received-SPF: pass client-ip=51.159.28.247; envelope-from=manuel@ledu-giraud.fr; helo=ledu-giraud.fr X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: "Emacs-devel" Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:298795 Archived-At: Visuwesh writes: > [=E0=AE=B5=E0=AF=86=E0=AE=B3=E0=AF=8D=E0=AE=B3=E0=AE=BF =E0=AE=85=E0=AE= =95=E0=AF=8D=E0=AE=9F=E0=AF=8B=E0=AE=AA=E0=AE=B0=E0=AF=8D 28, 2022] Thuna w= rote: > >> There is no good reason for `global-mode-string' to be displayed in >> every single window's modeline separately, it takes a lot of space, and >> it usually ends up not completely showing when the window is split more >> than once. Would it not be better to keep it in a different location? >> It makes sense (to me) to have it at the top of each Emacs frame, >> although I'm open to suggestions. > > At some point in my Emacs life, I put the global-mode-string stuff in > the bottom right window only using an :eval construct. I don't have it > anymore but looking at the logs, it looks I used something like > > (:eval (and (window-at-side-p nil 'right) (window-at-side-p nil 'bott= om) > stuff...)) Yes I'm currently using this too: --8<---------------cut here---------------start------------->8--- (defun display-time-bottom-right () (when (equal (cddr (window-pixel-edges)) (cddr (window-pixel-edges (frame-root-window)))) (let ((len (+ (length battery-mode-line-string) (length display-time-string) 2)) (blank " ")) (put-text-property 0 1 'display `(space :align-to (- right ,len)) bla= nk) `(,blank battery-mode-line-string display-time-string)))) (setq global-mode-string '(:eval (display-time-bottom-right))) --8<---------------cut here---------------end--------------->8--- --=20 Manuel Giraud