Mikhail Skorzhinskii <mskorzhins...@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 via email to