unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Heime <heimeborgia@protonmail.com>
To: Manuel Giraud <manuel@ledu-giraud.fr>
Cc: Heime via Users list for the GNU Emacs text editor
	<help-gnu-emacs@gnu.org>
Subject: Re: backquote upon variable for :eval
Date: Sun, 28 Jul 2024 20:44:10 +0000	[thread overview]
Message-ID: <y_575rKuqKl4vpvyW3YiWXCoCHZqVx4usGUyjKAI4eeucw8qKyjair2r1q5rqBMk0oH6BGdxfWTts76UpbAlnjjuOMJAAie-5m5TeYpAW1w=@protonmail.com> (raw)
In-Reply-To: <87wml5i7sn.fsf@ledu-giraud.fr>






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 <help-gnu-emacs@gnu.org> wrote:

> Heime heimeborgia@protonmail.com writes:
> 
> > I am using the backquote, but I get errors when using ,tknm
> > 
> > How can this be fixed ? Perhaps I got to arrange the code in a
> > different way ?
> 
> 
> Yes I think that you should re-arrange and re-read "(elisp) Backquote"
> and maybe "(elisp) Evaluation" too.
> 
> [...]
> 
> > (defun vodil-bfnap (wmax &optional actn)
> > 
> > (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))))))
> 
> 
> 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))))))






  reply	other threads:[~2024-07-28 20:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-28 20:10 backquote upon variable for :eval Heime
2024-07-28 20:24 ` Manuel Giraud via Users list for the GNU Emacs text editor
2024-07-28 20:44   ` Heime [this message]
2024-07-28 21:04     ` Christopher Dimech

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='y_575rKuqKl4vpvyW3YiWXCoCHZqVx4usGUyjKAI4eeucw8qKyjair2r1q5rqBMk0oH6BGdxfWTts76UpbAlnjjuOMJAAie-5m5TeYpAW1w=@protonmail.com' \
    --to=heimeborgia@protonmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=manuel@ledu-giraud.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).