Closed shubham-cpp closed 3 years ago
Good idea. The PR is welcome!
Does the code look right?. How can test it. I recently switched to doom emacs so dont know much about packages
Just eval the code snippet to test.
BTW, I think grip--browser
should be:
(defun grip--browser (url)
"Use browser specified by user to load URL.
Use default browser if nil."
(if grip-url-browser
(let ((browse-url-generic-program grip-url-browser)
(browse-url-browser-function 'browse-url-generic))
(browse-url url))
Made the changes but its giving me error
symbol's function definition void : browse-url-browser-function
(defun grip--browser (url)
"Use browser specified by user to load URL.
Use default browser if nil."
(if grip-url-browser
(let ((browse-url-generic-program grip-url-browser)
(browse-url-browser-function 'browse-url-generic))
(browse-url url))
Having a custom variable to define a web browser for previewing orgs/markdown would be nice. Back when I was using nvim I used surf for previewing markdown files(the reason why I used surf was because it had only one task that is view markdown files) . I searched online and found that we could change default browser for emacs globally but I wouldn't like since I also use mu4e and would like to launch urls with firefox. Now using firefox only for previewing markdown/org file is overkill. I dont know enough elisp but this is what I have come up with by searching online
I dont know if this would work cause I dont have enough knowledge about elisp