emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: Kevin Foley <kevin@kevinjfoley.me>
Cc: emacs-orgmode@gnu.org
Subject: Re: Org Refile RFLOC and Struct Type
Date: Sun, 18 Oct 2020 16:16:36 -0400	[thread overview]
Message-ID: <87mu0jz3vf.fsf@kyleam.com> (raw)
In-Reply-To: <m2sgai5gta.fsf@Kevins-MBP.home.lan>

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.


  reply	other threads:[~2020-10-18 20:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-13 14:41 Org Refile RFLOC and Struct Type Kevin Foley
2020-10-18 20:16 ` Kyle Meyer [this message]
2020-10-19  1:50   ` [PATCH] Org Refile Document RFLOC (was: Org Refile RFLOC and Struct Type) Kevin Foley
2020-10-20  4:42     ` Kyle Meyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mu0jz3vf.fsf@kyleam.com \
    --to=kyle@kyleam.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=kevin@kevinjfoley.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).