If I run C-c C-m href in auctex, it asks me which url to use. However if I want to link to a local file, it should let me choose the file but it doesn't.

How can I achieve this? Would be ok to bind this for example to C-u C-c C-m href or something like that.

1 Answer 1


In order to override current definition of href completion, add the following code to your init file:

(eval-after-load "hyperref"
    '("href" [ (TeX-arg-key-val LaTeX-hyperref-href-options) ]
      (TeX-arg-file "URL") "Text" ignore)))
  • Thanks, but it doesn't start in the local direcotry (but in root) and it seems to have permission problems if I navigate to my home dir.
    – Julia
    Sep 10, 2015 at 11:20
  • It does start form current directory for me. TeX-arg-file is based on `read-file-name', are you sure you don't have some customizations influencing its behavior?
    – giordano
    Sep 10, 2015 at 11:28
  • I tried to narrow it down by commenting out piece by piece in my .emacs. It seems to interfer with (helm-mode 1)
    – Julia
    Sep 10, 2015 at 12:29
  • I use helm too and I don't have this problem.
    – giordano
    Sep 10, 2015 at 12:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.