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

Allow customization of link text #4

Merged
merged 7 commits into from Feb 16, 2021
Merged

Conversation

@legalnonsense
Copy link
Contributor

@legalnonsense legalnonsense commented Feb 15, 2021

This is the second time I've ever tried a pull request, so bear with me if I didn't do this correctly.

I added some features I needed for this package to be useful to me:

  1. allow user to customize the link text using a string with replacement strings. See org-media-note-link-format. This also requires org-media-note--link-formatter;
  2. custom option to move cursor to before the link text after it is inserted;
  3. custom option to add a prefix string to link text that is not part of the link;
  4. interactive function to insert a link and pause the video (to be able to take a note during the pause).

No idea if you like any of these features or the code, but wanted to share in case they were useful.

@yuchen-lea
Copy link
Owner

@yuchen-lea yuchen-lea commented Feb 15, 2021

Oh! I'm soooooooo happy to receive your PR. I just start writing elisp package and this is my first PR received. Your features are greatly welcome. It may takes some time to merge since there're a lot to learn from your code ;)

Loading

@legalnonsense
Copy link
Contributor Author

@legalnonsense legalnonsense commented Feb 15, 2021

It is a very useful package and if I can be of any help I am happy to. Tried to use emms to do something similar and it was buggy. This just seems to work. Thank you for sharing!

Loading

@yuchen-lea yuchen-lea merged commit 955b0b7 into yuchen-lea:master Feb 16, 2021
@yuchen-lea
Copy link
Owner

@yuchen-lea yuchen-lea commented Feb 16, 2021

I've made some modifications based on your pr:

  1. 89c527d I change some default value of the variable you defined, in order to keep consistent with the previous behavior. Maybe you need set your own preference in config.
  2. 7604424 org-media-note-insert-link-and-pause is removed and use variable org-media-note-pause-after-insert-link instead. When non-nil, the media file will pause after insert link both for manually calling org-media-note-insert-link, and auto insering links in a list (org-media-note-item). Also, you can toggle the variable by org-media-note-toggle-pause-after-insertion, which can be accessed from hydra menu directly. I think it's a more general way, although I'm not sure whether this fits your need.

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants