emacs-china / Spacemacs-rocks

Happy Hacking Emacs & Spacemacs (Simplified Chinese)
http://book.emacs-china.org
2.12k stars 325 forks source link

Spacemacs Rocks 第二季: Day 6 #60

Open zilongshanren opened 8 years ago

zilongshanren commented 8 years ago

原帖地址:https://emacs-china.org/t/21-emacs/74

oit63 commented 8 years ago

牛X,

ghost commented 8 years ago

准备听着入睡。。。。。。我以为上新了呢。。。。。。。。

moonkeeper commented 5 years ago

hi, zilongshanren: 这段获取url的代码, 在我的环境下出现 message buffer "let: Applescript error 1" 环境 : mac mojave 10.14.5, emacs26.1, org-mode 9.1.9 错误提示很少, 我不知道如何处理, 望指教 (defun YOUR_NAME/retrieve-chrome-current-tab-url() "Get the URL of the active tab of the first window" (interactive) (let ((result (do-applescript (concat "set frontmostApplication to path to frontmost application\n" "tell application \"Google Chrome\"\n" " set theUrl to get URL of active tab of first window\n" " set theResult to (get theUrl) \n" "end tell\n" "activate application (frontmostApplication as text)\n" "set links to {}\n" "copy theResult to the end of links\n" "return links as string\n")))) (format "%s" (s-chop-suffix "\"" (s-chop-prefix "\"" result)))))