Table of Contents

Editing paths

(setenv "PATH" (concat "/anaconda/bin:/opt/local/bin:" (getenv "PATH") ))
(setq exec-path (append '("/anaconda/bin") exec-path))

Spell/language check

;; Ispell/Aspell (OS X)
(setq ispell-program-name "/opt/local/bin/ispell")
;; LanguageTool
;; https://joelkuiper.eu/spellcheck_emacs
(setenv "JAVA_HOME"
        (let ((version "1.8"))
          (replace-regexp-in-string "\r?\n\\'" ""
                                    (shell-command-to-string
                                     (format "/usr/libexec/java_home -v %s" version)))))
(require 'langtool)
(setq langtool-language-tool-jar "~/programs/LanguageTool/languagetool-commandline.jar"
      langtool-mother-tongue "en"
      langtool-disabled-rules '("WHITESPACE_RULE"
                                "EN_UNPAIRED_BRACKETS"
                                "COMMA_PARENTHESIS_WHITESPACE"
                                "EN_QUOTES"))

run with M-x flyspell-buffer and M-x langtool-check-buffer.

Apparently, RMS mentioned wanting to see more word-processing features in Emacs, saying that "I would like to see it extended to operate as a word processor, editing formatted text" upon relinquishing his role as maintaner of this project.

If writing in LaTeX, sometimes I export the .tex file to .rtf using latex2rtf or $ detex filename.tex > filename.txt and open in MS Word for visual spell/grammar check.

Use dired+

(require 'dired+)

AUCTeX

To use with PDFLaTeX and Preview.app (Mac OS X). Use C-c C-c LaTeX to run PDFLaTeX; C-c C-c View or C-c C-v to open pdf with Preview.

(add-hook 'LaTeX-mode-hook 
          (lambda () 
            (setq TeX-PDF-mode t)
            (setq TeX-command-list 
                  (let ((view-command '("View" 
                                        "open -a Preview.app %s.pdf" 
                                        TeX-run-discard-or-function t t 
                                        :help "Run Viewer"))) ;; edit this list as necessary
                    (mapcar (lambda (x) 
                              (if (equal (car x) "View") view-command x))
                            TeX-command-list)))))

open iTerm

(defun iterm-here ()
  "from http://www.reddit.com/r/emacs/comments/27xoo5/open_current_directory_in_iterm2_from_emacs/"
  (interactive)
  (dired-smart-shell-command (format "open -a iTerm \"%s\"" default-directory) nil nil))


Emacs pages: main aprl-config


Generated by Org-mode 9.2 with Emacs 26