{"id":859,"date":"2019-11-15T17:11:50","date_gmt":"2019-11-15T08:11:50","guid":{"rendered":"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/?p=859"},"modified":"2019-11-20T13:18:09","modified_gmt":"2019-11-20T04:18:09","slug":"emacs%ef%bc%88%e3%81%82%e3%82%8b%e3%81%84%e3%81%af-emacs-d-init-el%ef%bc%89%e3%81%ae%e4%be%8b","status":"publish","type":"post","link":"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/859\/","title":{"rendered":".emacs\uff08\u3042\u308b\u3044\u306f .emacs.d\/init.el\uff09\u306e\u4f8b"},"content":{"rendered":"<p>\u6700\u8fd1\u306e .emacs \u306e\u4f8b\u3002<\/p>\n<p>\u5171\u901a\u306e\u8a2d\u5b9a\u306f\uff0csite-start.el \u306b\u66f8\u3044\u3066\u304a\u3044\u3066\uff0c\u500b\u4eba\u7684\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u8a2d\u5b9a\u306e\u307f\u3092\u66f8\u304f\u65b9\u91dd\u3067\u3002\uff08\u8ab0\u304c\u4f7f\u3063\u3066\u304f\u308c\u308b\u304b\u308f\u304b\u3089\u306a\u3044\u304c\uff09PC \u5b9f\u7fd2\u5ba4\u3067\u306e\u5229\u7528\u3092\u60f3\u5b9a\u3057\u3066\u3044\u308b\u306e\u3067\uff0c\u6700\u4f4e\u9650\uff0c\u30b9\u30bf\u30fc\u30c8\u30a2\u30c3\u30d7\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u6291\u6b62\u306e1\u884c\u304c\u3042\u308c\u3070\u3044\u3044\u304b\u3082\u3002<\/p>\n<h3>Windows \u7248 Emacs \u306e .emacs \u306e\u4f8b<\/h3>\n<ul>\n<li><a href=\"http:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/win-dot.emacs.txt\">win-dot.emacs.txt<\/a><\/li>\n<\/ul>\n<h3>macOS \u7248 Emacs \u306e .emacs \u306e\u4f8b<\/h3>\n<ul>\n<li><a href=\"http:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mac-dot.emacs.txt\">mac-dot.emacs.txt<\/a><\/li>\n<\/ul>\n<h3>Ubuntu \u7248 Emacs \u306e .emacs \u306e\u4f8b<\/h3>\n<ul>\n<li><a href=\"http:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/ubuntu-dot.emacs\">ubuntu-dot.emacs<\/a><\/li>\n<\/ul>\n<p>\u4e0a\u8a18\u30ea\u30f3\u30af\u3092\u53f3\u30af\u30ea\u30c3\u30af\u3067\u4fdd\u5b58\u3057\u3066\uff0c~\/.emacs \u3068\u3057\u3066\u304a\u304f\u3002<\/p>\n<p>\u3042\u3068\u306f\uff0cpackage-install \u3057\u305f\u3089\uff0c\u305d\u306e\u5fc5\u8981\u306a\u90e8\u5206\u3092 uncomment\u3002<\/p>\n<h3>.emacs \u306e\u5185\u5bb9<\/h3>\n<h4>\u30b9\u30bf\u30fc\u30c8\u30a2\u30c3\u30d7\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u6291\u6b62<\/h4>\n<p>.emacs \u304c\u306a\u304f\u3066\u3082\u554f\u984c\u306a\u304f\u5229\u7528\u3067\u304d\u308b\u304c\uff0c\u3084\u306f\u308a\uff0c\u6700\u4f4e\u9650\u4ee5\u4e0b\u306e1\u884c\u304c\u3042\u308b\u3068\u826f\u3044\u3002<\/p>\n<pre>(setq inhibit-startup-message t)<\/pre>\n<h4>AUCTeX \u3092 package-install \u3057\u305f\u5834\u5408\u306e\u8a2d\u5b9a\uff1a<\/h4>\n<p>Windows\/macOS\/Ubuntu \u3067 PDF viewer \u306e\u8a2d\u5b9a\u304c\u9055\u3046\u3060\u3051\u3002<\/p>\n<h5>Windows \u306e\u4f8b<\/h5>\n<pre>;;; AUCTeX\r\n;;; M-x package-install\r\n;;; auctex\r\n;;; sudo choco install sumatrapdf -y\r\n(setq japanese-TeX-engine-default 'ptex)\r\n(setq japanese-LaTeX-default-style \"jsarticle\")\r\n(setq TeX-engine 'ptex)\r\n(setq TeX-PDF-from-DVI \"Dvipdfmx\")\r\n(setenv \"Path\" (concat \"C:\\\\Program Data\\\\chocolatey\\\\bin\\\\SumatraPDF;\" (getenv \"Path\")))\r\n(setq exec-path (append exec-path '(\"C:\\\\ProgramData\\\\chocolatey\\\\bin\\\\SumatraPDF\")))\r\n(setq TeX-view-program-selection '((output-pdf \"SumatraPDF\")))<\/pre>\n<h5>macOS \u306e\u4f8b<\/h5>\n<pre>;;; AUCTeX\r\n;;; M-x package-install\r\n;;; auctex\r\n;;; brew cask install skim\r\n;;; (require 'tex-site) ;; package-install \u3057\u305f\u5834\u5408\u306f\u4e0d\u8981\u3002\r\n(setq japanese-TeX-engine-default 'ptex)\r\n(setq TeX-engine 'ptex)\r\n(setq TeX-PDF-from-DVI \"Dvipdfmx\")\r\n(add-hook 'LaTeX-mode-hook 'japanese-latex-mode)\r\n(setq japanese-LaTeX-default-style \"jsarticle\")\r\n(setq TeX-view-program-list '((\"PDFviewer\" \"open -a Skim %o\")))\r\n(setq TeX-view-program-selection '((output-pdf \"PDFviewer\")))<\/pre>\n<h5>Ubuntu \u306e\u4f8b<\/h5>\n<pre>;;; AUCTeX\r\n;;; M-x package-install\r\n;;; auctex\r\n;;; (require 'tex-site) ;; package-install \u3057\u305f\u5834\u5408\u306f\u4e0d\u8981\u3002\r\n(setq japanese-TeX-engine-default 'ptex)\r\n(setq TeX-engine 'ptex)\r\n(setq TeX-PDF-from-DVI \"Dvipdfmx\")\r\n(add-hook 'LaTeX-mode-hook 'japanese-latex-mode)\r\n(setq japanese-LaTeX-default-style \"jsarticle\")\r\n(setq TeX-view-program-list '((\"PDFviewer\" \"evince %o\")))\r\n(setq TeX-view-program-selection '((output-pdf \"PDFviewer\")))<\/pre>\n<h4>auto-complete\u3092 package-install \u3057\u305f\u5834\u5408\u306e\u8a2d\u5b9a<\/h4>\n<pre>;;; auto-complete\r\n;;; M-x package-install\r\n;;; auto-complete\r\n;;; fuzzy \u3082 package-install \u3057\u3066\u304a\u304f\u3002\r\n(require 'auto-complete-config)\r\n(ac-config-default)\r\n(add-to-list 'ac-modes 'text-mode) ;; text-mode\u3067\u3082\u81ea\u52d5\u7684\u306b\u6709\u52b9\u306b\u3059\u308b\r\n(add-to-list 'ac-modes 'latex-mode)\r\n(ac-set-trigger-key \"TAB\")\r\n(setq ac-use-menu-map t) ;; \u88dc\u5b8c\u30e1\u30cb\u30e5\u30fc\u8868\u793a\u6642\u306bC-n\/C-p\u3067\u88dc\u5b8c\u5019\u88dc\u9078\u629e\r\n(setq ac-use-fuzzy t) ;; \u66d6\u6627\u30de\u30c3\u30c1 fuzzy.el \u3082 package-install<\/pre>\n<h4>AUCTeX \u7b49\u3067 Spell \uff08\u30b9\u30da\u30eb\u30c1\u30a7\u30c3\u30af\uff09\u3092\u4f7f\u3046\u5834\u5408\u306e\u8a2d\u5b9a<\/h4>\n<p>Windows \u3067\u306f aspell \u304c\u5b9f\u8cea\u4f7f\u3048\u306a\u3044\u306e\u3067\uff0c\u4ee5\u4e0b\u306e\u8a2d\u5b9a\u306f\u7121\u7528\u3002<\/p>\n<pre>;;; Spell\r\n;;; brew install apell\r\n;;; echo \"lang en_US\" &gt;&gt; ~\/.aspell.conf\r\n(setq-default ispell-program-name \"aspell\")\r\n(eval-after-load \"ispell\"\r\n'(add-to-list 'ispell-skip-region-alist '(\"[^\\000-\\377]+\")))\r\n(add-hook 'latex-mode-hook 'flyspell-mode)<\/pre>\n<h4>\u305d\u306e\u4ed6\u306e\u500b\u4eba\u7684\u8a2d\u5b9a<\/h4>\n<p>\u6614\u304b\u3089\u8a2d\u5b9a\u3057\u3066\u3042\u308b\u5185\u5bb9\u306a\u306e\u3067\uff0c\u304a\u597d\u307f\u3067\u3002<\/p>\n<pre>;;; Text mode\r\n(setq default-major-mode 'text-mode)\r\n(add-hook 'text-mode-hook 'turn-on-auto-fill)\r\n;;; \u62ec\u5f27\u306e\u5bfe\u5fdc\u95a2\u4fc2\u3092\u30cf\u30a4\u30e9\u30a4\u30c8\u8868\u793a\r\n(show-paren-mode 1)\r\n\r\n;;; \u884c\u756a\u53f7\u306e\u8a2d\u5b9a\uff08F5 \u30ad\u30fc\u3067\u8868\u793a\u30fb\u975e\u8868\u793a\u3092\u5207\u308a\u66ff\u3048\uff09\r\n;;; linum.el \u304c\u5fc5\u8981\u3060\u3051\u3069\uff0c\u901a\u5e38\u306f\u5165\u3063\u3066\u3044\u308b\uff0e\r\n(require 'linum)\r\n(global-linum-mode 0)\r\n(global-set-key [f5] 'linum-mode)\r\n(setq linum-format\r\n(lambda (line) (propertize (format\r\n(let ((w (length (number-to-string\r\n(count-lines (point-min) (point-max))\r\n)))) (concat \"%\" (number-to-string w) \"d \"))\r\nline) 'face 'linum)))\r\n(setq linum-format \"%4d \")\r\n\r\n;;; % Time-stamp: &lt;&gt;\r\n;;; \u3068\u66f8\u3044\u3066\u304a\u304f\u3068\uff0c\u4fdd\u5b58\u3057\u305f\u3068\u304d\u306b\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u304c\u66f8\u304d\u8fbc\u307e\u308c\u307e\u3059\u3002\r\n(if (not (memq 'time-stamp write-file-hooks))\r\n(setq write-file-hooks (cons 'time-stamp write-file-hooks)))<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\u306e .emacs \u306e\u4f8b\u3002 \u5171\u901a\u306e\u8a2d\u5b9a\u306f\uff0csite-sta <a href=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/859\/\" class=\"read-more\">Read More &#8230;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[10],"tags":[],"class_list":["post-859","post","type-post","status-publish","format-standard","hentry","category-emacs"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-json\/wp\/v2\/posts\/859","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-json\/wp\/v2\/comments?post=859"}],"version-history":[{"count":8,"href":"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-json\/wp\/v2\/posts\/859\/revisions"}],"predecessor-version":[{"id":908,"href":"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-json\/wp\/v2\/posts\/859\/revisions\/908"}],"wp:attachment":[{"href":"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-json\/wp\/v2\/media?parent=859"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-json\/wp\/v2\/categories?post=859"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-json\/wp\/v2\/tags?post=859"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}