Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emacs auto save files are not shown even when dot file visibility is enabled #1088

Open
simurgh9 opened this issue Jan 23, 2024 · 5 comments

Comments

@simurgh9
Copy link

Emacs stores temporary dot files, e. g., program.c when edited and unsaved for auto-saved-timeout seconds will be copied to something like .#program.c and written on disk. This file shows up as output of ls -a but is not shown even after t h in treemacs.

Is this the expected behaviour? If yes, is there a way to make these visible in treemacs?

@Alexander-Miller
Copy link
Owner

That is intentional. By default treemacs does not show lock, backup, autosave and flycheck temp files. and the .git directory.

The behavior is controlled by treemacs-ignored-file-predicates which by default contains treemacs--std-ignore-file-predicate which filters all these files. For .git there's also treemacs-hide-dot-git-directory.

@simurgh9
Copy link
Author

I don't usually want to see these files but do you think a toggle for their visibility could be easily achieved?

Copy link

stale bot commented May 16, 2024

This issue has been automatically marked as stale because it has not had recent activity (this bot only works as a reminder, it will not close issues).

@stale stale bot added the stale label May 16, 2024
@Alexander-Miller
Copy link
Owner

I don't want to build individual toggles for every single file treemacs could ignore, it's not worth the maintenance and complexity effort on my end. However building something for yourself would be pretty simple, as long as you're okay with changing treemacs' entire filter. Just do something like this

(defun filter-toggle ()
  (interactive)
  (if (member #'treemacs--std-ignore-file-predicate treemacs-ignored-file-predicates)
      (setf treemacs-ignored-file-predicates
            (delete #'treemacs--std-ignore-file-predicate treemacs-ignored-file-predicates))
    (setf treemacs-ignored-file-predicates
          (cons #'treemacs--std-ignore-file-predicate treemacs-ignored-file-predicates))))

@stale stale bot removed the stale label May 16, 2024
Copy link

stale bot commented Jul 18, 2024

This issue has been automatically marked as stale because it has not had recent activity (this bot only works as a reminder, it will not close issues).

@stale stale bot added the stale label Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants