From: tomas@tuxteam.de
To: Heime <heimeborgia@protonmail.com>
Cc: Heime via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org>
Subject: Re: Make new buffers into new frames
Date: Mon, 30 Sep 2024 06:41:04 +0200 [thread overview]
Message-ID: <Zvor4KkR63UOynyP@tuxteam.de> (raw)
In-Reply-To: <mm5Egn618LQyz9Ler6_-GK1wmL8ya8t_vK-uBcBol2p7HnTkEbOqyO8GeFevDXX1WgZYqcf-MBVZ7WSDYcSnmE8HOE8WgGcvYDKA9GIafO4=@protonmail.com>
[-- Attachment #1: Type: text/plain, Size: 1498 bytes --]
On Sun, Sep 29, 2024 at 07:31:07PM +0000, Heime wrote:
>
>
>
>
>
> Sent with Proton Mail secure email.
>
> On Monday, September 30th, 2024 at 7:22 AM, tomas@tuxteam.de <tomas@tuxteam.de> wrote:
>
> > On Sun, Sep 29, 2024 at 07:16:22PM +0000, Heime wrote:
> >
> > [...]
> >
> > > > > > 'action (display-message my-message "Info Buffer")
> >
> > > > And now explain to us what kind of thing the function "insert-button"
> > > > expects after the symbol 'action.
> > >
> > > There is not much information in the manual about it. In the section
> > > Button Properties, action states that it requires a function
> >
> >
> > Aha! A function. Now stop ten seconds: a function makes sense? Yes,
> > kind of. To me at least.
> >
> > And now: what are you giving to it?
>
> I am currently giving it the command to print the text in some new buffer.
No. You are not. What does your lisp do when it "sees" the expression
(+ 1 2)
...and what is the result?
You put the expression
(display-message my-message "Info Buffer")
...which gets evaluated on-the-spot, and returns... a window! (what you can
confirm if you follow the code). So your insert-button invocation places a
window in its 'action "place" and tries to call that window as if it were a
function. This can't go well.
Thus the error message.
Once again. Try to wrap your head around the Lisp evaluation model. This will
save you a lot of work long-term.
Cheers
--
t
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
next prev parent reply other threads:[~2024-09-30 4:41 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-29 7:40 Make new buffers into new frames Heime
2024-09-29 12:44 ` Heime
2024-09-29 17:15 ` tomas
2024-09-29 19:16 ` Heime
2024-09-29 19:22 ` tomas
2024-09-29 19:31 ` Heime
2024-09-30 4:41 ` tomas [this message]
2024-09-30 6:40 ` Heime
2024-09-30 9:13 ` Stephen Berman
2024-09-30 9:15 ` tomas
2024-09-30 9:29 ` Rudolf Schlatte
2024-09-30 19:32 ` Heime
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=Zvor4KkR63UOynyP@tuxteam.de \
--to=tomas@tuxteam.de \
--cc=heimeborgia@protonmail.com \
--cc=help-gnu-emacs@gnu.org \
/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).