If I try to open a file whose filename is ~/A/b/C@d.yaml, Emacs will interpret that I want to send an email to the address C@d.yaml, and in the minibuffer I have mailto:C@d.yaml.

What could I do so that I can keep @ in the filename?

I use helm-find-file if that matters.

  • Please provide a recipe to reproduce what you see, starting from emacs -Q. If helm-find-file is not required for the recipe then leave it out (and remove the helm tag in that case. IOW, please provide a fairly minimal recipe. With just emacs -Q I don't see that when using C-x C-f (find-file). – Drew Dec 14 '17 at 23:58
  • Does this happen when you launch emacs without your init file (emacs -Q)? If not, recursively bisect your init file (comment out successive halves until you isolate the problem). – Dan Dec 14 '17 at 23:59

It is a feature of helm-find-files, when your point is on URL, such as "http://example.com" and "foo@example.com", helm-find-files guesses you want to "open" these link. To avoid this, you can move your point from "C@d.yaml" to "~/A/b/", then it will thinks it's a file path at point.


If you don't need or want this feature at all, you can turn off via helm-ff-guess-ffap-urls, i.e.,

(setq helm-ff-guess-ffap-urls nil)

helm-ff-guess-ffap-urls is a variable defined in ‘helm-files.el’.
Its value is t

Use ffap to guess local urls at point in ‘helm-find-files’. This doesn’t disable guessing filenames at point, see ‘helm-ff-guess-ffap-filenames’ for this.

You can customize this variable.

| improve this answer | |
  • thanks for your answer, this is exactly what i am looking for. – yi.tang.uni Dec 17 '17 at 19:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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