Running emacs 25.2.2.
Here is something (apparently) simple I want to do, but am unable to:
- I am editing an html document. I want to see the same document in the internal browser in a vertically split window.
- Now, if I make any changes to my html document and hit a key (may be, save buffer could be the trigger), the browser buffer is updated to reflect the changes.
- The scrolling between the two buffers is synchronized
I can C-c C-v (browse-url-of-buffer)
but that does not help because there is no way of updating the browser buffer. Moreover, the scrolling is not synchronized.
How do I get this done?
w3m
executable, then there is a complimentary Lisp library that can help you view an html file like a web-browser (within Emacs) -- although, not as fancy as Firefox and so forth. Another library (which I believe is all Lisp and does not require an executable) is calledshr
-- I've only used it once and am by no means an expert. Although I love to do everything in Emacs, if you are doing any sort of web development, then you will want to do astart-process
or the equivalent thereof and use the real browser that your target audience will be using.post-command-hook
), there will undoubtedly be a significant trade-off in terms of performance in Emacs because the working buffer will need to be rendered every command loop and updated in the target buffer. The slow-down in performance is probably a deal-breaker, but maybe you'll have good luck ... Perhaps after every save would be a better way to do it ... [Personally, I rsync a draft to the shared server and view the live draft version in an external web browser.]