Last active
October 3, 2019 11:23
-
-
Save anquegi/132e8979604f5d563e47ec9fe33b04db to your computer and use it in GitHub Desktop.
When using ruby better errors gem and emacs restclient package, When the Api has an error the raw html of better errors is the response so in order to filter the filename and line you can use this function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun better-errors-file () | |
(interactive) | |
(let ((root (libxml-parse-html-region (point-min) (point-max)))) | |
(message "file: %s at line: %s" | |
(dom-attr (dom-by-class root "application") 'data-full-filename) | |
(dom-attr (dom-by-class root "application") 'data-line)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment