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: Re: backquote upon variable for :eval Date: Sun, 28 Jul 2024 20:44:10 +0000 Message-ID: References: <87wml5i7sn.fsf@ledu-giraud.fr> 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="8757"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Heime via Users list for the GNU Emacs text editor To: Manuel Giraud Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 28 22:45:01 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 1sYAlJ-000273-B3 for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 28 Jul 2024 22:45:01 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYAki-0000ai-9L; Sun, 28 Jul 2024 16:44:24 -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 1sYAkg-0000aV-R9 for help-gnu-emacs@gnu.org; Sun, 28 Jul 2024 16:44:22 -0400 Original-Received: from mail-40141.protonmail.ch ([185.70.40.141]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sYAke-0001wI-JC for help-gnu-emacs@gnu.org; Sun, 28 Jul 2024 16:44:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1722199456; x=1722458656; bh=JUPQxTMBvz5FuM8l4fDLYU7epQomIKv1n+OPrgJWkEo=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=aPG/OfnVDm33bs4aZPfitovwkti8SFDUFtXoJxM6Q+P9SuKpfVOCKE/RZgqTgf+X0 DJ5+jZhJF3TrCU8rH4F19O7p5yQLL7/9nJASM2UVgdubBKpq3Bkr+WlC2NIXppvZws f8Lvb7Cp8WSTvxcaqhIzmsCbOVKGN9RKmNke0EYEg3lnDvYA2BINXia1SOwKSejF4l l6EvfKzY1Sb9IKQqpBtXGgAGN7+20Lz/cJj3ulUFGQuoPM89CAk2pU3kH4EVbhlNSb Wty3s9oSaGpaQq0aXVYutZyG+RdJwxSsEJEx8qhYBSysqVhzv0Hb1RqZHDGOjRjbMs xZRKa03+5Iu8w== In-Reply-To: <87wml5i7sn.fsf@ledu-giraud.fr> Feedback-ID: 57735886:user:proton X-Pm-Message-ID: 3a34b80f9e54852b7ca013fbc25081d7bcf2518a Received-SPF: pass client-ip=185.70.40.141; envelope-from=heimeborgia@protonmail.com; helo=mail-40141.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.01, RCVD_IN_MSPIKE_WL=-0.01, 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:147425 Archived-At: Sent with Proton Mail secure email. On Monday, July 29th, 2024 at 8:24 AM, Manuel Giraud via Users list for the= GNU Emacs text editor wrote: > Heime heimeborgia@protonmail.com writes: >=20 > > I am using the backquote, but I get errors when using ,tknm > >=20 > > How can this be fixed ? Perhaps I got to arrange the code in a > > different way ? >=20 >=20 > Yes I think that you should re-arrange and re-read "(elisp) Backquote" > and maybe "(elisp) Evaluation" too. >=20 > [...] >=20 > > (defun vodil-bfnap (wmax &optional actn) > >=20 > > (setq-default mode-line-buffer-identification > > `(:eval > > (let* ( (bfnm (buffer-name (window-buffer))) > > (tknm (if (> (length bfnm) wmax) > > (vodil-ellipses bfnm wmax actn) > > bfnm)) ) > > (propertized-buffer-identification (format " %s " ,tknm)))))) >=20 >=20 > What could contain an evaluation of tknm here? > -- > Manuel Giraud Have done this, but although it works, the buffer name is always *scratch* (defun vodil-bfnap (wmax &optional actm) (let* ( (bfnm (buffer-name (window-buffer))) (tknm (if (> (length bfnm) wmax) (vodil-ellipses bfnm wmax actm) bfnm))) (setq-default mode-line-buffer-identification `(:eval (propertized-buffer-identification (format " %s " ,tknm)))))= )