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

Separate compile-history #1601

Merged
merged 1 commit into from Nov 24, 2020
Merged

Separate compile-history #1601

merged 1 commit into from Nov 24, 2020

Conversation

TxGVNN
Copy link
Contributor

@TxGVNN TxGVNN commented Nov 19, 2020

Hi @bbatsov, The first thank you for the great package.

I would like to send a PR, that is useful for me.

projectile-compile will have separated compile-history by using projectile--get-command-history. If something needs to be improved please tell me, I will try to resolve it.

Hope it is useful!

Before submitting a PR make sure the following things have been done (and denote this
by checking the relevant checkboxes):

  • The commits are consistent with our contribution guidelines
  • You've added tests (if possible) to cover your change(s)
  • All tests are passing (eldev test)
  • The new code is not generating bytecode or M-x checkdoc warnings
  • You've updated the changelog (if adding/changing user-visible functionality)
  • You've updated the readme (if adding/changing user-visible functionality)

Thanks!

'(compile-history . 1)
'compile-history)))
(let ((compile-history
(ring-elements (projectile--get-command-history (projectile-ensure-project (projectile-project-root))))))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't quite get how this is supposed to work, so can you explain it in more details?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, I see the package has projectile--get-command-history function. It provides command history per project.

I would like to separate the command history per project. So I tried to set compile-history value from projectile--get-command-history (I think it as reference/a pointer). And I see it works. I ever did xref--marker-ring with the same idea.

If you ask me in detail how it works, I don't think I know the deep

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was mostly curious why do you need ring-elements here, but I assume you copied it from somewhere else in the code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bbatsov
Copy link
Owner

bbatsov commented Nov 21, 2020

This change will need a changelog entry. I'll also have to see what's happened with the CI.

@bbatsov bbatsov merged commit 0d52268 into bbatsov:master Nov 24, 2020
@Zalewa
Copy link

Zalewa commented Jan 11, 2021

Unfortunately I have to complain that this change (I bisected and arrived at the commit 0d52268) has broken the compile history completely for me. The commands executed from projectile-compile-project are no longer saved anywhere into ~/.emacs.d and neither they are loaded. Each time I start up Emacs, the history in projectile-compile-project is empty. The history in compile works good. Reverting the commit 0d52268 fixes the problem. Reported this as #1637.

@kira-bruneau
Copy link
Contributor

I think it's a great idea to have a separate compile history for each project, but I have the same problem as @Zalewa and reverting commit 0d52268 also fixes the problem for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants