-
Notifications
You must be signed in to change notification settings - Fork 40
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
custom prodigy columns #121
custom prodigy columns #121
Conversation
I think it's pretty neat idea, I often run multiple versions of the same service as well. But for me a docker tag would be more useful :D |
Would be great if this could be done as a plugin instead. Git is too specific. |
For running docker containers I use docker.el, how do you run them in prodigy, could you link me to an example? :) |
As a plugin, do you mean, that the user could configure it's own columns via defcustom? Basically getting |
@FrancescElies docker.el is not very great with compose so I use prodigy to start compose stacks. I also use I think this is "pluggable" enough but maybe rename "branch" to "git" or something to make it clear this is only git related, after all, mercurial or svn has branches too. [edit: or use I'm not sure starting a separate repository for this is worth it. Flycheck bundles a lot of checkers and it works fine for them, I think we can ship "additional columns" in this project similarly. |
I agree that git is better than branch. Creating a plugin only for git might be a bit excessive, but at the same time, I don't like assuming that everyone uses Git. One alternative would be to create a |
prodigy.el
Outdated
("Tags" 25 nil)] | ||
"List format.") | ||
(defconst prodigy-default-list-columns | ||
'((func prodigy-marked-col format ("Marked" 6 t :right-align t)) |
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.
I think it's generally better to use :keywords
over 'symbols
in plists
I like this setup. I still think that we should keep the extra stuff in this repository. I don't particularly like the situations where there is 5 million trivial packages as "plugins" for a package, it does not feel very Emacs-y. We can have a file |
I moved columns' related code to CI failing though, I seem not to understand the loading process in emacs :/, I believe I need to modify the How can I make |
You should put |
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.
Can you also add a note about this in the README?
prodigy-columns.el
Outdated
@@ -0,0 +1,102 @@ | |||
;;; prodigy.el --- Manage external services from within Emacs -*- lexical-binding: t; -*- |
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.
This is wrong
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.
Copy paste mistake, my bad. Added 7c9e9e4
prodigy-columns.el
Outdated
|
||
(defun prodigy-columns () | ||
"Join default, additional and custom defined `prodigy' columns" | ||
(append prodigy-default-list-columns prodigy-additional-list-columns prodigy-custom-list-columns)) |
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.
Where is prodigy-additional-list-columns prodigy-custom-list-columns
defined?
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.
Thanks for having a look at this.
I am not sure if I understand the question.
In the previous lines in this file one finds defined:
defconst prodigy-default-list-columns
: default columns, always shown (marked, name, status & tags).defcustom prodigy-additional-list-columns
: user can tick a checkbox to activate them (at the moment onlyprodigy-git-branch-col
available).defcustom prodigy-custom-list-columns
: user could add it's own defined column functions (not sure if useful, but it made sense to me).
I broke test though, I could not manage to make (require 'prodigy-columns)
play nicely inside in prodigy.el
and configure cask properly.
I am open to change/delete anything that does not make sense here, please let me know.
All best
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.
I am not sure if I understand the question
I think Github played me a prank by not showing me the entire diff, never mind.
README.md
Outdated
In the `*prodigy*` buffer, you will always see a table with the following columns. | ||
- **Marked**: Services that you want to perform an action on. | ||
- **Name**: Service name. | ||
- **Status**: Service status |
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.
Missing dot
No? |
I did, but after #121 (comment) if I understood correctly, we might want to have an extra file for that kind of column specific code, that's why I brought it back. I added c5c3962 which deletes that code and So currently I see travis failing with
|
Tests passing now, I squashed all changes on a single commit |
This is a handy feature, is there any chance to see it merged? @rejeep |
Sure! @FrancescElies I added you as a collaborator, feel free to merge when rebased. |
Allows to add user custom defined new columns
ℹ️ Maybe useful to someone else, currently I am using something like (setq prodigy-custom-list-columns
(quote
((:function prodigy-git-branch-col :format
("Git" 25 t)))))
(defun prodigy-git-branch-col (service)
"Return SERVICE git branch.
- Prepend ✏ if something any file in the repository has been modified.
- Prepend ∦ if remote branch and current branch are not in sync."
(-if-let (default-directory (prodigy-service-cwd service))
(my/magit-repolist-branch-status)
""))
(defun my/magit-repolist-branch-status (&optional _id)
(if (magit-git-repo-p default-directory)
(s-trim (s-join " "
`(,(if (magit-anything-modified-p)
"✏")
,(if (not (magit-rev-eq (magit-get-current-branch)
(magit-get-push-branch)))
"∦")
,(or (magit-get-current-branch)
(magit-rev-name "HEAD")))))
"n.a.")
) |
I believe this is not related to changes introduced by this pr. Update: This Issue was reported at rejeep/evm#134 |
I'm closing all old PRs. If you still care, please rebase your branch and reopen the PR. |
Context
Problem: Sometimes I need to checkout different branches for certain processes
running under prodigy. In that situation I would like to see which branches I
checked out.
Description
This pull request adds a new column that could be activated via defcustom.
Todos
prodigy-list-columns
joining prodigy column functions and formatsprodigy-branch-col
Would you eventually interested in something like this?
At the moment looks as follows