Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 457759
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T22:36:11+00:00 2026-05-12T22:36:11+00:00

How do I prevent Emacs from showing me all the files I’m not interested

  • 0

How do I prevent Emacs from showing me all the files I’m not interested in (such as ~ backup files, .pyc files, or .orig files) when I: C-x C-f TAB ?

It is working in one respect: if I know the file I want to open begins with foo and I type foo TAB then the mini-buffer correctly autocompletes all the way to foo.py. It correctly ignored foo~ and foo.pyc, because both ~ and .pyc are in completion-ignored-extensions. It also correctly lets me open either ignored file if I really want to by typing in all the letters my self.

However, if I just hit TAB to to bring up the completion list buffer then that list includes files with extensions in completion-ignored-extensions, which makes it very difficult to find what I’m looking for.

Clearly the code to ignore uninteresting files is there and working. How do I get the completion list buffer to respect completion-ignored-extensions?

(by-the-by, can I make dired behave similarly?)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T22:36:12+00:00Added an answer on May 12, 2026 at 10:36 pm

    This piece of advice filters out files with extensions listed in 'completion-ignored-extensions:

    (defadvice completion--file-name-table (after 
                                            ignoring-backups-f-n-completion 
                                            activate)
      "Filter out results when they match `completion-ignored-extensions'."
      (let ((res ad-return-value))
    (if (and (listp res)
         (stringp (car res))
         (cdr res))                 ; length > 1, don't ignore sole match
        (setq ad-return-value
                  (completion-pcm--filename-try-filter res)))))
    

    Note: This doesn’t affect dired.

    For the dired issue, add this to your .emacs

    (eval-after-load "dired"
      '(require 'dired-x))
    
    (add-hook 'dired-mode-hook
              (lambda ()
                (dired-omit-mode 1)))
    

    Read the documentation for dired-x to get an idea of what’s available there.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How do I prevent Emacs from creating backup copies of buffers I don't wish
I would like to prevent NaN from showing up in these text boxes: total_full,
I'm trying to prevent certain keys from being entered into an input box, but
I'm trying to prevent an associated record from being deleted if it has associated
I want to prevent my activity from restarting when I change the orientation from
How do I prevent Cyclone from converting the code? I mean, I want this
How to prevent sum(f)=0 from insert? INSERT INTO `t_1` (a,b,c) SELECT d,e,sum(f) GROUP by
So far this is all I have in my .emacs: (when (load (expand-file-name ~/.emacs.d/elpa/package.el))
I'm working on a completion (intellisense) facility for C# in emacs. The idea is,
Would it prevent, for example, session hijacking? If not, what can I do to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.