Ok I commited your changes with some corrections from my previous post, see below. Philip Kaludercic writes: > Thierry Volpiatto writes: > >> Philip Kaludercic writes: > (let ((beg (line-beginning-position)) > (end (point))) > + ;; Does it make sense to extend beyond END to allow completing > + ;; file names mid-string? > (list beg end #'completion-file-name-table > :exit-function (lambda (str _status) > (when (and (stringp str) > (eq (char-after) ?/)) > (delete-char -1)))))) Yes, we want to complete from bol to point: START and END delimit the text to complete (which should enclose point). COLLECTION is a completion table for completing that text, > - (let ((backup-by-copying t)) > + (let ((backup-by-copying t)) ;why is this bound? We want to backup by copying, not renaming, so ensure it is done by copying. -- Thierry