From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Heime Newsgroups: gmane.emacs.help Subject: Changes to mode-line-format for non-truncated buffer identification Date: Tue, 23 Jul 2024 19:09:45 +0000 Message-ID: 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="4840"; mail-complaints-to="usenet@ciao.gmane.io" To: Heime via Users list for the GNU Emacs text editor Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 23 21:10:34 2024 Return-path: Envelope-to: geh-help-gnu-emacs@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 1sWKuA-000192-GY for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 23 Jul 2024 21:10:34 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sWKtu-0000NR-Ku; Tue, 23 Jul 2024 15:10:18 -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 1sWKtp-0000N2-UX for help-gnu-emacs@gnu.org; Tue, 23 Jul 2024 15:10:14 -0400 Original-Received: from mail-43166.protonmail.ch ([185.70.43.166]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sWKtn-0003zb-IB for help-gnu-emacs@gnu.org; Tue, 23 Jul 2024 15:10:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1721761807; x=1722021007; bh=3rFAQ/eScZEJVpzQccBm6OYsAU7QiMIzgS9w+T2g45I=; h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=k85HXVQ6cbZLBOOPGyqJNjIa/EWcZ3Rjv7IfF+ur8vWRrWBqTbOI6LPkgb8iOmyY8 v72z1GZvb533SI+RUEiEwzWUK+E/lUJexzjrv9QSlqzHVG7nXOuca6cVUnB2Pjncks IZdmCbv2fewfa3bvyFlzdyRKHNMP2qcgaljK0QFnHO+Vz/2W0RIczsHuKuIFj1zjkV kwrCYP1o/X6x0v6X7tah6tCPptfWR7zRlxGV2g1rTYiwAeWUgj+/54w7YSBL1uv/6s xytkDsobGJNLLL6NOx3XH5/47mokzXsOOfIlr4fvdPd6aaX7rBQ5i1zkFaZ0JP8jlB 01PG6ThWz/bKg== Feedback-ID: 57735886:user:proton X-Pm-Message-ID: 53b9be3b209fd6aa60cace10e90bfb69e5f93bfc Received-SPF: pass client-ip=185.70.43.166; envelope-from=heimeborgia@protonmail.com; helo=mail-43166.protonmail.ch X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:147323 Archived-At: I want to change the modeline so that the buffer identification=20 is not truncated. Have copied the text properties from position=20 0, and set 'local-map . Finally changing mode-line-format. I am doing things correctly this way, or does the code require changes? (defun vodil-buffer-name () (format " %s " (buffer-name))) (defun vodil-face () (if (mode-line-window-selected-p) 'vodil-active-facespk 'vodil-inaktv-facespk)) (defface vodil-mouse-facespk `((t :background ,vodil-white :foreground ,vodil-orange-red))) (defun vodil-bfgestion () (format-mode-line mode-line-buffer-identification)) (defun vodil-properties () (text-properties-at 0 (vodil-bfgestion))) (defvar-local vodil-panel '(:eval (let ((propiets (vodil-properties))) (apply 'propertize (vodil-buffer-name) (append propiets (list 'face (vodil-face) 'mouse-face 'vodil-mouse-facespk 'local-map (get-text-property 0 'local-map (vodil-bfgestion)))))))) (setq-default mode-line-format '( "%e" vodil-panel))