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

Add a magit-todos-follow-mode #83

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

maxc01
Copy link

@maxc01 maxc01 commented Jul 5, 2019

When in magit-todos-mode, we can use n, C-n, or <down> to directly navigate to the associated file of the next todo item and use p, C-p, or <up> to directly navigate to the associated file of the previous todo item.

@alphapapa
Copy link
Owner

Hi,

Thanks, this looks like a useful feature. I'll post a few comments as a review.

README.org Outdated Show resolved Hide resolved
magit-todos.el Outdated Show resolved Hide resolved
magit-todos.el Outdated Show resolved Hide resolved
magit-todos.el Outdated Show resolved Hide resolved
magit-todos.el Show resolved Hide resolved
@maxc01
Copy link
Author

maxc01 commented Jul 8, 2019

B.t.w, it is not easy for human eyes to follow the line when performing magit-todos-peek-at-item, especially when navigating todos fast using magit-todos-next-todo. It seems better to highlight the peeked line, or use a overlay, or just center the popped buffer.

Copy link
Owner

@alphapapa alphapapa left a comment

Choose a reason for hiding this comment

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

B.t.w, it is not easy for human eyes to follow the line when performing magit-todos-peek-at-item, especially when navigating todos fast using magit-todos-next-todo. It seems better to highlight the peeked line, or use a overlay, or just center the popped buffer.

This may depend on your personal Emacs configuration. As far as I know, peeking at the item should display it in the "peeking" window.

It could be helpful to display a highlight or overlay, but I'd prefer to avoid adding code to that effect unless it's really necessary. Users can use advice to do that if they want.

magit-todos.el Show resolved Hide resolved
magit-todos.el Show resolved Hide resolved
magit-todos.el Outdated Show resolved Hide resolved
magit-todos.el Outdated Show resolved Hide resolved
README.org Outdated
@@html:<kbd>@@p@@html:</kbd>@@, @@html:<kbd>@@C-p@@html:</kbd>@@,
@@html:<kbd>@@<up>@@html:</kbd>@@ to follow the file of the previous todo item.
Activate =magit-todos-follow-mode= in the to-do buffer, use:
+ @@html:<kbd>@@n@@html:</kbd>@@ :: Follow the next todo item and display the corresponding file
Copy link
Owner

Choose a reason for hiding this comment

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

Please use this text, like the previous list:

Peek at the (next|previous) item.

Copy link
Author

Choose a reason for hiding this comment

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

If you want the command list looks consistent, it maybe better to use
Peek at the next item when =magit-todos-follow-mode= is activated.
Peek at the previous item when =magit-todos-follow-mode= is activated.
What do you think? You can always edit my branch if you want. :)

@alphapapa
Copy link
Owner

Note that I just pushed some new code to master, so please rebase it.

@alphapapa alphapapa force-pushed the master branch 4 times, most recently from 7648995 to 8f634a2 Compare July 9, 2019 09:54
@alphapapa
Copy link
Owner

@maxc01 Looking at this again, and having learned how well the M-g M-n keybinding works in, e.g. Occur and Xref buffers, I wonder if that might be a better way to implement this feature. What do you think? If you're still interested, that is. :)

@alphapapa alphapapa added the enhancement New feature or request label Aug 11, 2021
@alphapapa alphapapa removed this from the 1.6 milestone Aug 11, 2021
@maxc01
Copy link
Author

maxc01 commented Aug 16, 2021

Hi @alphapapa , sorry for the late reply. Current I am using rg.el and have defined a todo search in the current project. It supports follow mode out-of-the-box. It lacks the fancy interface provided by your package, but it works for me fairly well.

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

Successfully merging this pull request may close these issues.

2 participants