From f0e769c7224d1c7b63842605a312638688101fdb Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 5 Oct 2017 01:30:16 +0200 Subject: [PATCH] Remove org/org-notebook Didn't offer enough features to really warrant its own module, and what it did offer I didn't find terribly useful. So out it goes! --- init.example.el | 1 - modules/org/org-notebook/autoload.el | 36 ---------------------------- modules/org/org-notebook/config.el | 27 --------------------- 3 files changed, 64 deletions(-) delete mode 100644 modules/org/org-notebook/autoload.el delete mode 100644 modules/org/org-notebook/config.el diff --git a/init.example.el b/init.example.el index 8a0bd71f1..86169ab31 100644 --- a/init.example.el +++ b/init.example.el @@ -116,7 +116,6 @@ org-attach ; a simpler attachment system org-capture ; a better org-capture, in or outside of Emacs org-export ; a custom, centralized export system - org-notebook ; org-mode as a notebook org-present ; using org-mode for presentations ;org-sync ; TODO sync with mobile ;org-publish ; TODO org + blogs diff --git a/modules/org/org-notebook/autoload.el b/modules/org/org-notebook/autoload.el deleted file mode 100644 index 2f98210fb..000000000 --- a/modules/org/org-notebook/autoload.el +++ /dev/null @@ -1,36 +0,0 @@ -;;; org/org-notebook/autoload.el -*- lexical-binding: t; -*- - -(defun +org-notebook--explore-notes (dir) - (unless (file-directory-p dir) - (error "Directory doesn't exist: %s" dir)) - (if (fboundp '+evil/neotree) - (neotree-dir dir) - (let ((default-directory dir)) - (call-interactively (command-remapping 'find-file))))) - -;;;###autoload -(defun +org-notebook/find-major-mode-notes () - "Browse org notes in `+org-notebook-code-dir' in neotree, ido, ivy or helm -- -whichever is available." - (interactive) - (let ((dir (expand-file-name - (concat (or (cdr (assq major-mode +org-notebook-code-alist)) - (replace-regexp-in-string - "+" "p" - (string-remove-suffix "-mode" (symbol-name major-mode)) - nil t)) - "/") - +org-notebook-code-dir))) - (unless (file-in-directory-p dir +org-notebook-code-dir) - (error "Invalid location for %s notes: %s" - major-mode (abbreviate-file-name dir))) - (unless (file-directory-p dir) - (make-directory dir t)) - (+org-notebook--explore-notes dir))) - -;;;###autoload -(defun +org-notebook/find-project-notes () - "Browse org notes in `+org-notebook-project-dir' in neotree, ido, ivy or helm -- -whichever is available." - (interactive) - (+org-notebook--explore-notes +org-notebook-project-dir)) diff --git a/modules/org/org-notebook/config.el b/modules/org/org-notebook/config.el deleted file mode 100644 index 3d6e1f891..000000000 --- a/modules/org/org-notebook/config.el +++ /dev/null @@ -1,27 +0,0 @@ -;;; org/org-notebook/config.el -*- lexical-binding: t; -*- - -;; (add-hook 'org-load-hook '+org|init-notebook t) - -;; While I program, write or plan, I want easy access to notes of various kinds, -;; such as major-mode/language specific notes, or project-specific notes. They -;; can be accessed via `+org-notebook/find-major-mode-notes' and -;; `+org-notebook/find-project-notes'. - -(defvar +org-notebook-dir (concat +org-dir "notes/") - "The directory where the notes are kept.") - -(defvar +org-notebook-code-dir (concat +org-notebook-dir "code/") - "The directory where programming notes and snippets are kept.") - -(defvar +org-notebook-project-dir (concat +org-notebook-dir "projects/") - "The directory where project notes are kept.") - - -(defvar +org-notebook-code-alist - '((js2-mode . "javascript")) - "An alist mapping certain modes (symbols) to their org notes directory name. -If a mode isn't here, it's guessed by stripping out the -mode suffix and -replacing '+' characters with 'p's.") - - -;; (defun +org|init-notebook ())