Be smarter about moving to the next entry after an action#143
Conversation
Choosing the 'next-entry' can now be customised.
Move point backwards rather than forwards if there's an unread entry behind and a read entry ahead. Handy for moving through te list from bottom to top.
|
Interesting, I hadn't expected extension here. I don't object to the As a side note, outside of certain compiler bugs, running the test suite |
|
I agree with the notion that the defaults should be obvious, but I'd love to have the option to enable this since I very often read a given day's feeds from bottom to top. |
|
This would be useful for me as well, most of the time I read things from the bottom, sometimes marking them as 'read', and it mildly annoyed me to have to manually move the cursor each time. I fooled around, modifying And then I found this PR, so ended up simply advising the function: I'm not suggesting anything, just posting it here, maybe someone finds it useful. |
|
I agree that this patch, if accepted, should be shielded behind defcustom: move next entry, previous entry, next unread, previous unread. Although, I feel that moving to unerad may lead to unexpected results if the use case involves marking items read selectively (not one by one from top to bottom or from bottom to top). So, maybe the direction needs to be customizeable. There are also at least two users who expressed interest, so probably it is worth merging. |
|
Also, there is |
|
@yantar92 Honestly I prefer the setting |
|
Alternatively one could consider to install a local post command hook in the search buffer, and then parametrize it for only a few commands, where movement makes sense. The current hard coded behavior is not great. |
|
Daniel Mendler ***@***.***> writes:
@yantar92 Honestly I prefer the setting `elfeed-search-remain-on-entry`. For most operations it does not really make sense in my opinion to move to the next entry (for exampling yanking). Of course for showing the entry ("RET"), moving to the next entry is somewhat useful. But then, if you jump to the show buffer, you can simply press "n" there, to continue. Therefore I am not sure if we really need this patch, and I would hold it back for a bit longer. If we decide to implement a smarter move, I would introduce a more generalized variable elfeed-next-entry-function and offer some options there.
+1 about generalized variable.
Maybe even something like `((yank . move-function-for-yank) (read
. move-function-for-read) ...)`. Akin `org-fold-show-context-detail`.
There is indeed no rush. Not after this being on hold for years.
…--
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
|
Indeed, this is what I had in mind. I think this variable should then also supersede elfeed-search-remain-on-entry. |
The variable can also hold a list of action symbols (show, browse, yank, tag).
For these actions point is not moved to the next entry. For example:
(setq elfeed-search-remain-on-entry '(browse show yank))
See #143
|
I added a simple generalization of |
Add an extension point
elfeed-search-next-entryand call it instead of the hard-codedforward-lineafter performing an action such as tagging/untagging.Instead of always moving forward, move back if it looks like you're reversing up the search results.
Maybe there's a fancier algorithm?