spacemacs/layers/+emacs/org/funcs.el
2016-07-05 00:23:16 -04:00

38 lines
1.1 KiB
EmacsLisp
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

;;; funcs.el --- Org Layer functions File for Spacemacs
;;
;; Copyright (c) 2012-2016 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
(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)))
(defun org-projectile/goto-todos ()
(interactive)
(org-projectile:location-for-project (projectile-project-name)))
(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)))
(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")))