My personal dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
664 B

emacsclient -n -e \
;; Load the file
(find-file \"$file\")
;; Jump to the same point as in IntelliJ
;; Unfortunately, IntelliJ doesn't always supply the values
;; depending on where the open is invoked from; e.g. keyboard
;; works, tab context doesn't
(when (not (string= \"\" \"$line\"))
(goto-char (point-min))
(forward-line (1- $2))
(forward-char (1- $3)))
;; Raise/focus our window; depends on the windowing system
(if (string-equal system-type \"darwin\")
(ns-do-applescript \"tell application \\\"Emacs\\\" to activate\")
;; Automatically pick up changes made in IntelliJ
(auto-revert-mode t))"