emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Mikhail Skorzhisnkii <mskorzhinskii@eml.cc>
To: Ihor Radchenko <yantar92@gmail.com>
Cc: Mikhail Skorzhinskii <mskorzhinskiy@eml.cc>,
	Org Mode <emacs-orgmode@gnu.org>
Subject: Re: [PATCH] org-refile.el: show refile targets with doc. title
Date: Tue, 30 Aug 2022 15:53:00 +0200	[thread overview]
Message-ID: <87mtblj0fv.fsf@eml.cc> (raw)
In-Reply-To: <87a6b2e67k.fsf@localhost>

[-- Attachment #1: Type: text/plain, Size: 2179 bytes --]

I have signed the FSF papers. However for the simplicity I will send renewed patch in different thread. You may consider this thread to be closed.q

E-Mail thread I am going to use is: <https://lists.gnu.org/archive/html/emacs-orgmode/2022-06/msg00230.html>

      Thanks,
      Mikhail Skorzhinskii

Ihor Radchenko <yantar92@gmail.com> writes:

> Mikhail Skorzhinskii <mskorzhinskiy@eml.cc> writes:
>
>> Thank you for reviewing the changes. Sorry for the sloppy patch, I’ve
>> retested everything and added a few additional fixes, there were more
>> problems.
>
> Thanks! And sorry for the slow review. Your email was lost near the tail
> of the todo list.
>
>> I’ve added a couple of test cases too. (BTW, test framework is awesome
>> and really easy to use!)
>
> Great!
>
>> * lisp/org-refile.el (org-refile-use-outline-path): add an option ’title
>> * lisp/org-refile.el (org-refile-get-targets): start refile target
>> outline with document title (#+title) instead of file name
>
> Note that changes like this should be detailed in etc/ORG-NEWS
>
>> -	  (const :tag “Start with buffer name” buffer-name)))
>> +	  (const :tag “Start with buffer name” buffer-name)
>> +	  (const :tag “Start with document title” title)))
>
> You also need to document the new option in the docstring.
>
>> +  ;; When `org-refile-use-outline-path’ is `title’ and document do not
>> +  ;; have an extracted document title, return just the file name
>> +  (should
>> +   (org-test-with-temp-text-in-file “* H1”
>> +     (let* ((filename (buffer-file-name))
>> +            (org-refile-use-outline-path ’title)
>> +            (org-refile-targets `(((,filename) :level . 1))))
>> +       (member (file-name-nondirectory filename)
>> +               (mapcar #’car (org-refile-get-targets)))))))
>
> It would also make sense to add a test when document is a temporary
> buffer without filename and also does not contain a title.
>
> Finally, your patch is exceeding 15LOC. You need to do copyright
> paperwork to get the patch merged. See
> <https://orgmode.org/worg/org-contribute.html#copyright>
>
> Best,
> Ihor

      reply	other threads:[~2022-08-30 16:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-25 15:23 [PATCH] org-refile.el: show refile targets with doc. title Mikhail Skorzhinskii
2021-12-26 13:59 ` Ihor Radchenko
2021-12-28 11:59   ` Mikhail Skorzhinskii
2022-05-28  2:33     ` Ihor Radchenko
2022-08-30 13:53       ` Mikhail Skorzhisnkii [this message]

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=87mtblj0fv.fsf@eml.cc \
    --to=mskorzhinskii@eml.cc \
    --cc=emacs-orgmode@gnu.org \
    --cc=mskorzhinskiy@eml.cc \
    --cc=yantar92@gmail.com \
    /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).