From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id EL2SInAvS2a/rwAAe85BDQ:P1 (envelope-from ) for ; Mon, 20 May 2024 13:09:36 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id EL2SInAvS2a/rwAAe85BDQ (envelope-from ) for ; Mon, 20 May 2024 13:09:36 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=pdRRwaa0; dmarc=pass (policy=none) header.from=posteo.net; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1716203376; a=rsa-sha256; cv=none; b=ZZEkbj/qURhgSRJX01eS6FfKDPneSNF3wFY1nv/XeA/MjpqD1PnylNQ1u2yrP52W3kUcR/ HTKmGWytLsQKbKgcKmigZaS1NNP59KVrAuP4HLV9IsqpeR/9lhJOk/5IjunYB4HrtJjcab GrGzD5e3Rm4NlGBvFGyCceUC1vHdlQX878gN+6sFKFnpUEDkWEChNTE0jgAejaZrlHqjqG edDXPXCSWW6FKDwVY2xNL9xb0BFST5kb6y+Zp2Y7A2tT5qpZuFN71XzOZ++uHk4NncmU/7 1do1/Pdwj7k0EMAwwgmYOzWllu6WCs/nyz+7sLsOedlVPfX4ANjA7bFAGrum7Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=pdRRwaa0; dmarc=pass (policy=none) header.from=posteo.net; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1716203376; 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=EbaKj2qeWYcaQHVthN20a+OnHkZ+VHpyGZM4J4l4tpA=; b=pCznlmDW6sBHRf1LJ5UXrrstuDJI2A+g+cDXFLVoeIr7UYezR55gSR3icobeb1Wh9JBGf8 wCAKdLT8MIVx9PI+NA6YdWOP+QWPv19fmwMMs++xqkw3rTuBz20T0elWnXR+BFZnt3cyVO BTojbGdOoeR9Pnmxd1h9f0WTFFaUtOdJFrXncrKi42EUK1MbBwWivic+bOkdZxbA5Stz6h s/MQfUTMWmVTx+hY9F4BoH3fKTA44yTLJgOT1vXa5upeQnUFSsmvF/hV0mRE28C/tJ4TYM tFzzRWQsTQswwI+1TxBclqhwevjzFS1+32Qv6XabH0oNfBbAlrQDqIFmJb7DyQ== 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 6C4A81AE39 for ; Mon, 20 May 2024 13:09:36 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s90sl-0006NZ-Ft; Mon, 20 May 2024 07:08:43 -0400 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 1s90sg-0006N6-FZ for emacs-orgmode@gnu.org; Mon, 20 May 2024 07:08:39 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s90sd-0007io-1w for emacs-orgmode@gnu.org; Mon, 20 May 2024 07:08:38 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 79670240101 for ; Mon, 20 May 2024 13:08:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1716203311; bh=9pDEHrKkzlHJUTRbrCOMWco6FkSbUJ6O/1Z71FxUR/c=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=pdRRwaa0Xmpxt8EXZLqXZLCkY0+J1bwaLSKwNGzq1MtRU+iZ8GlD++WWkyCmlboiL ERD90WwOGLJhG3pGUj7UWXBlfCjsey03asrvMfBcTAxIux6zW4jrX5vm3ZQS7zEdnO fMc010Dsl8MH/eLNDOMbOZ/Vyk84qw9aAbgfI2XrMXD+jsvKQ12VrM9PPXMBOJkqXH XUAqceFp0FQ8ShtdNJt3l2tpbuwKxvYu+NE4O5AsuPIYvmxridqnGxs6lz+N16+Xks ZUsaYdrik6W8dVwaxDKRPOeMUDRnvZMwsTiemU6ZdIHcn5fF5Eaf3WnS6UxwMJs+wT raFkcsftIwLQQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4VjZYp4k77z9rxF; Mon, 20 May 2024 13:08:29 +0200 (CEST) From: Ihor Radchenko To: Stefan Monnier Cc: emacs-orgmode@gnu.org Subject: Re: Saving some kitten, plus some questions along the way In-Reply-To: References: <87ikza3thi.fsf@localhost> <87a5klsvvi.fsf@localhost> Date: Mon, 20 May 2024 11:10:12 +0000 Message-ID: <87msokrb6z.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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: 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-Migadu-Queue-Id: 6C4A81AE39 X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -8.03 X-Spam-Score: -8.03 X-TUID: 9367JyBDXNA6 Stefan Monnier writes: > OK, changed it to `with-current-buffer`. > > I pushed the resulting patch (along with three other patches resulting > from running the tests) to `scratch/org` on `elpa.git`. > > You can also find them attached, Thanks! > Subject: [PATCH 1/4] (org-*-in-calendar): Prefer `apply` to `eval Hmm... `...', not `...`. Convention is convention... > - (org-eval-in-calendar '(setq cursor-type nil) t) > + ;; FIXME: Not sure we need `with-current-buffer' but I couldn't > + ;; convince myself that we're always in `calendar-buffer' after > + ;; the call to `calendar'. > + (with-current-buffer calendar-buffer (setq cursor-type nil)) Further ahead, the code uses `use-local-map'. So, if current buffer is not `calendar-buffer', we are in trouble anyway. If you want to play safe, just add an assertion after the call to `calendar', or wrap the whole thing into `with-current-buffer'. > -(defun org-eval-in-calendar (form &optional keepdate) > - "Eval FORM in the calendar window and return to current window. > +(defun org-funcall-in-calendar (func &optional keepdate &rest args) > + "Call FUNC in the calendar window and return to current window. > Unless KEEPDATE is non-nil, update `org-ans2' to the cursor date." You still left `org-ans2' kitten struggling, didn't you? :) > +(defun org-eval-in-calendar (form &optional keepdate) > + (declare (obsolete org-funcall-in-calendar "2024")) 9.7, not 2024. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at