* Robert Weiner <r...@gnu.org> [2022-06-27 03:51]: > (defun youtube-url-from-time (video-link time-string) > "Given a VIDEO-LINK and a colon-separated TIME-STRING, e.g. 2:44 (two > minutes, 45 seconds into the video), return the url to play from that point > in the video. > Return nil if TIME-STRING is invalid." > (when (setq time-string (youtube-normalize-time time-string)) > (format "%s&t=%s" > (youtube-normalize-link video-link) > time-string)))
Thanks for functions, I will not them down. I was collecting YouTube video links directly from YouTube, so they look like: Dog stands up: https://youtu.be/LtCmlyKxKUU?t=384 And I can use your functions to improve system later. > Then once you load the Hyperbole package, in any buffer you could use any > of the 3 buttons below which all do the same thing when pressed upon with > the Action Key, {M-RET}: > > <youtube-play-from-time "WKwZHSbHmPg" "2:44"> > <youtube-play-from-time "www.youtube.com/watch?v=WKwZHSbHmPg" "2:44"> > <youtube-play-from-time "https://www.youtube.com/watch?v=WKwZHSbHmPg" > "2:44"> I have totally got the idea how it is analogue to eev styles of links. What bothers me is the fact that links are ugly and not user friendly. I would prefer some interpolation like Org does it with Org links, so that links are shown as their names: - Instruction on how to break the egg, cleaning of eggs; - Using glass edge to break the egg; Something like that, hyperlinked, in every buffer. > an implicit button type that recognized strings like "yt:WKwZHSbHmPg@2:44" > and invoked the calls shown above. Just that it does not look nice. It misses the "name" part of the link, just as in HTML. We shall work towards better representation of links. -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns In support of Richard M. Stallman https://stallmansupport.org/