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 / ns-26.1.50-mojave-inline.sh
Last active September 24, 2019 15:53
Build script for NS build with inline-patch for macOS Mojave (26.1.50) (see also https://qiita.com/takaxp/items/e07bb286d80fa9dd8e05)
#!/bin/sh
cd ~/Desktop
git clone git://git.sv.gnu.org/emacs.git
curl -LO https://gist.githubusercontent.com/takaxp/3314a153f6d02d82ef1833638d338ecf/raw/156aaa50dc028ebb731521abaf423e751fd080de/emacs-25.2-inline.patch
cd emacs
# git reset --hard 6217746dd6
git checkout -b emacs-26
git reset --hard 9ad0f1d15c
@takaxp
takaxp / ns-26.1.50-mojave-googleime.sh
Last active September 24, 2019 15:54
Build script for NS build with inline-patch in macOS Mojave (26.1.50, googleime) (see also https://qiita.com/takaxp/items/e07bb286d80fa9dd8e05)
#!/bin/sh
cd ~/Desktop
git clone git://git.sv.gnu.org/emacs.git
curl -LO https://gist.githubusercontent.com/takaxp/5294b6c52782d0be0b25342be62e4a77/raw/9c9325288ff03a50ee26e4e32c8ca57c0dd81ace/emacs-25.2-inline-googleime.patch
# curl -LO https://gist.githubusercontent.com/takaxp/01ff965361d70de93e9aba3795193cc7/raw/4265d48c13f33a2046669086756c85a2bb83c318/ns-private.patch
cd emacs
# git reset --hard 6217746dd6
git checkout -b emacs-26
@takaxp
takaxp / ns-mojave.sh
Last active September 24, 2019 15:54
Build script for NS build with inline-patch in macOS Mojave (see also https://qiita.com/takaxp/items/e07bb286d80fa9dd8e05)
#!/bin/sh
cd ~/Desktop
git clone git://git.sv.gnu.org/emacs.git
curl -LO https://gist.githubusercontent.com/takaxp/77bfc397a2c807281453e8b8b2dfb2b7/raw/44345fa64a0ac97cb324a85a10a8ed49b4f4440c/emacs-26-mojave-inline.patch
# curl -LO https://gist.githubusercontent.com/takaxp/d884e91af3970d0923c3186f8f7188e2/raw/2b8c04e9a27fa5c1e992505bfb0e62e774c03dfe/emacs-26-mojave-googleime.patch
# curl -LO https://gist.githubusercontent.com/takaxp/8a29cd35a9cd56a5ae17e58e652e58c2/raw/948a5654ccd5d552916a072de2d6367a1dd835ed/emacs-26-mojave-ns-private.patch
cd emacs
git reset --hard 6217746dd6
@takaxp
takaxp / emacs-26-mojave-ns-private.patch
Last active September 24, 2019 15:54
Emacs NS build for mojave ns-private patch (master@6217746dd6) (see also https://qiita.com/takaxp/items/e07bb286d80fa9dd8e05)
diff -crN emacs-26/src/nsfns.m emacs-26-mojave/src/nsfns.m
*** emacs-26/src/nsfns.m 2018-10-01 00:57:49.000000000 +0900
--- emacs-26-mojave/src/nsfns.m 2018-10-01 01:01:35.000000000 +0900
***************
*** 1186,1192 ****
x_default_parameter (f, parms, Qborder_width, make_fixnum (0),
"borderwidth", "BorderWidth", RES_TYPE_NUMBER);
! x_default_parameter (f, parms, Qinternal_border_width, make_fixnum (2),
"internalBorderWidth", "InternalBorderWidth",
@takaxp
takaxp / emacs-26-mojave-googleime.patch
Last active September 24, 2019 15:54
Emacs NS build for mojave googleime patch (master@6217746dd6) (see also https://qiita.com/takaxp/items/e07bb286d80fa9dd8e05)
diff -crN emacs-26/src/macim.m emacs-26-mojave/src/macim.m
*** emacs-26/src/macim.m 2018-10-01 00:57:49.000000000 +0900
--- emacs-26-mojave/src/macim.m 2018-10-01 00:59:06.000000000 +0900
***************
*** 96,101 ****
--- 96,122 ----
locale = [[NSLocale currentLocale]
objectForKey:NSLocaleLanguageCode];
}
+ if ( [locale hasPrefix:@"ja"] ) {
@takaxp
takaxp / emacs-26-mojave-inline.patch
Last active September 24, 2019 15:54
Emacs NS build for mojave inline patch (master@6217746dd6) (see also https://qiita.com/takaxp/items/e07bb286d80fa9dd8e05)
diff -crN emacs-26/configure.ac emacs-26-mojave/configure.ac
*** emacs-26/configure.ac 2018-10-01 00:54:21.000000000 +0900
--- emacs-26-mojave/configure.ac 2018-10-01 00:01:39.000000000 +0900
***************
*** 1977,1983 ****
INSTALL_ARCH_INDEP_EXTRA=
fi
! NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o $ns_fontfile"
fi
@takaxp
takaxp / emacs-26-mojave-inline-googleime-with-private.patch
Last active September 24, 2019 15:54
A test patch for NS build in Mojave (master@6217746dd6) (see also https://qiita.com/takaxp/items/e07bb286d80fa9dd8e05)
diff -cr emacs-26/configure.ac emacs-26-mojave/configure.ac
*** emacs-26/configure.ac 2018-09-30 23:43:54.000000000 +0900
--- emacs-26-mojave/configure.ac 2018-09-30 15:17:01.000000000 +0900
***************
*** 1977,1983 ****
INSTALL_ARCH_INDEP_EXTRA=
fi
! NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o $ns_fontfile"
fi
@takaxp
takaxp / ns-26.1-mojave-alpha.sh
Last active September 24, 2019 15:54
Build script for Emacs 26.1 on Mojave (alpha) without IME patch (not work) (see also https://qiita.com/takaxp/items/e07bb286d80fa9dd8e05)
#!/bin/sh
cd ~/Desktop
mkdir emacs_ns
cd ~/Desktop/emacs_ns
#VERSION=26.0.91
VERSION=26.1
#POSTFIX=-rc1
curl -LO ftp://ftp.gnu.org/gnu/emacs/emacs-$VERSION.tar.gz
# curl -LO ftp://alpha.gnu.org/gnu/emacs/pretest/emacs-$VERSION$POSTFIX.tar.xz
@takaxp
takaxp / org-element.patch
Created July 9, 2018 19:19
Fix wrong cursor position when find-file org files with session-mode
diff --git a/lisp/org-element.el b/lisp/org-element.el
index d757e65fa..387777ceb 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -4079,6 +4079,7 @@ If STRING is the empty string or nil, return nil."
((equal string "") nil)
(t (let ((local-variables (buffer-local-variables)))
(with-temp-buffer
+ (set (make-local-variable 'session-file-alist) nil)
(dolist (v local-variables)
@takaxp
takaxp / advice-yatex-msg.el
Last active June 19, 2018 08:53
Suppress annoying messages
(with-eval-after-load "yatex"
(put 'YaTeX-insert-braces 'begend-guide 2)
(defun advice:YaTeX-insert-begin-end (env region-mode)
"Insert \\begin{mode-name} and \\end{mode-name}.
This works also for other defined begin/end tokens to define the structure."
(setq YaTeX-current-completion-type 'begin)
(let*((ccol (current-column)) beg beg2 exchange
(_arg region-mode) ;for old compatibility
(indent-column (+ ccol YaTeX-environment-indent))(_i 1) _func)
(if (and region-mode (> (point) (mark)))