Skip to content

Instantly share code, notes, and snippets.

🦄
Emacs Org Mode

Takaaki ISHIKAWA takaxp

🦄
Emacs Org Mode
Block or report user

Report or block takaxp

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@takaxp
takaxp / ox.el
Created Dec 5, 2019
patch to suppress error when quit the export
View ox.el
diff --git a/lisp/ox.el b/lisp/ox.el
index 5b4134ecc..98846540d 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -6929,8 +6929,8 @@ options as CDR."
(org-export--dispatch-ui options first-key expertp))
;; q key at first level aborts export. At second level, cancel
;; first key instead.
- ((eq key ?q) (if (not first-key) (error "Export aborted")
- (org-export--dispatch-ui options nil expertp)))
@takaxp
takaxp / ox-split-horizontal
Last active Dec 6, 2019
split window horizontally when showing org-export-dispatch
View ox-split-horizontal
(with-eval-after-load "ox"
(defun my-org-export-dispatch-done ()
(when (eq this-command 'org-export-dispatch)
(delete-window))
(remove-hook 'post-command-hook #'my-org-export-dispatch-done))
(defun my-moom-org-export-dispatch-done ()
(when (eq this-command 'org-export-dispatch)
(moom-delete-windows))
(remove-hook 'post-command-hook #'my-moom-org-export-dispatch-done))
@takaxp
takaxp / ox-html.patch
Last active Sep 24, 2019
A patch for ox-html to use CUTOM_IDs on id tags.
View ox-html.patch
diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index 757006321..0286317e5 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -2256,11 +2256,10 @@ line of code."
(format "<span class=\"linenr\">%s</span>"
(format num-fmt line-num)))
;; Transcoded src line.
- (format "<code%s>%s</code>"
- (if num-start
@takaxp
takaxp / my-org-doing.el
Last active Aug 25, 2019
semi-automated clock-in and clock-out for DOING - https://github.com/takaxp/org-onit
View my-org-doing.el
;; integrated to https://github.com/takaxp/org-onit
@takaxp
takaxp / clone_apfs_bootable_volume.txt
Last active Aug 20, 2019
Clone APFS bootable volume (from internal SSD to external HDD)
View clone_apfs_bootable_volume.txt
# see https://discussions.apple.com/thread/8384650
# disk2: main drive as source (SSD)
# disk2s1: Macintosh HD
# disk2s2: Preboot for disk2s1
# disk5: external drive as destination (HDD)
# disk5s1: Untitled
# disk5s2: Preboot for disk5s1
sudo vsdbutil -a /Volumes/Untitled
sudo rsync -xrlptgoEvHS --progress --delete / /Volumes/Untitled
diskutil list
@takaxp
takaxp / ox-html.patch
Created Jul 29, 2019
To avid unexpected code formatting in exported HTML file
View ox-html.patch
diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index 757006321..c8fa3fda4 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -2256,11 +2256,10 @@ line of code."
(format "<span class=\"linenr\">%s</span>"
(format num-fmt line-num)))
;; Transcoded src line.
- (format "<code%s>%s</code>"
- (if num-start
@takaxp
takaxp / init-ivy.el
Last active Aug 6, 2019
My configs for ivy-mode (0.12.0)
View init-ivy.el
;; Configurations for ivy-mode (load "/path/to/init-ivy.el" nil t)
;; This elisp may require:
;; smex.el, all-the-icons.el, flyspell-correct-ivy.el, counsel-world-clock.el
;; counsel-gtalgs.el, all-the-icons-ivy.el, counsel-projectile.el
;; prescient.el, counsel-selected.el, counsel-osx-app.el, ivy-dired-history.el
;; magit.el, org-recent-headings.el, ivy-posframe.el
;; 2019-07-26 published. more details will be published later via Qitta.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(require 'ivy)
(require 'counsel)
@takaxp
takaxp / org-capture-with-bookmark.el
Last active Mar 31, 2019
org-capture-with-bookmark
View org-capture-with-bookmark.el
(with-eval-after-load "org"
;; [[bookmark:hoge][hogehoge]] 形式のリンクを有効化
(add-to-list 'org-modules 'ol-bookmark)
;; ブックマークを読み込む
(when (require 'bookmark nil t)
;; ブックマークファイルの指定
;; (setq bookmark-default-file "/path/to/bookmark")
;; 変更直後に保存
@takaxp
takaxp / ad:org-clock-report.el
Last active Mar 27, 2019
org-clock-report in reversed order
View ad:org-clock-report.el
(with-eval-after-load "org-clock"
(defvar org-clocktable-steps-reverse-p nil)
(defun ad:org-clocktable-steps (params)
"Create one or more clock tables, according to PARAMS.
Step through the range specifications in plist PARAMS to make
a number of clock tables."
(let* ((ignore-empty-tables (plist-get params :stepskip0))
(step (plist-get params :step))
(step-header
(pcase step
View clocktable-by-tag.el
(require 'org-table)
(require 'org-clock)
(defun clocktable-by-tag/shift-cell (n)
(let ((str ""))
(dotimes (i n)
(setq str (concat str "| ")))
str))
(defun clocktable-by-tag/insert-tag (params)
You can’t perform that action at this time.