.emacs.d

My Emacs configuration files.
Log | Files | Refs | README

commit 17fcace22b9a05ee3420ee003baee87db3a4ffcc
parent a739becf7fa01827355e56318a69becf4120e17e
Author: Hugo Soucy <hugo.soucy@toumoro.com>
Date:   Tue, 17 Nov 2020 12:18:31 -0500

Merge branch 'master' of github.com:hs0ucy/.emacs.d

Diffstat:
Adefuns/org-export-headlines-to-html.el | 28++++++++++++++++++++++++++++
Mpartials/email.el | 10+++++-----
Mpartials/extras.el | 8++++----
Mpartials/ui-ux.el | 9++-------
4 files changed, 39 insertions(+), 16 deletions(-)

diff --git a/defuns/org-export-headlines-to-html.el b/defuns/org-export-headlines-to-html.el @@ -0,0 +1,28 @@ +;; export headlines to separate files +;; http://emacs.stackexchange.com/questions/2259/how-to-export-top-level-headings-of-org-mode-buffer-to-separate-files +(defun org-export-headlines-to-pdf () + "Export all subtrees that are *not* tagged with :noexport: to +separate files. + +Subtrees that do not have the :EXPORT_FILE_NAME: property set +are exported to a filename derived from the headline text." + (interactive) + (save-buffer) + (let ((modifiedp (buffer-modified-p))) + (save-excursion + (goto-char (point-min)) + (goto-char (re-search-forward "^*")) + (set-mark (line-beginning-position)) + (goto-char (point-max)) + (org-map-entries + (lambda () + (let ((export-file (org-entry-get (point) "EXPORT_FILE_NAME"))) + (unless export-file + (org-set-property + "EXPORT_FILE_NAME" + (replace-regexp-in-string " " "_" (nth 4 (org-heading-components))))) + (deactivate-mark) + (org-latex-export-to-pdf nil t) + (unless export-file (org-delete-property "EXPORT_FILE_NAME")) + (set-buffer-modified-p modifiedp))) + "-noexport" 'region-start-level)))) diff --git a/partials/email.el b/partials/email.el @@ -1,7 +1,7 @@ -;; EMAIL SETUP FILE +;;; Email setup -(setq user-full-name "Hugo Soucy") +;;; Code +(setq user-full-name (getenv "NAME")) +(setq user-mail-address (getenv "EMAIL")) -(if (eq (system-name) 'hs0ucy-t590) - (setq user-mail-address "hugo.soucy@toumoro.com") - (setq user-mail-address "hugo@soucy.cc")) +;;; email.el ends here diff --git a/partials/extras.el b/partials/extras.el @@ -9,10 +9,10 @@ :config (global-undo-tree-mode 1)) -(use-package sudo-edit - ;; Open files as another user. - :ensure t - :pin melpa) +;; (use-package sudo-edit +;; ;; Open files as another user. +;; :ensure t +;; :pin melpa) (use-package autopair ;; Automagically pair braces and quotes like TextMate. diff --git a/partials/ui-ux.el b/partials/ui-ux.el @@ -12,11 +12,6 @@ :config (which-key-mode)) -;; (use-package hexrgb -;; ;; Functions to manipulate colors, including RGB hex strings. -;; :ensure t -;; :pin marmalade) - (use-package ace-window ;; Quickly switch windows. :ensure t @@ -28,9 +23,9 @@ ;; Fonts ;; Custom font face (120 === 12pt) ;; (if (not (eq system-type 'darwin)) -;; (set-face-attribute 'default nil :font "Terminus" :height 120) +(set-face-attribute 'default nil :font "Terminus" :height 120) ;; (set-face-attribute 'default nil :height 140)) -(set-face-attribute 'default nil :font "Fira Code" :height 120) +;; (set-face-attribute 'default nil :font "Fira Code" :height 120) ;; (set-face-attribute 'default nil :font "Ubuntu Mono" :height 120) ;; Ibuffer