-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Add predicate to exclude open files from being added to recentf #5280
Conversation
This should clear all the org files loading from |
(spacemacs//file-was-viewed-p file)))) | ||
|
||
;; And, of course, you now need: | ||
(setf recentf-keep '(spacemacs//recentf-viewed-predicate))))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why setf
and not add-to-list
? By overriding the existing value, we risk interfering with user's personal configuration.
Maybe I met a new issue here or maybe not. But I'd like to ask you guys first ... If I set the
then the But if I change the order of the startup list like as follows,
then the I don't know why this happened... I really want the agenda list to be at the top of the home buffer without affecting the |
@bmag, awesome I didn't realize recentf-keep accepted lists of funcs. Will update the PR. |
@kccai, is this after applying this PR, or in the current develop branch? |
@Ralesi |
fb1f8c8
to
7af9fca
Compare
@bmag, I updated with your suggestions, much better just adding to the |
@kccai , I do not see the same issue as you. Perhaps you can make an issue with the steps to repo? |
@Ralesi Thanks, I will check it again and create an issue if this problem persists. |
I am finding that org files are still being added, testing out applying changes as an exclude predicate. |
What's the status on this PR ? |
@syl20bnr, I have got it working, but if agenda is listed before recent files in the startup list, the org files still get added. Will get it fixed and update the PR tonight. |
@Ralesi thank you 👍 |
@syl20bnr , I take that back. I cannot come up with a method to keep the If anyone else has other ideas to get this to work consistently with the additional org file loading at startup, I would be open to ideas. |
7af9fca
to
5f70352
Compare
@syl20bnr, i updated and the current implementation works for me. I created a variable that will bypass recentf saving if let bound. I have also bound it on my call to org-refile in my own config to prevent that function from adding all the org files to my recent list. |
Fixes #4973 , recentf will no longer add files to the list that have never been viewed.