From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id lAoHFZDxjF/SWgAA0tVLHw (envelope-from ) for ; Mon, 19 Oct 2020 01:53:20 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id yKxcEJDxjF9eWAAA1q6Kng (envelope-from ) for ; Mon, 19 Oct 2020 01:53:20 +0000 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 D2D6E9403A6 for ; Mon, 19 Oct 2020 01:53:19 +0000 (UTC) Received: from localhost ([::1]:35362 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUKMQ-0004oX-MC for larch@yhetil.org; Sun, 18 Oct 2020 21:53:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51942) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUKKN-0002bq-Oq for emacs-orgmode@gnu.org; Sun, 18 Oct 2020 21:51:11 -0400 Received: from mout-p-202.mailbox.org ([2001:67c:2050::465:202]:12080) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1kUKKJ-0001Og-DA for emacs-orgmode@gnu.org; Sun, 18 Oct 2020 21:51:11 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4CF08k0bSRzQkjT; Mon, 19 Oct 2020 03:51:02 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter04.heinlein-hosting.de (spamfilter04.heinlein-hosting.de [80.241.56.122]) (amavisd-new, port 10030) with ESMTP id Aii3qTYoU27X; Mon, 19 Oct 2020 03:50:55 +0200 (CEST) From: Kevin Foley To: Kyle Meyer Subject: Re: [PATCH] Org Refile Document RFLOC (was: Org Refile RFLOC and Struct Type) In-Reply-To: <87mu0jz3vf.fsf@kyleam.com> References: <87mu0jz3vf.fsf@kyleam.com> Date: Sun, 18 Oct 2020 21:50:52 -0400 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-MBO-SPAM-Probability: X-Rspamd-Score: -6.33 / 15.00 / 15.00 X-Rspamd-Queue-Id: D80ED271 X-Rspamd-UID: 61bc3f Received-SPF: pass client-ip=2001:67c:2050::465:202; envelope-from=kevin@kevinjfoley.me; helo=mout-p-202.mailbox.org X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, 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.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -1.01 X-TUID: 0rXpiBBLQYvr --=-=-= Content-Type: text/plain Kyle Meyer writes: > I imagine tastes vary on whether using cl-defstruct here is an overkill. > (To my eyes, it is.) More importantly, though, I think changing it now > means we'd also need a compatibility layer, which doesn't seem worth the > trouble. I tried implementing it and realized: 1. It have issues with backwards compatibility (like you mentioned). There are some workarounds but they add complexity 2. It can make other things complicated. For example using `assoc' to look things up no longer works so a lot needs to be updated. Personally I think it's worth it as it makes things much clearer but I understand why others may not feel that way and it's not something I feel strongly enough about to push for. > Thanks for noticing and for working on a patch. My pleasure, I've attached a patch to this email. I put something together but I wasn't sure how it should be styled/formatted so if anyone has any suggestions I'd be happy to update it. Kevin --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-org-refile.el-org-refile-Add-description-of-RFLOC-to.patch >From 87af8fc4a08c8b4b2c9c508d0bad0565c0d10429 Mon Sep 17 00:00:00 2001 From: "Kevin J. Foley" Date: Sun, 18 Oct 2020 21:30:52 -0400 Subject: [PATCH] org-refile.el (org-refile) Add description of RFLOC to docstring --- lisp/org-refile.el | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lisp/org-refile.el b/lisp/org-refile.el index 7eb0a9643..4d56f2e9a 100644 --- a/lisp/org-refile.el +++ b/lisp/org-refile.el @@ -414,7 +414,16 @@ (defun org-refile (&optional arg default-buffer rfloc msg) Beware that keeping refiled entries may result in duplicated ID properties. -RFLOC can be a refile location obtained in a different way. +RFLOC can be a refile location obtained in a different way. It +should be a list with the following 4 elements: + +1. Name - an identifier for the refile location, typically the +headline text. +2. File - the file the refile location is in +3. nil - Used for generating refile location candidates, not +needed when passing RFLOC +4. Position- the position in the specified file of the +headline to refile under MSG is a string to replace \"Refile\" in the default prompt with another verb. E.g. `org-copy' sets this parameter to \"Copy\". -- 2.28.0 --=-=-=--