Skip to content

Instantly share code, notes, and snippets.

View takaxp's full-sized avatar
🦄
Emacs Org Mode

Takaaki ISHIKAWA takaxp

🦄
Emacs Org Mode
View GitHub Profile
@takaxp
takaxp / ox-html.patch
Last active September 24, 2019 16:25
A patch for ox-html to use CUTOM_IDs on id tags.
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 August 25, 2019 02:19
semi-automated clock-in and clock-out for DOING - https://github.com/takaxp/org-onit
;; integrated to https://github.com/takaxp/org-onit
@takaxp
takaxp / clone_apfs_bootable_volume.txt
Last active March 17, 2021 01:13
Clone APFS bootable volume (from internal SSD to external HDD)
# 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 July 29, 2019 18:36
To avid unexpected code formatting in exported HTML file
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 August 6, 2019 02:28
My configs for ivy-mode (0.12.0)
;; 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 March 31, 2019 01:01
org-capture-with-bookmark
(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 May 25, 2023 06:46
org-clock-report in reversed order
(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
(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)
diff --exclude .git --exclude '*.o' --exclude .DS_Store --exclude '*TAGS' --exclude lib --exclude nextstep -crN emacs_orig/configure.ac emacs/configure.ac
*** emacs_orig/configure.ac 2019-12-26 23:01:31.000000000 +0900
--- emacs/configure.ac 2019-12-27 00:13:19.000000000 +0900
***************
*** 2073,2079 ****
INSTALL_ARCH_INDEP_EXTRA=
fi
! NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o $ns_fontfile"
fi
@takaxp
takaxp / ns-27.0-private.patch
Last active November 30, 2019 10:03
ns-private patch for Emacs 27 (see also https://qiita.com/takaxp/items/e07bb286d80fa9dd8e05)
diff --exclude .git -crN emacs-27/src/nsfns.m emacs/src/nsfns.m
*** emacs-27/src/nsfns.m 2019-02-09 13:11:12.000000000 +0900
--- emacs/src/nsfns.m 2019-02-09 13:18:14.000000000 +0900
***************
*** 1185,1191 ****
gui_default_parameter (f, parms, Qborder_width, make_fixnum (0),
"borderwidth", "BorderWidth", RES_TYPE_NUMBER);
! gui_default_parameter (f, parms, Qinternal_border_width, make_fixnum (2),
"internalBorderWidth", "InternalBorderWidth",