From 5f62f9d66c29926f95a360d58d38f627ae8c6dc2 Mon Sep 17 00:00:00 2001 From: Andreas Gerler Date: Fri, 31 Jan 2020 17:55:21 +0100 Subject: [PATCH] update org-sticky-header --- bba.org | 2 +- .../org-sticky-header-pkg.el | 2 -- .../org-sticky-header-autoloads.el | 10 +++++++-- .../org-sticky-header-pkg.el | 2 ++ .../org-sticky-header.el | 22 ++++++++++++++++--- 5 files changed, 30 insertions(+), 8 deletions(-) delete mode 100644 elpa/org-sticky-header-20190406.2313/org-sticky-header-pkg.el rename elpa/{org-sticky-header-20190406.2313 => org-sticky-header-20191117.549}/org-sticky-header-autoloads.el (69%) create mode 100644 elpa/org-sticky-header-20191117.549/org-sticky-header-pkg.el rename elpa/{org-sticky-header-20190406.2313 => org-sticky-header-20191117.549}/org-sticky-header.el (92%) diff --git a/bba.org b/bba.org index a83c4fdb..a239ceaf 100644 --- a/bba.org +++ b/bba.org @@ -2065,7 +2065,7 @@ file. [2017-04-26 Wed 13:09] #+BEGIN_SRC emacs-lisp :tangle yes - (add-to-list 'load-path "~/.emacs.d/elpa/org-sticky-header-20190406.2313" t) + (add-to-list 'load-path "~/.emacs.d/elpa/org-sticky-header-20191117.549" t) (add-hook 'org-mode-hook (lambda ()(org-sticky-header-mode 1)) ) diff --git a/elpa/org-sticky-header-20190406.2313/org-sticky-header-pkg.el b/elpa/org-sticky-header-20190406.2313/org-sticky-header-pkg.el deleted file mode 100644 index c6ac0107..00000000 --- a/elpa/org-sticky-header-20190406.2313/org-sticky-header-pkg.el +++ /dev/null @@ -1,2 +0,0 @@ -;;; -*- no-byte-compile: t -*- -(define-package "org-sticky-header" "20190406.2313" "Show off-screen Org heading at top of window" '((emacs "24.4") (org "8.3.5")) :commit "32c13a56a78a4de239010031fea4b9583bac2512" :keywords '("hypermedia" "outlines" "org") :authors '(("Adam Porter" . "adam@alphapapa.net")) :maintainer '("Adam Porter" . "adam@alphapapa.net") :url "http://github.com/alphapapa/org-sticky-header") diff --git a/elpa/org-sticky-header-20190406.2313/org-sticky-header-autoloads.el b/elpa/org-sticky-header-20191117.549/org-sticky-header-autoloads.el similarity index 69% rename from elpa/org-sticky-header-20190406.2313/org-sticky-header-autoloads.el rename to elpa/org-sticky-header-20191117.549/org-sticky-header-autoloads.el index 23e08fdb..c960239f 100644 --- a/elpa/org-sticky-header-20190406.2313/org-sticky-header-autoloads.el +++ b/elpa/org-sticky-header-20191117.549/org-sticky-header-autoloads.el @@ -1,10 +1,13 @@ ;;; org-sticky-header-autoloads.el --- automatically extracted autoloads ;; ;;; Code: -(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path)))) + +(add-to-list 'load-path (directory-file-name + (or (file-name-directory #$) (car load-path)))) + ;;;### (autoloads nil "org-sticky-header" "org-sticky-header.el" -;;;;;; (23994 46394 422834 160000)) +;;;;;; (0 0 0 0)) ;;; Generated autoloads from org-sticky-header.el (autoload 'org-sticky-header-mode "org-sticky-header" "\ @@ -14,11 +17,14 @@ Return non-nil if the minor mode is enabled. \(fn &optional ARG)" t nil) +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "org-sticky-header" '("org-sticky-header-"))) + ;;;*** ;; Local Variables: ;; version-control: never ;; no-byte-compile: t ;; no-update-autoloads: t +;; coding: utf-8 ;; End: ;;; org-sticky-header-autoloads.el ends here diff --git a/elpa/org-sticky-header-20191117.549/org-sticky-header-pkg.el b/elpa/org-sticky-header-20191117.549/org-sticky-header-pkg.el new file mode 100644 index 00000000..c6889c69 --- /dev/null +++ b/elpa/org-sticky-header-20191117.549/org-sticky-header-pkg.el @@ -0,0 +1,2 @@ +;;; -*- no-byte-compile: t -*- +(define-package "org-sticky-header" "20191117.549" "Show off-screen Org heading at top of window" '((emacs "24.4") (org "8.3.5")) :commit "1053ebdeb3bd14fc8d4538643532efb86d18b73c" :keywords '("hypermedia" "outlines" "org") :authors '(("Adam Porter" . "adam@alphapapa.net")) :maintainer '("Adam Porter" . "adam@alphapapa.net") :url "http://github.com/alphapapa/org-sticky-header") diff --git a/elpa/org-sticky-header-20190406.2313/org-sticky-header.el b/elpa/org-sticky-header-20191117.549/org-sticky-header.el similarity index 92% rename from elpa/org-sticky-header-20190406.2313/org-sticky-header.el rename to elpa/org-sticky-header-20191117.549/org-sticky-header.el index 856bd81c..04e6a4d4 100644 --- a/elpa/org-sticky-header-20190406.2313/org-sticky-header.el +++ b/elpa/org-sticky-header-20191117.549/org-sticky-header.el @@ -2,8 +2,8 @@ ;; Author: Adam Porter ;; Url: http://github.com/alphapapa/org-sticky-header -;; Package-Version: 20190406.2313 -;; Version: 1.0.1 +;; Package-Version: 20191117.549 +;; Version: 1.1-pre ;; Package-Requires: ((emacs "24.4") (org "8.3.5")) ;; Keywords: hypermedia, outlines, Org @@ -59,9 +59,17 @@ "Value of header line") (put 'org-sticky-header-stickyline 'risky-local-variable t) +(defvar org-sticky-header-keymap + (let ((map (make-sparse-keymap))) + (define-key map (kbd " ") #'org-sticky-header-goto-heading) + map) + "Keymap used in header line.") + (defconst org-sticky-header-header-line-format '(:eval (progn - (setq org-sticky-header-stickyline (org-sticky-header--fetch-stickyline)) + (setq org-sticky-header-stickyline + (propertize (org-sticky-header--fetch-stickyline) + 'keymap org-sticky-header-keymap)) (list (propertize " " 'display '((space :align-to 0))) 'org-sticky-header-stickyline))) @@ -115,6 +123,14 @@ is enabled." ;;;; Functions +(defun org-sticky-header-goto-heading (event) + "Go to heading displayed in sticky header (for click event EVENT)." + (interactive "e") + (with-selected-window (posn-window (event-start event)) + (goto-char (window-start)) + (unless (org-before-first-heading-p) + (org-back-to-heading)))) + (defun org-sticky-header--fetch-stickyline () "Return string of Org heading or outline path for display in header line." (org-with-wide-buffer -- 2.47.3