From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Leo Butler Newsgroups: gmane.emacs.help Subject: Re: Executing part of the code instead of another Date: Thu, 08 Oct 2020 12:43:48 -0500 Message-ID: <86r1q87gvf.fsf@x201.butler.org> 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 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19166"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 08 19:59:36 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 1kQaCV-0004vh-OX for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 08 Oct 2020 19:59:35 +0200 Original-Received: from localhost ([::1]:41496 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kQaCU-0006W6-Re for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 08 Oct 2020 13:59:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33120) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kQaBw-0006Vw-4K for help-gnu-emacs@gnu.org; Thu, 08 Oct 2020 13:59:00 -0400 Original-Received: from mail-eopbgr670102.outbound.protection.outlook.com ([40.107.67.102]:47936 helo=CAN01-TO1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kQaBt-0004ic-GJ for help-gnu-emacs@gnu.org; Thu, 08 Oct 2020 13:58:59 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CUhOl26rnAkxNpnkDXPrcRJkcwYUs/QsCnM+wSN6HoQ4wi6xB4XCQywgT4okNvNy8hvFzFcs3PSN5FJfzmFwjedaCmclrQ2YEufe/KL9AGtPJ9YOxCiXkXBctt0XyI9z9qAaXNtARHE7El1E/3wdbXJ6H3TVovatZj8pDVZL87+voqona0ret37ifkwQ5xtedm9amID1g+vOmiCOmPKjcJn5EZPI/JXZyj8Hg7V6vwJ15VBFP6hTKlnnKm2QnK9a0qbPvocWvpd/SGkZC2l8q9D5EK16VUD9esI9McGJWtqPwC4lmEb0iafZuySMGoZ8SNcpxfC5sUPmhHkL8PwnaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=D3RgTGd2TDmYs/41eB/xUPQqTWxlOeShDZ5KT+qxK5g=; b=Nhq4FWZqnBJW7XhEzpnJm8blzDjbFt2XpjQ00AueqX1YkLF7YLp75IC+3/YF5o9kr/vurJx229gc6ClqDzUNsuTboM7oaLplUsQLi8/ry9tiCBfQGq6xdBrmuf164HbGCMs74iClnzrDfVMq56j6tnTGWQf+Hv2+bIIJYG5m7VxNszTueNBlW+/uK8ATLc0H3Aoqs5oVvi3sdamWTd1qAd8CVpwX0VlHZ1oopbwBZMcZHCwbEfqDjyHefhJ8A0l/4A1fzxP32wqjbx7ztDlK76WuUR0/5W6HKGxB8zNCWi/V3UrLDtkXYht7WjilGB5wI4NfPQc5HCPNAj7Xkdkmjg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=umanitoba.ca; dmarc=pass action=none header.from=umanitoba.ca; dkim=pass header.d=umanitoba.ca; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=umanitoba.onmicrosoft.com; s=selector2-umanitoba-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=D3RgTGd2TDmYs/41eB/xUPQqTWxlOeShDZ5KT+qxK5g=; b=aJd//UNNtzEuusTDxcBKVq5VZ/tGHVDaK7jHRouD0ceyX7ZN8IkfvA2iAIA2tElJ8vDJ6dY62xCw/txDAaFvFsUimtXKvbcH1dS+pST/9iHCZke13qjuEFZXOCatk1rvzzDL3hjtKp8xxfacPvTrBCBZVDCZ0DKXBnegzQVPlBY= Authentication-Results: gnu.org; dkim=none (message not signed) header.d=none;gnu.org; dmarc=none action=none header.from=umanitoba.ca; Original-Received: from YTBPR01MB3053.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:21::31) by YTOPR0101MB1658.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b00:1a::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.38; Thu, 8 Oct 2020 17:43:52 +0000 Original-Received: from YTBPR01MB3053.CANPRD01.PROD.OUTLOOK.COM ([fe80::d9ac:774a:ace:9c4e]) by YTBPR01MB3053.CANPRD01.PROD.OUTLOOK.COM ([fe80::d9ac:774a:ace:9c4e%3]) with mapi id 15.20.3455.024; Thu, 8 Oct 2020 17:43:52 +0000 In-Reply-To: (Christopher Dimech's message of "Wed, 7 Oct 2020 16:05:01 +0200") X-Originating-IP: [45.44.33.194] X-ClientProxiedBy: MW2PR2101CA0001.namprd21.prod.outlook.com (2603:10b6:302:1::14) To YTBPR01MB3053.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:21::31) X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from x201 (45.44.33.194) by MW2PR2101CA0001.namprd21.prod.outlook.com (2603:10b6:302:1::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.10 via Frontend Transport; Thu, 8 Oct 2020 17:43:51 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: aff75606-22cb-4861-56bf-08d86bb1b8b6 X-MS-TrafficTypeDiagnostic: YTOPR0101MB1658: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: J8fPlUYDOkiDJAJAXhFq6bL+cS2PU1SIG+vZwdI9v0XOY+f3khUx7frB27mOGEnOG2rbA/GEnRkGeEo29+ZDNxmPE06C0u9SDpW87S9hnHKcvsfJSIVawKVtcByGUTO2srSl4PISgrmzwSrNMosQX29KxSvfylpfrHorNBFSPhRdjxAsB4gLny2Iq2B188xqpAGWVWvOTEzcoRDxI4WKvbHd0BuyxuqnSa9NmBCSGd9GIX7bGkiYaxgS7q0SB3IDt3EiAovjFQo9c8bsAQp4wgAVdmZhyoV5PrCAhg8Qim9idmDwpIoOq5Sc5tO+bD8sicHXBmpkaeHm7p1t2mp94+1osoFAUxgJVWPD7S9GMrLoe6cCouc8EuJhHQHfvbzb X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:YTBPR01MB3053.CANPRD01.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(136003)(366004)(376002)(346002)(396003)(39850400004)(52116002)(6496006)(44832011)(9686003)(786003)(86362001)(6486002)(316002)(6916009)(478600001)(66476007)(66556008)(8936002)(956004)(26005)(16526019)(6666004)(186003)(2906002)(8676002)(5660300002)(66946007)(83380400001)(518174003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: UXtu/x/05CphlJppsh8c03343osm15Er9jTKmDf61aLVtJVypsOGzAbab1IqpOvXUiSAnxDPZ/pclKtYq62WIjVFgfNEkBAd7YhCzfaybcpgR+YJ9ZhqNqx7NpbKxDfzE04NNvd60i8oBCRRs10sKdic5xvbLf1d8G2qAYUWjs8AERxHutUQUV98bioMoKoxYEjPF4YaBx176F3FwiWRsMl5OIQ3yGHnTtq2rRMZaYNSKktTP8ySjPtJjnVdtioR9fdTCXkEydD5EENwoPQG8Qgls9w2R7VEPQneTJryzBHvDSlIO5cf9tAxBo/Mp6YNgnkv/ekuXc7pE86NcR6UBfYwCJVGv3dwex6uQMIYlIdzqGRdElN8ZjPHJAxysn+Ebdi/UmiyopjvMzp1sQ7BESgX4Uj5M4qXTR53gj7np2apYFNszckuTp2mKuveE8Ws8ib5YYVj9cfigvD8WFiFez+rrJf6xnkQDYNw8SCOoLhzGaa9UoYpSIHXVmh16Y5LoGGy5WNDhkKAg5fZy11sHF56OMXW1Rq2koeRHNRaoXBRNboTHDN3OLwSJIdKI2VhR3ss0tCq1pophw9P+QKjvDl2M4e9d0nzAtz1RwjMVhdsqjBgsMklzRYKbe6+G+ptOyjyYUXPFK/jAb81IzHgZA== X-OriginatorOrg: umanitoba.ca X-MS-Exchange-CrossTenant-Network-Message-Id: aff75606-22cb-4861-56bf-08d86bb1b8b6 X-MS-Exchange-CrossTenant-AuthSource: YTBPR01MB3053.CANPRD01.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Oct 2020 17:43:52.6415 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4f80dd0b-338c-4e4c-8a14-90446962f7b8 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: FJHkIOOeDFkMYs8woi2JlKvwZnx/Wa2GkhbQ42GNtzO8xMOwzR9wwsKfELdVQCCqAPZRTBQzUUOSZZ634iP/lA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: YTOPR0101MB1658 Received-SPF: pass client-ip=40.107.67.102; envelope-from=Leo.Butler@umanitoba.ca; helo=CAN01-TO1-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/08 13:58:55 X-ACL-Warn: Detected OS = Windows NT kernel [generic] [fuzzy] 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, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, 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.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:124380 Archived-At: Christopher Dimech writes: > 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) >> ...) >> Note that Emacs has its own repl, too. M-x ielm RET Take a while to learn how to think in lisp. The constructs you are using are C-like and very primitive (non-expressive, if you prefer) compared to what you can do in lisp. Specifically, it seems like what you are trying to do is usually accomplished with minor-modes in elisp. Leo