cape-file has a little special check for Org links. I don't use Org, but I do use Markdown with wiki-style links: [[Some file name.md]]. Would you consider extending cape-file to support this link type as well? The condition would be "are the two characters immediately before the filename-at-point [[?". Since square brackets are often used in code, it might be good to combine that with (not (derived-mode-p 'prog-mode)). Or, even more refined, to only check for [[ in prog-modes when in a comment.
Alternatively and much simpler for Cape: a buffer-local cape-file-complete-p variable would solve this very well. It would be a function receiving the beg buffer position (the start of the filename-at-point) and returning non-nil if file completion should be attempted.
cape-file
has a little special check for Org links. I don't use Org, but I do use Markdown with wiki-style links:[[Some file name.md]]
. Would you consider extendingcape-file
to support this link type as well? The condition would be "are the two characters immediately before the filename-at-point[[
?". Since square brackets are often used in code, it might be good to combine that with(not (derived-mode-p 'prog-mode))
. Or, even more refined, to only check for[[
in prog-modes when in a comment.Alternatively and much simpler for Cape: a buffer-local
cape-file-complete-p
variable would solve this very well. It would be a function receiving thebeg
buffer position (the start of the filename-at-point) and returning non-nil if file completion should be attempted.