2016-04-04 14:09:59 +00:00
|
|
|
|
;;; funcs.el --- Org Layer functions File for Spacemacs
|
|
|
|
|
;;
|
2017-01-06 03:51:13 +00:00
|
|
|
|
;; Copyright (c) 2012-2017 Sylvain Benner & Contributors
|
2016-04-04 14:09:59 +00:00
|
|
|
|
;;
|
|
|
|
|
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
|
|
|
|
;; URL: https://github.com/syl20bnr/spacemacs
|
|
|
|
|
;;
|
|
|
|
|
;; This file is not part of GNU Emacs.
|
|
|
|
|
;;
|
|
|
|
|
;;; License: GPLv3
|
|
|
|
|
|
2016-06-14 09:35:54 +00:00
|
|
|
|
(defun org-projectile/capture (&optional arg)
|
|
|
|
|
(interactive "P")
|
|
|
|
|
(if arg
|
|
|
|
|
(org-projectile:project-todo-completing-read nil :empty-lines 1)
|
|
|
|
|
(org-projectile:capture-for-current-project nil :empty-lines 1)))
|
2016-04-04 14:09:59 +00:00
|
|
|
|
|
2016-06-14 09:35:54 +00:00
|
|
|
|
(defun org-projectile/goto-todos ()
|
2016-04-04 14:09:59 +00:00
|
|
|
|
(interactive)
|
2016-06-14 09:35:54 +00:00
|
|
|
|
(org-projectile:location-for-project (projectile-project-name)))
|
2016-04-30 02:47:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defun spacemacs/ob-fix-inline-images ()
|
|
|
|
|
"Fix redisplay of inline images after a code block evaluation."
|
|
|
|
|
(when org-inline-image-overlays
|
|
|
|
|
(org-redisplay-inline-images)))
|
2016-04-19 10:29:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defun spacemacs//surround-drawer ()
|
|
|
|
|
(let ((dname (read-from-minibuffer "" "")))
|
|
|
|
|
(cons (format ":%s:" (upcase (or dname ""))) ":END:")))
|
|
|
|
|
|
|
|
|
|
(defun spacemacs//surround-code ()
|
|
|
|
|
(let ((dname (read-from-minibuffer "" "")))
|
|
|
|
|
(cons (format "#+BEGIN_SRC %s" (or dname "")) "#+END_SRC")))
|