emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: stardiviner <numbchild@gmail.com>
To: org-mode <emacs-orgmode@gnu.org>
Subject: Need help on write new link type for link URI.
Date: Sat, 14 Apr 2018 17:45:09 +0800	[thread overview]
Message-ID: <87d0z2i0ka.fsf@gmail.com> (raw)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

I have following code, check out the FIXME: comment tag.
How to get the correct link here?
,----
| ;;; `video:filename.mp4::start_timestamp'
| (defcustom org-video-link-open-command "mplayer"
|   "Specify the program for openning video: link."
|   :type 'string)
| 
| (defun org-video-link-open (uri)
|   "Open video file `URI' with video player."
|   (let* ((list (split-string uri "::"))
|          (path (car list))
|          (start-timstamp (cadr list)))
|     (shell-command
|      (format
|       "%s -ss %s %s"
|       ;; FIXME: path has issue.
|       org-video-link-open-command start-timstamp (org-link-unescape path)))))
| 
| (org-link-set-parameters "video"
|                          :follow #'org-video-link-open
|                          :complete #'org-file-complete-link)
`----

- -- 
[ stardiviner ] don't need to convince with trends.
       Blog: https://stardiviner.github.io/
       IRC(freenode): stardiviner
       GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
      
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAlrRzaUACgkQG13xyVro
msP3nwf+JXnDDnnAgBuvBjkATJWuNryX5twTex/LBrqq9IP66j4DUC9ypmYIgpJ+
zVt/I1u7niGnyiMOtNotG7VJTae68HeDFQhMdURycI3gG6gUeoQw21bscQ7PYyl3
9Bx6xnLsJ6/XkPd3OnKbuNmI91B7b8x7KGCc6we2Atz27QKDPu9Z5Bcq2mdpsIBs
U8vXH/cNeFC1n10uCMW08WhSpiRoqPgtzYUHDSywWcl38bh+9PUwJxiwEKI/wgrh
OJXbLoiNxFakOcxvKwTrFEGWBEen8hMBOzAIm1L4y0eTUPbJiPO8sbOH2zCBokVZ
Wbk1Y7N1QJMTWZIpS86RmS5ZPYVxng==
=LYgd
-----END PGP SIGNATURE-----

             reply	other threads:[~2018-04-14  9:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-14  9:45 stardiviner [this message]
2018-04-26 23:34 ` Need help on write new link type for link URI Bastien
2018-04-28 13:15 ` how to convert org file: link path into shell path? stardiviner
2018-04-28 13:28   ` Bastien
2018-04-29 14:34     ` stardiviner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d0z2i0ka.fsf@gmail.com \
    --to=numbchild@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).