This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-11-28
Channels
- # adventofcode (4)
- # announcements (1)
- # babashka (4)
- # beginners (23)
- # calva (15)
- # cider (8)
- # clj-kondo (30)
- # cljsrn (1)
- # clojure (29)
- # clojure-europe (15)
- # clojure-uk (2)
- # clojurescript (10)
- # community-development (4)
- # cryogen (3)
- # cursive (4)
- # emacs (3)
- # figwheel-main (2)
- # fulcro (13)
- # jobs-discuss (1)
- # kaocha (1)
- # luminus (1)
- # meander (2)
- # off-topic (78)
- # pathom (2)
- # reagent (13)
- # rewrite-clj (56)
- # ring-swagger (2)
- # tools-deps (15)
- # vim (3)
Hi. I'm looking for some help on my first elisp code. I'm using (async-shell-command)
but I don't understand how to stop the *Async Shell Command*
buffer being created (it contains no output). Here's my code:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; For react dev when CIDER offers to ;;
;; visit the url for the started cljs ;;
;; project, open using Google Chrome ;;
;; and auto open the DevTools ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun browse-url-react-dev-chrome-devtools (url &optional new-window)
"Assume Google Chrome is installed on MacOS, use open command to start Chrome with DevTools open at the passed url"
(async-shell-command (concat "open -a \"Google Chrome\" --args --new-window --auto-open-devtools-for-tabs " url) nil nil))
(defadvice cider--offer-to-open-app-in-browser (around cider--offer-to-open-app-in-browser activate)
"Wrap around the CIDER function, update the browse-url to use my function that start Google Chrome instead of Safari"
(let ((browse-url-browser-function
'browse-url-react-dev-chrome-devtools))
ad-do-it))
You can name the buffer different but I'm not sure if you can not create the async buffer.
I would use start-process-shell-command
where you can set the buffer to nil to not create a buffer for the process.
3
FYI https://emacsconf.org/2020/ starts soon