update packages
This commit is contained in:
@@ -21,6 +21,16 @@
|
||||
"org-mode blocks for PHP."
|
||||
:group 'org)
|
||||
|
||||
(defcustom org-babel-php-command "php"
|
||||
"The command to execute babel body code."
|
||||
:group 'ob-php
|
||||
:type 'string)
|
||||
|
||||
(defcustom org-babel-php-command-options nil
|
||||
"The php command options to use when execute code."
|
||||
:group 'ob-php
|
||||
:type 'string)
|
||||
|
||||
(defcustom ob-php:inf-php-buffer "*php*"
|
||||
"Default PHP inferior buffer."
|
||||
:group 'ob-php
|
||||
@@ -29,13 +39,12 @@
|
||||
;;;###autoload
|
||||
(defun org-babel-execute:php (body params)
|
||||
"Orgmode Babel PHP evaluate function for `BODY' with `PARAMS'."
|
||||
(let* ((cmd "php")
|
||||
(let* ((cmd (concat org-babel-php-command " " org-babel-php-command-options))
|
||||
(body (concat "<?php\n" body "\n?>")))
|
||||
(org-babel-eval cmd body)
|
||||
))
|
||||
(org-babel-eval cmd body)))
|
||||
|
||||
;;;###autoload
|
||||
(eval-after-load "org"
|
||||
(eval-after-load 'org
|
||||
'(add-to-list 'org-src-lang-modes '("php" . php)))
|
||||
|
||||
(defvar org-babel-default-header-args:php '())
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
))
|
||||
|
||||
;;;###autoload
|
||||
(eval-after-load "org"
|
||||
(eval-after-load 'org
|
||||
'(add-to-list 'org-src-lang-modes '("redis" . redis)))
|
||||
|
||||
(provide 'ob-redis)
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
;; TODO: temporary can't find way to let sclang output to stdout for org-babel.
|
||||
(:output . "none")))
|
||||
|
||||
(eval-after-load "org"
|
||||
(eval-after-load 'org
|
||||
'(progn
|
||||
(add-to-list 'org-src-lang-modes '("sclang" . sclang))))
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ Otherwise prompt the user for the right bookmark to use."
|
||||
:follow #'org-bookmark-open
|
||||
:store #'org-bookmark-store-link)
|
||||
|
||||
(defun org-bookmark-open (bookmark)
|
||||
(defun org-bookmark-open (bookmark _)
|
||||
"Visit the bookmark BOOKMARK."
|
||||
(bookmark-jump bookmark))
|
||||
|
||||
|
||||
@@ -82,12 +82,8 @@
|
||||
:follow #'org-elisp-symbol-open
|
||||
:store #'org-elisp-symbol-store-link)
|
||||
|
||||
(defun org-elisp-symbol-open (path)
|
||||
"Visit the emacs-lisp elisp-symbol at PATH."
|
||||
(let* ((search (when (string-match "::\\(.+\\)\\'" path)
|
||||
(match-string 1 path)))
|
||||
(path (substring path 0 (match-beginning 0))))
|
||||
(org-open-file path t nil search)))
|
||||
(defun org-elisp-symbol-open (symbol arg)
|
||||
(org-link-open-as-file symbol arg))
|
||||
|
||||
(defun org-elisp-symbol-store-link ()
|
||||
"Store a link to an emacs-lisp elisp-symbol."
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
;; bare git link
|
||||
(org-link-set-parameters "gitbare" :follow #'org-gitbare-open)
|
||||
|
||||
(defun org-gitbare-open (str)
|
||||
(defun org-gitbare-open (str _)
|
||||
(let* ((strlist (org-git-split-string str))
|
||||
(gitdir (nth 0 strlist))
|
||||
(object (nth 1 strlist)))
|
||||
@@ -96,7 +96,7 @@
|
||||
;; user friendly link
|
||||
(org-link-set-parameters "git" :follow #'org-git-open :store #'org-git-store-link)
|
||||
|
||||
(defun org-git-open (str)
|
||||
(defun org-git-open (str _)
|
||||
(let* ((strlist (org-git-split-string str))
|
||||
(filepath (nth 0 strlist))
|
||||
(commit (nth 1 strlist))
|
||||
|
||||
@@ -35,10 +35,19 @@
|
||||
:group 'org-link
|
||||
:type '(choice (const man) (const woman)))
|
||||
|
||||
(defun org-man-open (path)
|
||||
(defun org-man-open (path _)
|
||||
"Visit the manpage on PATH.
|
||||
PATH should be a topic that can be thrown at the man command."
|
||||
(funcall org-man-command path))
|
||||
PATH should be a topic that can be thrown at the man command.
|
||||
If PATH contains extra ::STRING which will use `occur' to search
|
||||
matched strings in man buffer."
|
||||
(string-match "\\(.*?\\)\\(?:::\\(.*\\)\\)?$" path)
|
||||
(let* ((command (match-string 1 path))
|
||||
(search (match-string 2 path)))
|
||||
(funcall org-man-command command)
|
||||
(when search
|
||||
(with-current-buffer (concat "*Man " command "*")
|
||||
(goto-char (point-min))
|
||||
(search-forward search)))))
|
||||
|
||||
(defun org-man-store-link ()
|
||||
"Store a link to a README file."
|
||||
@@ -68,6 +77,7 @@ PATH should be a topic that can be thrown at the man command."
|
||||
((eq format 'latex) (format "\\href{%s}{%s}" path desc))
|
||||
((eq format 'texinfo) (format "@uref{%s,%s}" path desc))
|
||||
((eq format 'ascii) (format "%s (%s)" desc path))
|
||||
((eq format 'md) (format "[%s](%s)" desc path))
|
||||
(t path))))
|
||||
|
||||
(provide 'ol-man)
|
||||
|
||||
@@ -191,7 +191,7 @@ with \"t\" key."
|
||||
(let ((folder-or-path (mew-summary-folder-name)))
|
||||
(mew-folder-path-to-folder folder-or-path t))))))
|
||||
|
||||
(defun org-mew-open (path)
|
||||
(defun org-mew-open (path _)
|
||||
"Follow the Mew message link specified by PATH."
|
||||
(let (folder message-id)
|
||||
(cond ((string-match "\\`\\(+.*\\)+\\+\\([0-9]+\\)\\'" path) ; for Bastien's
|
||||
|
||||
@@ -86,7 +86,7 @@ Should accept a notmuch search string as the sole argument."
|
||||
(org-link-add-props :link link :description desc)
|
||||
link)))
|
||||
|
||||
(defun org-notmuch-open (path)
|
||||
(defun org-notmuch-open (path _)
|
||||
"Follow a notmuch message link specified by PATH."
|
||||
(funcall org-notmuch-open-function path))
|
||||
|
||||
@@ -113,7 +113,7 @@ Can link to more than one message, if so all matching messages are shown."
|
||||
:description desc)
|
||||
link)))
|
||||
|
||||
(defun org-notmuch-search-open (path)
|
||||
(defun org-notmuch-search-open (path _)
|
||||
"Follow a notmuch message link specified by PATH."
|
||||
(message "%s" path)
|
||||
(org-notmuch-search-follow-link path))
|
||||
@@ -139,7 +139,7 @@ Can link to more than one message, if so all matching messages are shown."
|
||||
:description desc)
|
||||
link)))
|
||||
|
||||
(defun org-notmuch-tree-open (path)
|
||||
(defun org-notmuch-tree-open (path _)
|
||||
"Follow a notmuch message link specified by PATH."
|
||||
(message "%s" path)
|
||||
(org-notmuch-tree-follow-link path))
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
(org-add-link-props :link link :description desc)
|
||||
link))))
|
||||
|
||||
(defun org-vm-open (path)
|
||||
(defun org-vm-open (path _)
|
||||
"Follow a VM message link specified by PATH."
|
||||
(let (folder article)
|
||||
(if (not (string-match "\\`\\([^#]+\\)\\(#\\(.*\\)\\)?" path))
|
||||
@@ -127,7 +127,7 @@
|
||||
(when article
|
||||
(org-vm-select-message (org-link-add-angle-brackets article)))))
|
||||
|
||||
(defun org-vm-imap-open (path)
|
||||
(defun org-vm-imap-open (path _)
|
||||
"Follow a VM link to an IMAP folder."
|
||||
(require 'vm-imap)
|
||||
(when (string-match "\\([^:]+\\):\\([^#]+\\)#?\\(.+\\)?" path)
|
||||
|
||||
@@ -104,9 +104,10 @@ googlegroups otherwise."
|
||||
(defvar elmo-nntp-default-server)
|
||||
|
||||
(defconst org-wl-folder-types
|
||||
'(("%" . imap) ("-" . nntp) ("+" . mh) ("=" . spool)
|
||||
("$" . archive) ("&" . pop) ("@" . shimbun) ("[" . search)
|
||||
("*" . multi) ("/" . filter) ("|" . pipe) ("'" . internal))
|
||||
'(("%" . imap) ("-" . nntp) ("+" . mh) ("." . maildir)
|
||||
("=" . spool) ("$" . archive) ("&" . pop) ("@" . shimbun)
|
||||
("rss" . rss) ("[" . search) ("*" . multi) ("/" . filter)
|
||||
("|" . pipe) ("'" . internal) )
|
||||
"List of folder indicators. See Wanderlust manual, section 3.")
|
||||
|
||||
;; Install the link type
|
||||
@@ -255,7 +256,7 @@ ENTITY is a message entity."
|
||||
(concat "@" (or (cdr server) (car server))))
|
||||
(if article (concat "#" article) "")))))
|
||||
|
||||
(defun org-wl-open (path)
|
||||
(defun org-wl-open (path &rest _)
|
||||
"Follow the WL message link specified by PATH.
|
||||
When called with one prefix, open message in namazu search folder
|
||||
with `org-wl-namazu-default-index' as search index. When called
|
||||
|
||||
@@ -479,7 +479,7 @@ NEW-MARK and OLD-MARK are the text of the new and old marks."
|
||||
|
||||
;;; Setting it all up
|
||||
|
||||
(eval-after-load "org"
|
||||
(eval-after-load 'org
|
||||
'(progn
|
||||
(add-to-list 'org-todo-setup-filter-hook
|
||||
#'org-choose-setup-filter)
|
||||
|
||||
@@ -210,7 +210,7 @@ This does two different kinds of triggers:
|
||||
(pos (plist-get change-plist :position))
|
||||
(from (plist-get change-plist :from))
|
||||
(to (plist-get change-plist :to))
|
||||
(org-log-done nil) ; IMPROTANT!: no logging during automatic trigger!
|
||||
(org-log-done nil) ; IMPORTANT!: no logging during automatic trigger!
|
||||
trigger triggers tr p1 p2 kwd id)
|
||||
(catch 'return
|
||||
(unless (eq type 'todo-state-change)
|
||||
@@ -367,7 +367,7 @@ this ID property, that entry is also checked."
|
||||
(pos (plist-get change-plist :position))
|
||||
(from (plist-get change-plist :from))
|
||||
(to (plist-get change-plist :to))
|
||||
(org-log-done nil) ; IMPROTANT!: no logging during automatic trigger
|
||||
(org-log-done nil) ; IMPORTANT!: no logging during automatic trigger
|
||||
blocker blockers bl p1 p2
|
||||
(proceed-p
|
||||
(catch 'return
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
;;; org-eldoc.el --- display org header and src block info using eldoc
|
||||
;;; org-eldoc.el --- display org header and src block info using eldoc -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (c) 2014-2020 Free Software Foundation, Inc.
|
||||
|
||||
@@ -114,11 +114,18 @@
|
||||
doc-func)
|
||||
(if (eq 'empty cached-func)
|
||||
(when (fboundp mode-func)
|
||||
(with-temp-buffer
|
||||
(funcall mode-func)
|
||||
(setq doc-func (and eldoc-documentation-function
|
||||
(symbol-value 'eldoc-documentation-function)))
|
||||
(puthash lang doc-func org-eldoc-local-functions-cache))
|
||||
(with-temp-buffer
|
||||
(funcall mode-func)
|
||||
(setq doc-func (if (boundp 'eldoc-documentation-functions)
|
||||
(let ((doc-funs eldoc-documentation-functions))
|
||||
(lambda (callback)
|
||||
(let ((eldoc-documentation-functions doc-funs))
|
||||
(run-hook-with-args-until-success
|
||||
'eldoc-documentation-functions
|
||||
callback))))
|
||||
(and eldoc-documentation-function
|
||||
(symbol-value 'eldoc-documentation-function))))
|
||||
(puthash lang doc-func org-eldoc-local-functions-cache))
|
||||
doc-func)
|
||||
cached-func)))
|
||||
|
||||
@@ -127,7 +134,7 @@
|
||||
(declare-function php-eldoc-function "php-eldoc" ())
|
||||
(declare-function go-eldoc--documentation-function "go-eldoc" ())
|
||||
|
||||
(defun org-eldoc-documentation-function ()
|
||||
(defun org-eldoc-documentation-function (&rest args)
|
||||
"Return breadcrumbs when on a headline, args for src block header-line,
|
||||
calls other documentation functions depending on lang when inside src body."
|
||||
(or
|
||||
@@ -136,10 +143,16 @@
|
||||
(let ((lang (org-eldoc-get-src-lang)))
|
||||
(cond ((or
|
||||
(string= lang "emacs-lisp")
|
||||
(string= lang "elisp")) (if (fboundp 'elisp-eldoc-documentation-function)
|
||||
(elisp-eldoc-documentation-function)
|
||||
(let (eldoc-documentation-function)
|
||||
(eldoc-print-current-symbol-info))))
|
||||
(string= lang "elisp"))
|
||||
(cond ((boundp 'eldoc-documentation-functions) ; Emacs>=28
|
||||
(let ((eldoc-documentation-functions
|
||||
'(elisp-eldoc-var-docstring elisp-eldoc-funcall)))
|
||||
(eldoc-print-current-symbol-info)))
|
||||
((fboundp 'elisp-eldoc-documentation-function)
|
||||
(elisp-eldoc-documentation-function))
|
||||
(t ; Emacs<25
|
||||
(let (eldoc-documentation-function)
|
||||
(eldoc-print-current-symbol-info)))))
|
||||
((or
|
||||
(string= lang "c") ;; http://github.com/nflath/c-eldoc
|
||||
(string= lang "C")) (when (require 'c-eldoc nil t)
|
||||
@@ -154,14 +167,29 @@
|
||||
(string= lang "go")
|
||||
(string= lang "golang")) (when (require 'go-eldoc nil t)
|
||||
(go-eldoc--documentation-function)))
|
||||
(t (let ((doc-fun (org-eldoc-get-mode-local-documentation-function lang)))
|
||||
(when (functionp doc-fun) (funcall doc-fun))))))))
|
||||
(t (let ((doc-fun (org-eldoc-get-mode-local-documentation-function lang))
|
||||
(callback (car args)))
|
||||
(when (functionp doc-fun)
|
||||
(if (functionp callback)
|
||||
(funcall doc-fun callback)
|
||||
(funcall doc-fun)))))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun org-eldoc-load ()
|
||||
"Set up org-eldoc documentation function."
|
||||
(interactive)
|
||||
(setq-local eldoc-documentation-function #'org-eldoc-documentation-function))
|
||||
;; This approach is taken from python.el.
|
||||
(with-no-warnings
|
||||
(cond
|
||||
((null eldoc-documentation-function) ; Emacs<25
|
||||
(setq-local eldoc-documentation-function
|
||||
#'org-eldoc-documentation-function))
|
||||
((boundp 'eldoc-documentation-functions) ; Emacs>=28
|
||||
(add-hook 'eldoc-documentation-functions
|
||||
#'org-eldoc-documentation-function nil t))
|
||||
(t
|
||||
(add-function :before-until (local 'eldoc-documentation-function)
|
||||
#'org-eldoc-documentation-function)))))
|
||||
|
||||
;;;###autoload
|
||||
(add-hook 'org-mode-hook #'org-eldoc-load)
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
;;; org-link-edit.el --- Slurp and barf with Org links -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2015-2017 Kyle Meyer <kyle@kyleam.com>
|
||||
;; Copyright (C) 2015-2020 Kyle Meyer <kyle@kyleam.com>
|
||||
|
||||
;; Author: Kyle Meyer <kyle@kyleam.com>
|
||||
;; URL: https://gitlab.com/kyleam/org-link-edit
|
||||
;; URL: https://git.kyleam.com/org-link-edit/about
|
||||
;; Keywords: convenience
|
||||
;; Version: 1.1.1
|
||||
;; Package-Requires: ((cl-lib "0.5") (org "8.2.10"))
|
||||
;; Version: 1.2.1
|
||||
;; Package-Requires: ((cl-lib "0.5") (org "9.3"))
|
||||
|
||||
;; This program is free software; you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
@@ -19,7 +19,7 @@
|
||||
;; GNU General Public License for more details.
|
||||
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
@@ -67,12 +67,7 @@
|
||||
(require 'cl-lib)
|
||||
|
||||
(defun org-link-edit--on-link-p (&optional element)
|
||||
(let ((el (or element (org-element-context))))
|
||||
;; Don't use `org-element-lineage' because it isn't available
|
||||
;; until Org version 8.3.
|
||||
(while (and el (not (memq (car el) '(link))))
|
||||
(setq el (org-element-property :parent el)))
|
||||
(eq (car el) 'link)))
|
||||
(org-element-lineage (or element (org-element-context)) '(link) t))
|
||||
|
||||
(defun org-link-edit--link-data ()
|
||||
"Return list with information about the link at point.
|
||||
@@ -90,13 +85,13 @@ The list includes
|
||||
;; Use match-{beginning,end} because match-end is consistently
|
||||
;; positioned after ]], while the :end property is positioned
|
||||
;; at the next word on the line, if one is present.
|
||||
((looking-at org-bracket-link-regexp)
|
||||
((looking-at org-link-bracket-re)
|
||||
(list (match-beginning 0)
|
||||
(match-end 0)
|
||||
(save-match-data
|
||||
(org-link-unescape (match-string-no-properties 1)))
|
||||
(or (match-string-no-properties 2) "")))
|
||||
((looking-at org-plain-link-re)
|
||||
((looking-at org-link-plain-re)
|
||||
(list (match-beginning 0)
|
||||
(match-end 0)
|
||||
(match-string-no-properties 0)
|
||||
@@ -170,7 +165,7 @@ If N is negative, slurp leading blobs instead of trailing blobs."
|
||||
(setq desc (concat desc slurped)
|
||||
end (+ end (length slurped)))
|
||||
(delete-region beg (point))
|
||||
(insert (org-make-link-string link desc))
|
||||
(insert (org-link-make-string link desc))
|
||||
(goto-char beg)
|
||||
slurped)))))
|
||||
|
||||
@@ -212,7 +207,7 @@ If N is negative, slurp trailing blobs instead of leading blobs."
|
||||
(setq desc (concat slurped desc)
|
||||
beg (- beg (length slurped)))
|
||||
(delete-region (point) end)
|
||||
(insert (org-make-link-string link desc))
|
||||
(insert (org-link-make-string link desc))
|
||||
(goto-char beg)
|
||||
slurped)))))
|
||||
|
||||
@@ -282,7 +277,7 @@ If N is negative, barf leading blobs instead of trailing blobs."
|
||||
(unless new-desc (user-error "Not enough blobs in description"))
|
||||
(goto-char beg)
|
||||
(delete-region beg end)
|
||||
(insert (org-make-link-string link new-desc))
|
||||
(insert (org-link-make-string link new-desc))
|
||||
(when (string= new-desc "")
|
||||
(setq barfed (concat " " barfed)))
|
||||
(insert barfed)
|
||||
@@ -321,7 +316,7 @@ If N is negative, barf trailing blobs instead of leading blobs."
|
||||
(unless new-desc (user-error "Not enough blobs in description"))
|
||||
(goto-char beg)
|
||||
(delete-region beg end)
|
||||
(insert (org-make-link-string link new-desc))
|
||||
(insert (org-link-make-string link new-desc))
|
||||
(when (string= new-desc "")
|
||||
(setq barfed (concat barfed " ")))
|
||||
(goto-char beg)
|
||||
@@ -331,12 +326,12 @@ If N is negative, barf trailing blobs instead of leading blobs."
|
||||
(defun org-link-edit--next-link-data (&optional previous)
|
||||
(save-excursion
|
||||
(if (funcall (if previous #'re-search-backward #'re-search-forward)
|
||||
org-any-link-re nil t)
|
||||
org-link-any-re nil t)
|
||||
(org-link-edit--link-data)
|
||||
(user-error "No %s link found" (if previous "previous" "next")))))
|
||||
|
||||
;;;###autoload
|
||||
(defun org-link-edit-transport-next-link (&optional previous beg end)
|
||||
(defun org-link-edit-transport-next-link (&optional previous beg end overwrite)
|
||||
"Move the next link to point.
|
||||
|
||||
If the region is active, use the selected text as the link's
|
||||
@@ -346,11 +341,16 @@ With prefix argument PREVIOUS, move the previous link instead of
|
||||
the next link.
|
||||
|
||||
Non-interactively, use the text between BEG and END as the
|
||||
description, moving the next (or previous) link relative BEG and
|
||||
END."
|
||||
(interactive (cons current-prefix-arg
|
||||
(and (use-region-p)
|
||||
(list (region-beginning) (region-end)))))
|
||||
description, moving the next (or previous) link relative to BEG
|
||||
and END. By default, refuse to overwrite an existing
|
||||
description. If OVERWRITE is `ask', prompt for confirmation
|
||||
before overwriting; for any other non-nil value, overwrite
|
||||
without asking."
|
||||
(interactive `(,current-prefix-arg
|
||||
,@(if (use-region-p)
|
||||
(list (region-beginning) (region-end))
|
||||
(list nil nil))
|
||||
ask))
|
||||
(let ((pt (point))
|
||||
(desc-bounds (cond
|
||||
((and beg end)
|
||||
@@ -374,10 +374,14 @@ END."
|
||||
(goto-char (or (car desc-bounds) pt))
|
||||
(cl-multiple-value-bind (link-beg link-end link orig-desc)
|
||||
(org-link-edit--next-link-data previous)
|
||||
(unless (or (not desc-bounds) (= (length orig-desc) 0))
|
||||
(unless (or (not desc-bounds)
|
||||
(= (length orig-desc) 0)
|
||||
(if (eq overwrite 'ask)
|
||||
(y-or-n-p "Overwrite existing description?")
|
||||
overwrite))
|
||||
(user-error "Link already has a description"))
|
||||
(delete-region link-beg link-end)
|
||||
(insert (org-make-link-string
|
||||
(insert (org-link-make-string
|
||||
link
|
||||
(if desc-bounds
|
||||
(delete-and-extract-region (car desc-bounds)
|
||||
|
||||
@@ -494,7 +494,7 @@ The links are of the form <link>::split::<name>."
|
||||
;; Handle links from together.app
|
||||
(org-link-set-parameters "x-together-item" :follow #'org-mac-together-item-open)
|
||||
|
||||
(defun org-mac-together-item-open (uid)
|
||||
(defun org-mac-together-item-open (uid _)
|
||||
"Open UID, which is a reference to an item in Together."
|
||||
(shell-command (concat "open -a Together \"x-together-item:" uid "\"")))
|
||||
|
||||
@@ -553,7 +553,7 @@ The links are of the form <link>::split::<name>."
|
||||
;; Handle links from AddressBook.app
|
||||
(org-link-set-parameters "addressbook" :follow #'org-mac-addressbook-item-open)
|
||||
|
||||
(defun org-mac-addressbook-item-open (uid)
|
||||
(defun org-mac-addressbook-item-open (uid _)
|
||||
"Open UID, which is a reference to an item in the addressbook."
|
||||
(shell-command (concat "open \"addressbook:" uid "\"")))
|
||||
|
||||
@@ -588,7 +588,7 @@ The links are of the form <link>::split::<name>."
|
||||
|
||||
(org-link-set-parameters "skim" :follow #'org-mac-skim-open)
|
||||
|
||||
(defun org-mac-skim-open (uri)
|
||||
(defun org-mac-skim-open (uri _)
|
||||
"Visit page of pdf in Skim"
|
||||
(let* ((page (when (string-match "::\\(.+\\)\\'" uri)
|
||||
(match-string 1 uri)))
|
||||
@@ -647,7 +647,7 @@ The links are of the form <link>::split::<name>."
|
||||
|
||||
(org-link-set-parameters "acrobat" :follow #'org-mac-acrobat-open)
|
||||
|
||||
(defun org-mac-acrobat-open (uri)
|
||||
(defun org-mac-acrobat-open (uri _)
|
||||
"Visit page of pdf in Acrobat"
|
||||
(let* ((page (when (string-match "::\\(.+\\)\\'" uri)
|
||||
(match-string 1 uri)))
|
||||
@@ -697,7 +697,7 @@ The links are of the form <link>::split::<name>."
|
||||
|
||||
(org-link-set-parameters "mac-outlook" :follow #'org-mac-outlook-message-open)
|
||||
|
||||
(defun org-mac-outlook-message-open (msgid)
|
||||
(defun org-mac-outlook-message-open (msgid _)
|
||||
"Open a message in Outlook"
|
||||
(do-applescript
|
||||
(concat
|
||||
@@ -809,7 +809,7 @@ after heading."
|
||||
|
||||
(org-link-set-parameters "mac-evernote" :follow #'org-mac-evernote-note-open)
|
||||
|
||||
(defun org-mac-evernote-note-open (noteid)
|
||||
(defun org-mac-evernote-note-open (noteid _)
|
||||
"Open a note in Evernote"
|
||||
(do-applescript
|
||||
(concat
|
||||
@@ -860,7 +860,7 @@ note(s) in Evernote.app and make a link out of it/them."
|
||||
|
||||
(org-link-set-parameters "x-devonthink-item" :follow #'org-devonthink-item-open)
|
||||
|
||||
(defun org-devonthink-item-open (uid)
|
||||
(defun org-devonthink-item-open (uid _)
|
||||
"Open UID, which is a reference to an item in DEVONthink Pro Office."
|
||||
(shell-command (concat "open \"x-devonthink-item:" uid "\"")))
|
||||
|
||||
@@ -908,11 +908,11 @@ selected items in DEVONthink Pro Office and make link(s) out of it/them."
|
||||
|
||||
(org-link-set-parameters "message" :follow #'org-mac-message-open)
|
||||
|
||||
(defun org-mac-message-open (message-id)
|
||||
(defun org-mac-message-open (message-id _)
|
||||
"Visit the message with MESSAGE-ID.
|
||||
This will use the command `open' with the message URL."
|
||||
(start-process (concat "open message:" message-id) nil
|
||||
"open" (concat "message://<" (substring message-id 2) ">")))
|
||||
"open" (concat "message://%3C" (substring message-id 2) "%3E")))
|
||||
|
||||
(defun org-as-get-selected-mail ()
|
||||
"AppleScript to create links to selected messages in Mail.app."
|
||||
|
||||
@@ -139,7 +139,7 @@ the buffer just like 'message-send-and-exit' does."
|
||||
(cons (list link desc) org-stored-links)))
|
||||
(message-bury (current-buffer)))
|
||||
|
||||
(defun org-mairix-open (search)
|
||||
(defun org-mairix-open (search _)
|
||||
"Function to open mairix link.
|
||||
|
||||
We first need to split it into its individual parts, and then
|
||||
@@ -186,7 +186,7 @@ applications in order to mimic `org-store-link'. Used by
|
||||
:type 'string)
|
||||
|
||||
;; When we resolve some of the issues with `org-store-link' detailed
|
||||
;; at <http://thread.gmane.org/gmane.emacs.orgmode/4217/focus=4635>,
|
||||
;; at <https://orgmode.org/list/20071105181739.GB13544@atlantic.linksys.moosehall
|
||||
;; we might not need org-mairix-insert-link.
|
||||
|
||||
(defun org-mairix-insert-link ()
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
;;; Code:
|
||||
|
||||
(eval-when-compile (require 'cl))
|
||||
(eval-when-compile (require 'cl-lib))
|
||||
(require 'org-element)
|
||||
|
||||
(declare-function appt-delete-window "appt" ())
|
||||
@@ -74,6 +74,11 @@
|
||||
:type 'boolean
|
||||
:group 'org-notify)
|
||||
|
||||
(defcustom org-notify-max-notifications-per-run 3
|
||||
"Maximum number of notifications per run of `org-notify-process'."
|
||||
:type 'integer
|
||||
:group 'org-notify)
|
||||
|
||||
(defconst org-notify-actions
|
||||
'("show" "show" "done" "done" "hour" "one hour later" "day" "one day later"
|
||||
"week" "one week later")
|
||||
@@ -155,36 +160,40 @@ PERIOD."
|
||||
(message "Warning: notification for \"%s\" behind schedule!" heading))
|
||||
t)
|
||||
|
||||
(defun org-notify-process ()
|
||||
(cl-defun org-notify-process ()
|
||||
"Process the todo-list, and possibly notify user about upcoming or
|
||||
forgotten tasks."
|
||||
(cl-macrolet ((prm (k) `(plist-get prms ,k)) (td (k) `(plist-get todo ,k)))
|
||||
(dolist (todo (org-notify-todo-list))
|
||||
(let* ((deadline (td :deadline)) (heading (td :heading))
|
||||
(uid (td :uid)) (last-run-sym
|
||||
(intern (concat ":last-run-" uid))))
|
||||
(dolist (prms (plist-get org-notify-map (td :notify)))
|
||||
(when (< deadline (org-notify-string->seconds (prm :time)))
|
||||
(let ((period (org-notify-string->seconds (prm :period)))
|
||||
(last-run (prm last-run-sym)) (now (float-time))
|
||||
(actions (prm :actions)) diff plist)
|
||||
(when (or (not last-run)
|
||||
(and period (< period (setq diff (- now last-run)))
|
||||
(org-notify-maybe-too-late diff period heading)))
|
||||
(setq prms (plist-put prms last-run-sym now)
|
||||
plist (append todo prms))
|
||||
(if (if (plist-member prms :audible)
|
||||
(prm :audible)
|
||||
org-notify-audible)
|
||||
(ding))
|
||||
(unless (listp actions)
|
||||
(setq actions (list actions)))
|
||||
(dolist (action actions)
|
||||
(funcall (if (fboundp action) action
|
||||
(intern (concat "org-notify-action"
|
||||
(symbol-name action))))
|
||||
plist))))
|
||||
(return)))))))
|
||||
(let ((notification-cnt 0))
|
||||
(cl-macrolet ((prm (k) `(plist-get prms ,k)) (td (k) `(plist-get todo ,k)))
|
||||
(dolist (todo (org-notify-todo-list))
|
||||
(let* ((deadline (td :deadline)) (heading (td :heading))
|
||||
(uid (td :uid)) (last-run-sym
|
||||
(intern (concat ":last-run-" uid))))
|
||||
(cl-dolist (prms (plist-get org-notify-map (td :notify)))
|
||||
(when (< deadline (org-notify-string->seconds (prm :time)))
|
||||
(let ((period (org-notify-string->seconds (prm :period)))
|
||||
(last-run (prm last-run-sym)) (now (float-time))
|
||||
(actions (prm :actions)) diff plist)
|
||||
(when (or (not last-run)
|
||||
(and period (< period (setq diff (- now last-run)))
|
||||
(org-notify-maybe-too-late diff period heading)))
|
||||
(setq prms (plist-put prms last-run-sym now)
|
||||
plist (append todo prms))
|
||||
(if (if (plist-member prms :audible)
|
||||
(prm :audible)
|
||||
org-notify-audible)
|
||||
(ding))
|
||||
(unless (listp actions)
|
||||
(setq actions (list actions)))
|
||||
(cl-incf notification-cnt)
|
||||
(dolist (action actions)
|
||||
(funcall (if (fboundp action) action
|
||||
(intern (concat "org-notify-action"
|
||||
(symbol-name action))))
|
||||
plist))
|
||||
(when (>= notification-cnt org-notify-max-notifications-per-run)
|
||||
(cl-return-from org-notify-process)))
|
||||
(cl-return)))))))))
|
||||
|
||||
(defun org-notify-add (name &rest params)
|
||||
"Add a new notification type.
|
||||
|
||||
@@ -154,7 +154,8 @@ to `org-bibtex-citation-p' predicate."
|
||||
|
||||
;;; Follow cite: links
|
||||
|
||||
(defun org-bibtex-file nil "Org-mode file of bibtex entries.")
|
||||
(defvar org-bibtex-file nil
|
||||
"Org file of BibTeX entries.")
|
||||
|
||||
(defun org-bibtex-goto-citation (&optional citation)
|
||||
"Visit a citation given its ID."
|
||||
@@ -162,13 +163,11 @@ to `org-bibtex-citation-p' predicate."
|
||||
(let ((citation (or citation (completing-read "Citation: " (obe-citations)))))
|
||||
(find-file (or org-bibtex-file
|
||||
(error "`org-bibtex-file' has not been configured")))
|
||||
(goto-char (point-min))
|
||||
(when (re-search-forward (format " :CUSTOM_ID: %s" citation) nil t)
|
||||
(outline-previous-visible-heading 1)
|
||||
t)))
|
||||
(let ((position (org-find-property "CUSTOM_ID" citation)))
|
||||
(and position (progn (goto-char position) t)))))
|
||||
|
||||
(let ((jump-fn (car (cl-remove-if-not #'fboundp '(ebib org-bibtex-goto-citation)))))
|
||||
(org-add-link-type "cite" jump-fn))
|
||||
(org-add-link-type "cite-bt" jump-fn))
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -60,7 +60,10 @@
|
||||
(template . org-confluence-template)
|
||||
(timestamp . org-confluence-timestamp)
|
||||
(underline . org-confluence-underline)
|
||||
(verbatim . org-confluence-verbatim)))
|
||||
(verbatim . org-confluence-verbatim))
|
||||
:menu-entry
|
||||
'(?f "Export to Confluence"
|
||||
((?f "As Confluence buffer" org-confluence-export-as-confluence))))
|
||||
|
||||
(defcustom org-confluence-lang-alist
|
||||
'(("sh" . "bash"))
|
||||
@@ -125,15 +128,17 @@
|
||||
(if (org-string-nw-p contents) contents ""))))
|
||||
|
||||
(defun org-confluence-link (link desc info)
|
||||
(let ((raw-link (org-element-property :raw-link link)))
|
||||
(concat "["
|
||||
(when (org-string-nw-p desc) (format "%s|" desc))
|
||||
(cond
|
||||
((string-match "^confluence:" raw-link)
|
||||
(replace-regexp-in-string "^confluence:" "" raw-link))
|
||||
(t
|
||||
raw-link))
|
||||
"]")))
|
||||
(if (string= "radio" (org-element-property :type link))
|
||||
desc
|
||||
(let ((raw-link (org-element-property :raw-link link)))
|
||||
(concat "["
|
||||
(when (org-string-nw-p desc) (format "%s|" desc))
|
||||
(cond
|
||||
((string-match "^confluence:" raw-link)
|
||||
(replace-regexp-in-string "^confluence:" "" raw-link))
|
||||
(t
|
||||
raw-link))
|
||||
"]"))))
|
||||
|
||||
(defun org-confluence-paragraph (paragraph contents info)
|
||||
"Transcode PARAGRAPH element for Confluence.
|
||||
|
||||
@@ -1248,7 +1248,7 @@ INFO is a plist holding contextual information. See
|
||||
((string= type "file") (org-export-file-uri raw-path))
|
||||
(t raw-path))))
|
||||
(cond
|
||||
((org-export-custom-protocol-maybe link desc 'groff))
|
||||
((org-export-custom-protocol-maybe link desc 'groff info))
|
||||
;; Image file.
|
||||
(imagep (org-groff-link--inline-image link info))
|
||||
;; import groff files
|
||||
|
||||
@@ -483,10 +483,6 @@ e.g. \"title-subject:t\"."
|
||||
(defvar org-koma-letter-special-contents nil
|
||||
"Holds special content temporarily.")
|
||||
|
||||
(make-obsolete-variable 'org-koma-letter-use-title
|
||||
'org-export-with-title
|
||||
"25.1" 'set)
|
||||
|
||||
|
||||
;;; Define Back-End
|
||||
|
||||
@@ -748,7 +744,8 @@ holding export options."
|
||||
(if (symbolp with-subject) with-subject
|
||||
(mapconcat #'symbol-name with-subject ","))))
|
||||
;; Hyperref.
|
||||
(format-spec hyperref-template spec)
|
||||
(and (stringp hyperref-template)
|
||||
(format-spec hyperref-template spec))
|
||||
;; Document start.
|
||||
"\\begin{document}\n\n"
|
||||
;; Subject and title.
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
;; :END:
|
||||
;;
|
||||
;;;; * TODO
|
||||
;; - Look at org-file-properties, org-global-properties and
|
||||
;; - Look at org-keyword-properties, org-global-properties and
|
||||
;; org-global-properties-fixed
|
||||
;; - What about property inheritance and org-property-inherit-p?
|
||||
;; - Use TYPE_TODO as an way to assign resources
|
||||
@@ -841,8 +841,8 @@ a unique id will be associated to it."
|
||||
(priority
|
||||
(let ((pri (org-element-property :priority task)))
|
||||
(and pri
|
||||
(max 1 (/ (* 1000 (- org-lowest-priority pri))
|
||||
(- org-lowest-priority org-highest-priority)))))))
|
||||
(max 1 (/ (* 1000 (- org-priority-lowest pri))
|
||||
(- org-priority-lowest org-priority-highest)))))))
|
||||
(concat
|
||||
;; Opening task.
|
||||
(format "task %s \"%s\" {\n"
|
||||
|
||||
Reference in New Issue
Block a user