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
(defvar default-font-size 12)
(setq target-font-size default-font-size)
(global-set-key (kbd "C-x C-=") 'increase-font-size)
(global-set-key (kbd "C-x C--") 'decrease-font-size)
(global-set-key (kbd "C-x C-0") 'reset-font-size)
(defun my-ja-font-setter (spec)
(set-fontset-font nil 'japanese-jisx0208 spec)
(set-fontset-font nil 'katakana-jisx0201 spec)
@takaxp
takaxp / gist:9658281
Created March 20, 2014 06:20
inline patch for Mavericks
diff -r -N -p -x '*.elc' ../emacs-24.3.org/lisp/term/common-win.el lisp/term/common-win.el
*** ../emacs-24.3.org/lisp/term/common-win.el 2013-01-02 05:37:17.000000000 +0900
--- lisp/term/common-win.el 2013-04-13 21:49:53.000000000 +0900
*************** is not used)."
*** 127,132 ****
--- 127,133 ----
(cons (logior (lsh 0 16) 12) 'ns-new-frame)
(cons (logior (lsh 0 16) 13) 'ns-toggle-toolbar)
(cons (logior (lsh 0 16) 14) 'ns-show-prefs)
+ (cons (logior (lsh 0 16) 15) 'mac-change-input-method)
@takaxp
takaxp / dict-app.el
Last active August 29, 2015 13:57
Displaying content through Dictionary.app
;;; dict-app.el --- Displaying content through Dictionary.app
;;
;; Copyright (C) 2014 Takaaki ISHIKAWA
;;
;; Author: Takaaki ISHIKAWA <takaxp at ieee dot org>
;; Maintainer: Takaaki ISHIKAWA <takaxp at ieee dot org>
;; Twitter: @takaxp
;; Repository:
;; Keywords: dictionary, dictionary.app
;;
@takaxp
takaxp / emacs-24.4-inline.patch
Created December 24, 2014 02:44
An inline patch for Emacs 24.4
diff -Nrc emacs-24.4_orig/configure.ac emacs-24.4_patched/configure.ac
*** emacs-24.4_orig/configure.ac 2014-12-07 01:37:53.000000000 +0900
--- emacs-24.4_patched/configure.ac 2014-12-07 01:40:06.000000000 +0900
***************
*** 1782,1788 ****
INSTALL_ARCH_INDEP_EXTRA=
fi
! NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o $macfont_file"
fi
@takaxp
takaxp / emacs-24.5-inline.patch
Created April 11, 2015 15:47
An inline patch for Emacs 24.5
diff -crN emacs-24.5/configure.ac emacs-24.5_patched/configure.ac
*** emacs-24.5/configure.ac 2015-04-02 16:23:06.000000000 +0900
--- emacs-24.5_patched/configure.ac 2015-04-12 00:10:11.000000000 +0900
***************
*** 1782,1788 ****
INSTALL_ARCH_INDEP_EXTRA=
fi
! NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o $macfont_file"
fi

はじめてのOrg

[1/14] 備忘録

表示サイクル

  • S-<TAB> の連打で,ツリーの内容を表示したり閉じたりできます.
  • 「*」で始まる行を「見出し」と言います
  • 見出しの上にカーソルを置いて <TAB> を押すと,その見出し以下の全てのツリーの詳細を閉じたり開いたりできます.
  • TODO キーワードを付けるのは,レベル2の見出しに限定するのをオススメします.
(with-eval-after-load "helm-swoop"
;; カーソルの単語が org の見出し(*の集まり)のとき検索対象にしない.
(setq helm-swoop-pre-input-function
#'(lambda()
(unless (thing-at-point-looking-at "^\\*+")
(thing-at-point 'symbol)))))
diff -crN emacs-25.0.90/configure.ac emacs-25.0.90_patched/configure.ac
*** emacs-25.0.90/configure.ac 2016-01-31 00:00:54.000000000 +0900
--- emacs-25.0.90_patched/configure.ac 2016-01-31 15:08:10.000000000 +0900
***************
*** 1896,1902 ****
INSTALL_ARCH_INDEP_EXTRA=
fi
! NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o $ns_fontfile"
fi
diff -crN emacs-25.0.95/configure.ac emacs-25.0.95_patched/configure.ac
*** emacs-25.0.95/configure.ac 2016-06-11 07:06:02.000000000 +0900
--- emacs-25.0.95_patched/configure.ac 2016-06-22 12:01:22.000000000 +0900
***************
*** 1916,1922 ****
INSTALL_ARCH_INDEP_EXTRA=
fi
! NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o $ns_fontfile"
fi
@takaxp
takaxp / my:init-loading-time.el
Last active March 30, 2020 00:46
my:init-loading-time
;; .emacs/init.el の先頭に記述
(defconst before-load-init-time (current-time))
(defun my:init-loading-time ()
"Loading time of user init files including time for `after-init-hook'."
(let ((time1 (float-time
(time-subtract after-init-time before-load-init-time)))
(time2 (float-time
(time-subtract (current-time) before-load-init-time))))
(message (concat "Loading init files: %.0f [msec], "
"of which %.f [msec] for `after-init-hook'.")