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 KNl1H8C9hV+qFQAA0tVLHw (envelope-from ) for ; Tue, 13 Oct 2020 14:46:24 +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 WKRWG8C9hV+GawAAbx9fmQ (envelope-from ) for ; Tue, 13 Oct 2020 14:46:24 +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 7D0E594023B for ; Tue, 13 Oct 2020 14:46:23 +0000 (UTC) Received: from localhost ([::1]:34670 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kSLZE-0005GV-IQ for larch@yhetil.org; Tue, 13 Oct 2020 10:46:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40560) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kSLUs-0001f2-Qv for emacs-orgmode@gnu.org; Tue, 13 Oct 2020 10:41:51 -0400 Received: from mout-p-102.mailbox.org ([80.241.56.152]:55930) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1kSLUq-0003Qk-Ce for emacs-orgmode@gnu.org; Tue, 13 Oct 2020 10:41:50 -0400 Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:105:465:1:1:0]) (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-102.mailbox.org (Postfix) with ESMTPS id 4C9dXl3PgjzQlWP for ; Tue, 13 Oct 2020 16:41:43 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by gerste.heinlein-support.de (gerste.heinlein-support.de [91.198.250.173]) (amavisd-new, port 10030) with ESMTP id ckVax9mVOKJF for ; Tue, 13 Oct 2020 16:41:40 +0200 (CEST) From: Kevin Foley To: emacs-orgmode@gnu.org Subject: Org Refile RFLOC and Struct Type Date: Tue, 13 Oct 2020 10:41:37 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-MBO-SPAM-Probability: X-Rspamd-Score: -3.40 / 15.00 / 15.00 X-Rspamd-Queue-Id: 931D21824 X-Rspamd-UID: 53756f Received-SPF: pass client-ip=80.241.56.152; envelope-from=kevin@kevinjfoley.me; helo=mout-p-102.mailbox.org X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/13 10:41:43 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=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.23 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" 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: MPx6zp8eIjjE 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`. 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? Kevin