New feature: bb-jump: quickly navigate directly to any bm#37
Open
Boruch-Baum wants to merge 2 commits intojoodland:masterfrom
Open
New feature: bb-jump: quickly navigate directly to any bm#37Boruch-Baum wants to merge 2 commits intojoodland:masterfrom
Boruch-Baum wants to merge 2 commits intojoodland:masterfrom
Conversation
Owner
|
I am not getting this to work properly:
Isn't this use-case already solved by the functionality of bm-show and bm-show-all? |
Author
|
On 2021-05-05 13:01, Jo Odland wrote:
I am not getting this to work properly:
* No auto-complete in the minibuffer just a history list to scroll up
or down.
It's using the standard emacs function 'completing-read' so how-ever you
personally have that set up for completion should work. You can see on
line 59 that a collection is being given as the second arg to completing
read and NO history argument is being provided. Maybe you need to press
TAB twice? There are many front ends for completing-read (eg. helm, ido,
ivy, icicles) so it may depend on what you have installed.
* Jumping to a bookmark in a buffer other than the current buffer
does not work.
That's a bug. It should be fixed if between lines 597-598 you add:
(pop-to-buffer (overlay-buffer (cadr decision)))
so:
(when (setq decision (assoc decision candidates))
(goto-char (overlay-start (cadr decision))))))
becomes:
(when (setq decision (assoc decision candidates))
(pop-to-buffer (overlay-buffer (cadr decision)))
(goto-char (overlay-start (cadr decision))))))
Can this use-case be solved by the functionality of bm-show?
I wanted to offer something quicker, that didn't entail creating a new
buffer, and then needing to navigate through it. The behavior is modeled
on the behavior of the emacs 'C-x r d' (M-x bookmark-jump), but with a
prettier and more informative display.
Strange / curious about the lack of auto-complete, though. Do you have
any more details to share about that?
Also, let me know if you're ok with the additional line at 597-598
Did you get a chance to look at the other PR?
…--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0
|
joodland
reviewed
May 5, 2021
| "Jump to bookmark: " | ||
| (mapcar 'car candidates) nil t))) | ||
| (when (setq decision (assoc decision candidates)) | ||
| (goto-char (overlay-start (cadr decision)))))) |
Owner
There was a problem hiding this comment.
I understand that the bookmark is not available, but I don't like that jumping to a bookmark is done without using bm-goto() since there are more things happening in addition to the jump.
Author
|
On 2021-05-05 15:27, Jo Odland wrote:
I understand that the bookmark is not available, but I don't like that
jumping to a bookmark is done without using bm-goto() since there are
more things happening in addition to the jump.
I don't understand. If you're saying to just replace the the line (now
two lines) with function bm-goto, just do it! What's the big deal, then?
Are you asking me to do it?
…--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Inspired by function
bookmark-jumpfrom emacs-core packagebookmark.elList of bookmarks are presented as mini-buffer completion candidates
Presentation includes enhanced fontification of each bookmark's file name and line number.