On 09/05/2021 23:05, satotake wrote:
* lisp/org-refile.el (org-refile-get-targets): Check
`buffer-file-name' return value instead of `buffer-base-buffer'.

To pass the related tests, we need to check `buffer-file-name'.

Thank you for the patches. Maybe I have missed something, but it seems 2 patches are not logically independent, second one touches the same code to fix regression in tests. If so, could you, please, squash both patches into a single one (e.g. using git rebase --interactive)? I hope, it will help to review the change and to avoid confusion with several versions of second patch in 2 threads.

Code around has at least one more problem: questionable behavior in the case of indirect buffers (e.g. C-x 4 c). Refile targets cache, when enabled, is not reused for indirect buffer.

On 09/05/2021 21:47, satotake wrote:
I often use org-mode for note-taking and so on.
Sometimes, I would like to refile the headings in the scratch to other
org files while I am writing.

Have you tried org-capture? https://orgmode.org/manual/Capture.html
https://sachachua.com/blog/2015/02/learn-take-notes-efficiently-org-mode/#unnumbered-3
I think, existence of this feature is the reason why this bug was remaining unnoticed.



Reply via email to