works well, particularly after custom defining additional file type pairs with
(defvar my-cpp-other-file-alist '(("\\.cpp\\'" (".hpp" ".cuh"))
("\\.hpp\\'" (".cpp"".cu"))
("\\.cuh\\'" (".cu" ".cpp"))
("\\.cu\\'" (".cuh" ".hpp"))
("\\.c\\'" (".h"))
("\\.h\\'" (".c"))))
(setq-default ff-other-file-alist 'my-cpp-other-file-alist)
However, it does not switch files when point in on include directive in c/cpp files. What is the setting to always ignore the content under point in this context?
ff-find-other-file
directly then? – orgtre Jan 02 '23 at 16:57ff-find-other-file
explains that, as it calls(let ((ff-ignore-include ignore-include)) (ff-find-the-other-file in-other-window))
using itsignore-include
argument (which is alwaysnil
for interactive calls). In fact all three commands in that library force the value offf-ignore-include
, asff-get-other-file
binds it tot
andff-find-other-file-other-window
callsff-find-other-file
with theignore-include
argument set tonil
. I suggestM-x report-emacs-bug
to improve the documentation about this. – phils Sep 30 '23 at 22:17