[PATCH] org-refile.el: Fix the case of *scratch* buffer

2021-05-15 Thread satotake
* lisp/org-refile.el (org-refile-get-targets): Ensure arg of `file-name-nondirectory' and `file-truename' is non-nil. If you set `org-refile-use-outline-path' `file' or `full-file-path', and call `org-refile' in the buffer before visiting file, errors are raised at these point. To fix them, check

Re: [PATCH] org-refile.el: Fix the case of emtpy buffer name

2021-05-15 Thread satotake
I was just refactoring my earlier patch based on Maxim's suggestions. I attached it but it might be too late. If the revision make you confused, please ignore it. Anyway, thank you for your reviewing, Maxim and Bastien.

Re: org-refile.el: Fix test case (Squashed)

2021-05-13 Thread satotake
Thank you for your response. > 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)? Yes.

[PATCH] org-refile.el: Fix the case of emtpy buffer name

2021-05-13 Thread satotake
* lisp/org-refile.el (org-refile-get-targets): Ensure arg of `file-name-non' and `file-truename' is non-nil. If you set `org-refile-use-outline-path' `file' or `full-file-path', and call `org-refile' in the buffer before visiting file, errors are raised at these point. To fix them, check if they a

[PATCH 2/2] org-refile.el: Fix test case

2021-05-09 Thread satotake
* 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'. TINYCHANGE --- lisp/org-refile.el | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git

[PATCH 2/2] org-refile.el: Fix test case

2021-05-09 Thread satotake
* 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'. TINYCHANGE --- lisp/org-refile.el | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git

[PATCH 2/2] org-refile.el: Fix test case

2021-05-09 Thread satotake
* 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'. TINYCHANGE --- lisp/org-refile.el | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git

Re: org-refile.el: Fix the case of emtpy buffer name

2021-05-09 Thread satotake
I am very sorry but related tests failed with my previous patch. I fixed it with this additinal patch. Bests, Takehsi SATO

[PATCH] org-refile.el: Fix the case of emtpy buffer name

2021-05-09 Thread satotake
* lisp/org-refile.el (org-refile-get-targets): Ensure arg of `file-name-non' and `file-truename' is non-nil. If you set `org-refile-use-outline-path' `file' or `full-file-path', and call `org-refile' in the buffer before visiting file, errors are raised at these point. To fix them, check if they a

org-refile.el: Fix the case of emtpy buffer name

2021-05-09 Thread satotake
Dear Org maintainers, 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. When I call `org-refile' in the buffer, Emacs throws errors on `org-refile-get-targets' because, typically, these buffers do n