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: Make new buffers into new frames Date: Mon, 30 Sep 2024 06:40:42 +0000 Message-ID: References: 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="9902"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Heime via Users list for the GNU Emacs text editor To: tomas@tuxteam.de Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 30 08:58:17 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 1svAML-0002K2-3D for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 30 Sep 2024 08:58:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1svA9r-00034t-1E; Mon, 30 Sep 2024 02:45:30 -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 1svA7o-000317-2P for help-gnu-emacs@gnu.org; Mon, 30 Sep 2024 02:43:22 -0400 Original-Received: from [185.70.43.19] (helo=mail-4319.protonmail.ch) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1svA6u-0004oR-Cl for help-gnu-emacs@gnu.org; Mon, 30 Sep 2024 02:43:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1727678446; x=1727937646; bh=bJhZKwOg4KNf0yewkoPNukR4DbFuI2X8ZfUiYrj2d38=; 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=PlsZ5yi8ks2A/K1YmtwuVgTdCIys20Ut90B0VW3u4TAM2GoAt/9TuOcwNSrhgP+ed ArKkrdaMA2Jgbs9cvJy11i6BL+KMTI/+ODt3dg7n+wCCo36fdmemzSE/Hqi7T40KvY JCC7M+8W/oUvG9JGyAtuQ5H/SNoTltDquOsfQsarc2IfGdiVytW/8qwtnWbS2TfVGs Uv0POstTy3jz2HbGEMWxcRmEynIGHv/VOEdWxobIJ6o6qwYjIA4PefGWN+wrP53QuJ Jz+xntgytGws+VfOtfDm0BPAiDndncP7BL7OkKsqkJh4pcwyQ69xuyM6gewwSVwvGC H/ZXm07mVW3CQ== In-Reply-To: Feedback-ID: 57735886:user:proton X-Pm-Message-ID: c1612178420fb8035fedaa84ddb43fb6107f754b X-Host-Lookup-Failed: Reverse DNS lookup failed for 185.70.43.19 (deferred) Received-SPF: pass client-ip=185.70.43.19; envelope-from=heimeborgia@protonmail.com; helo=mail-4319.protonmail.ch X-Spam_score_int: -8 X-Spam_score: -0.9 X-Spam_bar: / X-Spam_report: (-0.9 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, FREEMAIL_FROM=0.001, RDNS_NONE=0.793, SPF_HELO_PASS=-0.001, SPOOFED_FREEMAIL_NO_RDNS=0.001, T_SPF_TEMPERROR=0.01 autolearn=no 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:148106 Archived-At: On Monday, September 30th, 2024 at 4:41 PM, tomas@tuxteam.de wrote: > On Sun, Sep 29, 2024 at 07:31:07PM +0000, Heime wrote: >=20 > > Sent with Proton Mail secure email. > >=20 > > On Monday, September 30th, 2024 at 7:22 AM, tomas@tuxteam.de tomas@tuxt= eam.de wrote: > >=20 > > > On Sun, Sep 29, 2024 at 07:16:22PM +0000, Heime wrote: > > >=20 > > > [...] > > >=20 > > > > > > > 'action (display-message my-message "Info Buffer") > > >=20 > > > > > And now explain to us what kind of thing the function "insert-but= ton" > > > > > expects after the symbol 'action. > > > >=20 > > > > There is not much information in the manual about it. In the sectio= n > > > > Button Properties, action states that it requires a function > > >=20 > > > Aha! A function. Now stop ten seconds: a function makes sense? Yes, > > > kind of. To me at least. > > >=20 > > > And now: what are you giving to it? > >=20 > > I am currently giving it the command to print the text in some new buff= er. >=20 >=20 > No. You are not. What does your lisp do when it "sees" the expression >=20 > (+ 1 2) >=20 > ...and what is the result? The result is 3, the value returned as the result of the entire expression. =20 > You put the expression >=20 > (display-message my-message "Info Buffer") >=20 > ...which gets evaluated on-the-spot, and returns... a window! (what you c= an > 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. >=20 > Thus the error message. >=20 > Once again. Try to wrap your head around the Lisp evaluation model. This = will > save you a lot of work long-term. I understand. The expression (display-message my-message "Info Buffer") is= used=20 to display the contents of a buffer (dbuffer) in a window. The display-message function returns the window in which the buffer is disp= layed.=20 Because of the last call. Because it evaluates the expression (display-buff= er dbuffer), which returns the window that is displaying the buffer dbuffer. Then the correct way is=20 'action (lambda (button) (display-message my-message "Info Buffer")) Does one perform any operation with the button argument in the=20 declared function or lambda ? > Cheers > -- > t