How can I check if a file exists using Emacs Lisp?

前端 未结 3 1847
萌比男神i
萌比男神i 2021-02-01 12:09

I would like emacs to mark files that are generated as read-only when they\'re opened. The part of the puzzle that I\'m missing is how to check if a file \"exists\". I current

3条回答
  •  日久生厌
    2021-02-01 12:35

    • Depending on what you need, you might want file-readable-p instead of file-exists-p.

    • Apropos will only get you so far. Icicles provides apropos completion and progressive completion which let you find help easily for command, function, variable, etc. names that match subparts in an arbitrary order (is it file-exists-p or exists-file-p?).

提交回复
热议问题