From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id aGRfC5SD6mOFIwEAbAwnHQ (envelope-from ) for ; Mon, 13 Feb 2023 19:38:12 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id uEE4CpSD6mMHuwAAG6o9tA (envelope-from ) for ; Mon, 13 Feb 2023 19:38:12 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D5F64E50C for ; Mon, 13 Feb 2023 19:38:11 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=WF6rCgez; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1676313491; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Topqa3CzEBpJXgvFEvi0efP/XsCV4+Eoyqdc+fmPp3I=; b=A7qIkT+WU9muLZmUVG28Um17z2B7g3TE3lDg2XSBp4KuTqvtu/2GpBkdBHVl3B8HMXMTmy oeUldmHsu9atYMUacKrbomvx5Kbez2R1jQ9s9Zf5HCoE6isoVekJXTSnN1Ib5NOnQeiItT fVeYv1xVwVMrvOK/FU1rQp7wYv0EZsiOQw1WXAS6jCQc+DYBZ6pn/K4iYaepKCKhzQ045q 7yYj7vXsjeQYwotm68NIaEynXATnuiN37B3EDUdkeFKjRJYu23dhEM6YVsIrthY6UJYGqr M/nuB5m4xuFLzgKIdi3EW9wnCszkh+mGJD735ywk4tskMhQ+Qp3ZWJ9jHms1wQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=WF6rCgez; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1676313491; a=rsa-sha256; cv=none; b=EYS3xWG8Nb9FozNcCORcWvQKl3rNmLBa5JRKRaUGFgsFTgcEFj3qazBDQ2l12n1t/kqAWI 3XPedVvtqHeddA1LyV1asxcsSLwpFpaDj3KPnjPSg58PBcKq//Dt1YLOCwjoUet7KGpj64 yKZpBBUXKieDoaDjkF66OPcyyGouCZkTDDPG6v0KLuIAtyWe7Tsth1+66oyixNY4xBzoGJ +uLu8JyUJF7yH9FdNUtBJIEHAxauqkP4Tyc8leNE54V2zLL3hn3D0aQXFtcr7HjBcbr8cY +RdsLfP0HFUUyKskIpZysdlLgoO8YNZZHs/wVfWFUP0Wq//QRzHuwydYai7gUg== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pRdhb-0003uM-RT; Mon, 13 Feb 2023 13:37:23 -0500 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 1pRdha-0003to-6X for emacs-orgmode@gnu.org; Mon, 13 Feb 2023 13:37:22 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pRdhY-00079l-Ad for emacs-orgmode@gnu.org; Mon, 13 Feb 2023 13:37:21 -0500 Received: by mail-wr1-x434.google.com with SMTP id r2so13234762wrv.7 for ; Mon, 13 Feb 2023 10:37:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:date:references:in-reply-to:subject:cc:to:from :message-id:from:to:cc:subject:date:message-id:reply-to; bh=Topqa3CzEBpJXgvFEvi0efP/XsCV4+Eoyqdc+fmPp3I=; b=WF6rCgezACErZdhj8Jn0MQSzTI17tGRF5Cz06mce+ujxXSxZX8gIkZ7sSkYykdYmzu 884EmwkSdgdsS4Yq1EwYRRa6uG4Yj/3N0vqABbeA7kySlP1SZnpmglOx9dT7joIXSuiX i2uXAUx2QhqpK4F4xAnsH84MDpupPDYSnZeKYLQOmulpnWnkHln8b0c01ITQd4VBqWvv E1ALSEIk2xW3vIM1GkJhQc7xF7oie4FTeZCR3YZGqA7ZJJ7bylml/RU93lbZQWlke1ID s+gO3r/oyauP+2XfEULfUHM17rVqLuBvlzAfdx5LtrT4uLx3cc9DAcZgMbQLIBTeDI5n 3qrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:date:references:in-reply-to:subject:cc:to:from :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Topqa3CzEBpJXgvFEvi0efP/XsCV4+Eoyqdc+fmPp3I=; b=4k8CYxc9ylMZKSQXrsUGkVARicz4Jz86++XO8BbsXF8nXXn9shXZdoKasb/r7EQhJC BQ/byizQf+1nn8EM7vDwyr+t93YkvSCSHwiXfHN4fAoxhzsFVqFjMdRs4OV/vTCKibIH yAhg1z/vhDpZiOJZVRbMclnkjTQu8yeOctq/+X0tB8pw2+YWTq0ztyiEFcaTHc3nx03f 85kmQVsa/QLcSk2SyKY2t6skqXwE6QqXW8rc1Umwxd3EGUoHats39LdzU6zcFN1VqS7X Ft/HfiSg0tzgJPp1cXain7IJFI9q4acJLeSDGi21OuyLu1DHJlbaukeTEHxYqn+FiV4H q50A== X-Gm-Message-State: AO0yUKWWMFqZJ3BQFMnEFHf9FpuKXNZVYidpdvUC0X+FGkrb3fTLCg/3 lzxtMI0ITEScZFQnFs2XUYo= X-Google-Smtp-Source: AK7set+6gi2oul4DuS/kkvxLsx1w9m2Yx85CGEn2bd1f3l2341T70OBk9RWBdhziH+EdKXYMoE+PDQ== X-Received: by 2002:a5d:4607:0:b0:2c5:5391:8ab1 with SMTP id t7-20020a5d4607000000b002c553918ab1mr4844455wrq.53.1676313438126; Mon, 13 Feb 2023 10:37:18 -0800 (PST) Received: from keynux ([2a01:e0a:505:3460:169:7511:f49a:58eb]) by smtp.gmail.com with ESMTPSA id d13-20020adfe88d000000b002c54f4d0f71sm6165748wrm.38.2023.02.13.10.37.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Feb 2023 10:37:17 -0800 (PST) Message-ID: <63ea835d.df0a0220.652cf.5e8a@mx.google.com> Received: by keynux (sSMTP sendmail emulation); Mon, 13 Feb 2023 19:37:15 +0100 From: Bruno Barbier To: Arthur Miller Cc: emacs-orgmode@gnu.org Subject: Re: Problem with let/cl-letf binding stuff with org-capture In-Reply-To: References: <63e69450.050a0220.9052f.652e@mx.google.com> <63e74a8b.df0a0220.7f45d.5b05@mx.google.com> <63e7eb19.050a0220.56539.6aa7@mx.google.com> <63e8afc4.5d0a0220.969b4.d166@mx.google.com> Date: Mon, 13 Feb 2023 19:37:15 +0100 MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=brubar.cs@gmail.com; helo=mail-wr1-x434.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: X-Migadu-Queue-Id: D5F64E50C X-Spam-Score: -7.42 X-Migadu-Spam-Score: -7.42 X-Migadu-Scanner: scn0.migadu.com List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-TUID: XCIUQvh4CN7l Arthur Miller writes: > Bruno Barbier writes: > >> > > That looks very nice indeed. I am not aware of that package, I will definitely > use it somewhere, sometime. But with that we are getting now into 1K extra sloc > solution. With this experiment, I was mostly interesting to see how I can re-use > what already is in Emacs. Lisps are great for prototyping and writing new > software. Legend says that Steele was cranking out 10 intepreters a week at his > time :). I don't know how true it is, just read it in some blog, but the > point is that we are rather typing fast new pieces instead of learning how > to re-use stuff, which in the long run I believe is a bad habit, since we are > debugging bits that does the same what someone else already debugged. Don't get > me wrong, I have nothing against using someones package, certainly not > with-editor, seems like a good package; I am just talking about programming in > general. ... And the piece of code, that I just wrote and sent, was already available in Emacs (see Ihor's email). I've definitely failed to do my research before coding ... I definitely get your point! :-) > This was also me trying to get better in Emacs Lisp, but I have to admit I am a > bit dissapointed we can't just override function bindings with cl-flet. Function > slot is just another slot :). > > I am using cl-labels and cl-flet myself to introduce "local" functions, to not > pollute global namespace (symbol table), which they are good for, and to keep > code local where it is used, and I think they are also slightly more clear then > lambdas. They are good for that, unfortunately it is a bit of dissapoitment that > we can't locally bind functions slots other then actually overriding them globally. Since I've learned that cl-flet and cl-labels are local lexically, I'm using them more and more: that removes lot of noisy funcalls, compare to lambdas. > And for the last time: I am not using this version of read-string, I don't need > it myself; it was just me thinking how to implement something after reading a > blog post. Anyway, thanks for the input, it was valuable to me. Got it. Thanks for your patience and your valuable inputs too. And I'm definitely going to use the version that is in Emacs. Thanks for this too. best, Bruno