Skip to content

Conversation

@Boruch-Baum
Copy link

  • Establishes bm-suggest-annotation-alist mapping buffer major-modes
    to suggestion functions

  • Provides sample functions for emacs-lisp-mode and org-mode

  • Integrates the feature into functions bm-bookmark-annotate and
    bm-bookmark-add

  • Provide a bookmark's current annotation, if it exists.

  • When adding a bookmark, the annotation prompt to the user must
    happen before the bookmark is created because the user can always
    abort the process (eg. C-g) leaving us with only a partially
    configured bookmark.

  • Snuck in: Give the user feedback on successful bookmark creation and
    removal.

+ Establishes bm-suggest-annotation-alist mapping buffer major-modes
  to suggestion functions

+ Provides sample functions for emacs-lisp-mode and org-mode

+ Integrates the feature into function bm-bookmark-annotate

+ Provide a bookmark's current annotation, if it exists.

+ When adding a bookmark, the annotation prompt to the user must
  happen before the bookmark is created because the user can always
  abort the process (eg. C-g) leaving us with only a partially
  configured bookmark.

+ Snuck in: Give the user feedback on successful bookmark creation and
  removal.
@joodland
Copy link
Owner

joodland commented May 5, 2021

Thank you for submitting a pull request, but it is hard to review it when you rewrite the code and add new functionality at the same time.

I like the idea of creating suggestions for annotations but part of the pull request is too specific. I think adding support for creating suggestions makes sense, but the elisp- and org-mode functions should be excluded.

(buffer-substring (match-beginning 0) (match-end 0))
""))

(defun bm--suggest-annotation (&optional bm)
Copy link
Owner

Choose a reason for hiding this comment

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

This should be an extension point rather than a specific function. Then users can add the specifics themselves.

bookmark)
(when (and (not annotation) bm-annotate-on-create)
(setq annotation
(read-from-minibuffer "Annotation: "
Copy link
Owner

Choose a reason for hiding this comment

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

This code is not calling bm-bookmark-annotate() but instead duplicating parts of that code.

@Boruch-Baum
Copy link
Author

Boruch-Baum commented May 6, 2021 via email

@Boruch-Baum
Copy link
Author

Boruch-Baum commented May 6, 2021 via email

@Boruch-Baum
Copy link
Author

Any chance of this and my other PR getting merged anytime soon? I ask because I have another PR ready, to make bm play nicely with show-paren-mode. What I mean is that when show-paren-mode is set to highlight an expression, setting a bookmark at an open-paren combines the bm-face with the show-paren-face, and in my case the result is unreadable. So I have a mitigation that others may find useful.

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.

2 participants