From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id cMHRENKijF/lBQAA0tVLHw (envelope-from ) for ; Sun, 18 Oct 2020 20:17:22 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id cNeSDNKijF93JAAAbx9fmQ (envelope-from ) for ; Sun, 18 Oct 2020 20:17:22 +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 9EDDE9400BF for ; Sun, 18 Oct 2020 20:17:21 +0000 (UTC) Received: from localhost ([::1]:55498 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUF7I-0003pa-D3 for larch@yhetil.org; Sun, 18 Oct 2020 16:17:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34920) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUF6k-0003mL-Na for emacs-orgmode@gnu.org; Sun, 18 Oct 2020 16:16:46 -0400 Received: from pb-smtp20.pobox.com ([173.228.157.52]:63865) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUF6i-0007Oi-0z for emacs-orgmode@gnu.org; Sun, 18 Oct 2020 16:16:45 -0400 Received: from pb-smtp20.pobox.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id D1C36E02F1; Sun, 18 Oct 2020 16:16:40 -0400 (EDT) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:in-reply-to:references:date:message-id:mime-version :content-type; s=sasl; bh=AmOp2zDs4FwBwy51Ku6Zart50xs=; b=isRQ42 bRGV1TEXWqvzRBaK5zAQj4RcMGbBtY7yRP+vAH+xumN0iedpASKUNPSqJ3tBC/nT L16fiTZW/tTU7/6HNWf0uBHXzisWfyx/Q/O4zkvc7kiZLHtjp4WVLuOq1eP/sOKe x9dsviQEvgAgndXZK92yf9Yez9DoTXTQGXq34= Received: from pb-smtp20.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id CA5B2E02EF; Sun, 18 Oct 2020 16:16:40 -0400 (EDT) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=kyleam.com; h=from:to:cc:subject:in-reply-to:references:date:message-id:mime-version:content-type; s=mesmtp; bh=pB7vtNuSJJVMRIQQus4ybycFpGc8/6Fd5kxqVBfGzKI=; b=sDhmvGvsv+hHXEeyeb0CZDONSaQL74j+kit5dRmZmZKBYeZZehvikKf4Ev5I4zPlLVXZK3jb1vStiGoUgyCnth7K/H/YmKx5YQDRuJY0uIy/K9vfrU6i8j5yId6L4Ce3okczqfzV2dV47Q90dMJZs6RmxWIP8crjFjnxjHTJ3Rk= Received: from localhost (unknown [45.33.91.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp20.pobox.com (Postfix) with ESMTPSA id 1F4DCE02ED; Sun, 18 Oct 2020 16:16:38 -0400 (EDT) (envelope-from kyle@kyleam.com) From: Kyle Meyer To: Kevin Foley Subject: Re: Org Refile RFLOC and Struct Type In-Reply-To: References: Date: Sun, 18 Oct 2020 16:16:36 -0400 Message-ID: <87mu0jz3vf.fsf@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: D3C59266-117E-11EB-A02A-E43E2BB96649-24757444!pb-smtp20.pobox.com Received-SPF: pass client-ip=173.228.157.52; envelope-from=kyle@kyleam.com; helo=pb-smtp20.pobox.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/18 15:27:38 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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=pass header.d=pobox.com header.s=sasl header.b=isRQ42 b; dkim=pass header.d=kyleam.com header.s=mesmtp header.b=sDhmvGvs; 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.21 X-TUID: ZCXgmOb40pbT Kevin Foley writes: > I was recently working with `org-refile` and wanted to use a custom > target. There is the `rfloc` argument which is documented as: > >> RFLOC can be a refile location obtained in a different way. > > There's no documentation as to how `rfloc` should be structured. To > figure that out one has to read through the code which is made even more > difficult by the fact that the same argument is called `refloc` in > `org-refile--get-location`. True, this should be documented. > I plan to submit a patch to address this, however I wanted feedback on > whether using a struct type (cl-defstruct) could be an improvement > here before trying to implement it. > > It seems using a defined structure would make both the documentation and > code more clear, however I rarely (if ever) have seen structures used in > the elisp code I'm familiar with. Is there a downside to using struct > types that would make it a poor choice in this case? 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. Thanks for noticing and for working on a patch.