Skip to content

Instantly share code, notes, and snippets.

Avatar
🦄
Emacs Org Mode

Takaaki ISHIKAWA takaxp

🦄
Emacs Org Mode
View GitHub Profile
@takaxp
takaxp / portable-emacs.sh
Created May 16, 2020
Integrate GnuTLS into Emacs.app
View portable-emacs.sh
#!/bin/sh
echo "Integrate GnuTLS and it's dependencies into Emacs.app"
cd ~/devel/emacs-head/emacs/nextstep/Emacs.app/Contents/MacOS
if [ -d "lib" ]; then
rm -rf lib
fi
mkdir lib
View iceberg-theme.el
;;; iceberg256-theme.el --- Iceberg xterm256 color theme
(deftheme iceberg
"Iceberg256 - The iceberg256 theme.")
(defvar iceberg-colors-alist
(let* ((256color (eq (display-color-cells (selected-frame)) 256))
(colors `(("iceberg-accent" . "#91acd1")
("iceberg-fg" . (if ,256color "color-251" "#c6c8d1"))
("iceberg-bg" . (if ,256color "color-234" "#282C34"))
@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")
;; 変更直後に保存
You can’t perform that action at this time.