Skip to content

kijimaD/ob-git-permalink

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MELPA Test

Org-Babel support for evaluating permalink and insert source code.

Screenshot from 2023-02-05 02-05-58

👇Evaluate org-babel(C-c C-c)

Screenshot 2023-02-11 17:45:12b

Installation

M-x package-install RET ob-git-permalink RET

Usage

#+begin_src git-permalink
https://github.com/emacs-mirror/emacs/blob/a4dcc8b9a94466c792be3743760a4a45cf6e1e61/lisp/emacs-lisp/ring.el#L48-L52
#+end_src

↓ evaluate(C-c)

(defun ring-p (x)
  "Return t if X is a ring; nil otherwise."
  (and (consp x) (integerp (car x))
       (consp (cdr x)) (integerp (cadr x))
       (vectorp (cddr x))))

How to get permalink?

Other notation

The results shown below are same.

#+caption: Emacs README
#+begin_src git-permalink :url https://github.com/emacs-mirror/emacs/blob/a4dcc8b9a94466c792be3743760a4a45cf6e1e61/README#L1-L2
#+end_src
#+RESULTS:
: Copyright (C) 2001-2022 Free Software Foundation, Inc.
: See the end of the file for license conditions.

TODO

  • support other hosting service(GitLab, Bitbucket...)