summaryrefslogtreecommitdiff
path: root/emacs-helm.sh
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2015-05-20 06:34:54 +0200
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2015-05-20 06:34:54 +0200
commite8c2b1b7425893fa15c6c9eee00cd0dd7f7c6c67 (patch)
tree7386f5927bb8a3ee0b49472e9f0bd9822f072f92 /emacs-helm.sh
parent7c93bb80f23c09c2411e1245726f168401fd75ea (diff)
Try to fix issue with TEMP environment var on cygwin.
* emacs-helm.sh: Set TEMP to "/tmp" and use CONF_FILE to set the path to helm-cfg.el.
Diffstat (limited to 'emacs-helm.sh')
-rwxr-xr-xemacs-helm.sh11
1 files changed, 6 insertions, 5 deletions
diff --git a/emacs-helm.sh b/emacs-helm.sh
index d24128da..37b030d8 100755
--- a/emacs-helm.sh
+++ b/emacs-helm.sh
@@ -22,7 +22,8 @@
# Useful to start quickly an emacs -Q with helm.
# Run it from this directory.
-TMP="/tmp/helm-cfg.el"
+TEMP="/tmp"
+CONF_FILE="$TEMP/helm-cfg.el"
EMACS=emacs
case $1 in
@@ -54,13 +55,13 @@ if [ ! -e "$AUTO_FILE" ]; then
fi
-cat > $TMP <<EOF
+cat > $CONF_FILE <<EOF
(setq initial-scratch-message (concat initial-scratch-message
";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\
;; This Emacs is Powered by \`HELM' using\n\
;; emacs program \"$EMACS\".\n\
;; This is a minimal \`helm' configuration to discover \`helm' or debug it.\n\
-;; You can retrieve this minimal configuration in \"$TMP\" \n\
+;; You can retrieve this minimal configuration in \"$CONF_FILE\" \n\
;; Some originals emacs commands have been replaced by own \`helm' commands:\n\n\
;; - \`find-file'(C-x C-f) =>\`helm-find-files'\n\
;; - \`occur'(M-s o) =>\`helm-occur'\n\
@@ -89,8 +90,8 @@ cat > $TMP <<EOF
(unless (boundp 'completion-in-region-function)
(define-key lisp-interaction-mode-map [remap completion-at-point] 'helm-lisp-completion-at-point)
(define-key emacs-lisp-mode-map [remap completion-at-point] 'helm-lisp-completion-at-point))
-(add-hook 'kill-emacs-hook #'(lambda () (and (file-exists-p "$TMP") (delete-file "$TMP"))))
+(add-hook 'kill-emacs-hook #'(lambda () (and (file-exists-p "$CONF_FILE") (delete-file "$CONF_FILE"))))
EOF
-$EMACS -Q -l $TMP $@
+$EMACS -Q -l $CONF_FILE $@