(defun get-page-title (url) "Get title of web page, whose url can be found in the current line" ;; Get title of web page, with the help of functions in url.el (with-current-buffer (url-retrieve-synchronously url)
;; find title by grep the html code (goto-char 0) (re-search-forward "<title>\\([^<]*\\)</title>" nil t 1) (setq web_title_str (match-string 1)) ;; find charset by grep the html code
(goto-char 0)
Please just ignore that I'm trying to parse XML with a regexp here.
get-page-title works when called from code but always returns bad url when called from the capture template. Is the problem the way I escape the string or is this just not the way the sexp in capture are supposed to be used?