Fix wrong function access & output refile error
fixes the bug mentioned in #311
- refiling to a correct org-file with an incorrect headline resulted in an error, due to the function
_refile_to_endbeing called with.instead of: - display an error message when trying to refile to a file that is not part of the files set in
org_agenda_files - display an error message when trying to refile to a headline that is non-existent in the destination file
This looks ok to me. Do you want to introduce any other changes or I can merge?
I'm still unsure what to do about that warning. As I said, it will never show, as it's immediately overwritten by the next log. IMO there should be no refiling when a user enters a non-existing headline. They clearly wanted to do something that cannot be fulfilled and our current output leaves them with the impression that their request was fulfilled, when in fact it was not. What is your opinion on this?
@kristijanhusak I made the attempt to refile to a non-existent heading in an existing file an error. The users intention cannot be full-filled, so we should inform them about it and abort the action