From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Christopher Dimech Newsgroups: gmane.emacs.help Subject: Re: Executing part of the code instead of another Date: Wed, 7 Oct 2020 16:05:01 +0200 Message-ID: References: <87imbm3llg.fsf@ebih.ebihd> <87blhe3kxg.fsf@ebih.ebihd> <875z7m4bdx.fsf@ebih.ebihd> <20201007140150.GA2289@tuxteam.de> 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="7338"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org, moasenwood@zoho.eu To: tomas@tuxteam.de Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 07 16:07:54 2020 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 1kQA6k-0001po-F9 for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 07 Oct 2020 16:07:54 +0200 Original-Received: from localhost ([::1]:40112 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kQA6j-0002U3-Ag for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 07 Oct 2020 10:07:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36726) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kQA4C-0001tw-Oh for help-gnu-emacs@gnu.org; Wed, 07 Oct 2020 10:05:16 -0400 Original-Received: from mout.gmx.net ([212.227.17.21]:49753) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kQA4A-0000qq-Nm for help-gnu-emacs@gnu.org; Wed, 07 Oct 2020 10:05:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1602079502; bh=mQHffZAvJhSwlChYyD86pyGBpWWgK/CVFxtRQ/ibFDA=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=CQ6pHginZOreuatZO8q9KE47GdeoBbXwt99uuF4J1Roll9f0Clias80/NtzyaFghw nuPuOaaQfhSFRuFRsCGTiQ3+9eWKiJwVNlQxLDvn7eULUP2/+hdwSGYx2Ai1GOqYzw ECwEdIMPm/i8zbhuvMD5jh8JBuIEH1RrzwahfP10= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [213.165.168.94] ([213.165.168.94]) by web-mail.gmx.net (3c-app-mailcom-bs01.server.lan [172.19.170.58]) (via HTTP); Wed, 7 Oct 2020 16:05:01 +0200 Importance: normal Sensitivity: Normal In-Reply-To: <20201007140150.GA2289@tuxteam.de> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:zRZl4YIJGAZKQI3A0M3OI4sY2TVovQgCcrdD0BPzW47ELaPhCwP8IFvouBUZXsmkAnEbJ pIulfZT+k45IvX7JVVbvhk6O6SbTdz4kRAh7Of8PSPe9+vj47fcvWxci39m0Sm2Uls9/9zMmafuX hwTSQVzeJ+i9v8CJFCeahzkwalkCgLjgawr57EVHgdOzYZY/7zmhuv6JT22tBFP+8RUHDFutNAqd mZTmzB3TumnAjv/7vszVEWs2RJ0XYc3Axivb1SBdg9pGF8Y5VahVxBF9zg+h0U2j/zjBBowcGP1v 0E= X-UI-Out-Filterresults: notjunk:1;V03:K0:u0qEq5ol6P4=:5PBufZNk5rol6jJp59sewm 0Eui6NQwBeXppjIqw7H2tTzIl+LgzNi+onNV7+N4QT9ZN8fwv77hIGeknotbNTfpI/RB9EmpH tLJ3fW6gA9fvMN079k8AMBoC5epEcgrRido8ABMynWe/0zslTYNs24sVDeRqBwMqhpmSIfzyQ nGifpLwbhr+rdQ024Ap0Pllm3ViO6dT+XIUX3zKzx9QUNsCnFLwkVACyjeyLEBNaTF0mOEwLi cQfYJBRcNcfVhZgrf/gcjW2S3S+cP93omoANwMHC6v4Zb7eKtK7gydHVUpFNNwWf5TrChHz6w 0bWVmADgOCxyD949o4f/2tHdgvmuqAcUXS/xYmzkAcifcrdktB/pMj6UyhPsli++d/0CWVhax 355T+OdUEZvUmKfhI3sRAIkSLGmKqieixJVLaavPx34qo98p/C3si5VnockrWjEAxwinUjAR7 8RzMgWVpDj91oxnnp8VbgP3YpgZKg2jGG4zPS0XTU6sKeNyf2l2gyYoItnmhtpsySaEflePfW Ks+/a+OHR2gEeft25hMFnbM0wdwzj39QsAbhbree+E4SL+Jg5berjgE2Ki8hS8e42BSsKtdFW wFZOC8mm0oZYMzGucXPx6eQw/zvAIKpNgaSAJp4JRz/B5Auft7cf0Jg14A3Bz1aMoTRRddTAC vEt9d9D0RTvTF1tngP39Scjtl7Duox88JFxnAKpBfH7iz6bphLGGzHWd4AIy4ecMYz6I= Received-SPF: pass client-ip=212.227.17.21; envelope-from=dimech@gmx.com; helo=mout.gmx.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/07 10:05:13 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=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.23 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" Xref: news.gmane.io gmane.emacs.help:124362 Archived-At: Thank you so very much Tomas. Ok. Got It. > Sent: Wednesday, October 07, 2020 at 4:01 PM > From: tomas@tuxteam.de > To: "Christopher Dimech" > Cc: moasenwood@zoho.eu, help-gnu-emacs@gnu.org > Subject: Re: Executing part of the code instead of another > > On Wed, Oct 07, 2020 at 03:48:51PM +0200, Christopher Dimech wrote: > > It would be better if you explain to me this progn stuff > > > > Have tried an example like this > > > > (setq na 8) > > (setq nb 13) > > ( if (> nb na) > > progn ( > > (message "nb > na condition [condition is true]") > > (message "nb > na condition [condition is true]") > > ) > > No. Written in Lisp, it's > > (progn > (thing 1) > (thing 2) > ...) > > In C (and in conventional maths, you'd write it as you did > above). > > Note that it's the same way as you write (message "foo") > [you don't write message("foo"), as you'd do in C or > Python or what not). > > Progn is a form to bundle a sequence of forms, which are > evaluated one after the other. The value of progn is > that of the last form evaluated (that's the -n), as opposed > to prog1, which would do the same as progn, but return the > value of its first form. > > Cheers > - t >