How can I get Emacs to ignore, say, both .pdf and .PDF files without listing both ".pdf" and ".PDF" in completion-ignored-extensions?

  • The question seems unclear. (1) Do you want to ignore only the file names .pdf and .PDF or any file name that ends in those? (2) Ignore where/when? Just during completion when reading a file name (e.g. read-file-name)? – Drew Nov 10 '18 at 18:52

Guessing that you want to include file names that end in .pdf and .PDF, except for the two file names that are just those strings (nothing before the dot).

If you use Icicles then you can do this by setting or binding option icicle-file-no-match-regexp to a regexp that excludes matching file-name candidates. You could use "^[.]pdf$" (or "^[.][pP][dD][fF]$").

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.