4140 |
|
|
4141 |
(defalias 'fsi-shell-test 'erbnoc-shell-test) |
(defalias 'fsi-shell-test 'erbnoc-shell-test) |
4142 |
|
|
4143 |
|
(defmacro erbnoc-with-web-page-buffer (site &rest body) |
4144 |
|
(let ((buffer (make-symbol "web-buffer"))) |
4145 |
|
`(let ((,buffer (url-retrieve-synchronously ,site))) |
4146 |
|
(save-excursion |
4147 |
|
(set-buffer ,buffer) |
4148 |
|
(goto-char (point-min)) |
4149 |
|
(prog1 |
4150 |
|
(progn |
4151 |
|
,@body) |
4152 |
|
(kill-buffer ,buffer)))))) |
4153 |
|
|
4154 |
(defun fsi-wserver (&optional site &rest args) |
(defun fsi-wserver (&optional site &rest args) |
4155 |
(unless site (error (format "Syntax: %s wserver SITE" erbnoc-char))) |
(unless site (error (format "Syntax: %s wserver SITE" erbnoc-char))) |
4156 |
(setq site (format "%s" site)) |
(setq site (format "%s" site)) |
4157 |
(let ((buffer (url-retrieve-synchronously site))) |
(erbnoc-with-web-page-buffer site |
4158 |
(save-excursion |
(buffer-substring (point-min) |
4159 |
(set-buffer buffer) |
(or (search-forward "\n\n" nil t) |
4160 |
(goto-char (point-min)) |
(point-max))))) |
|
(prog1 |
|
|
(buffer-substring (point-min) |
|
|
(or (search-forward "\n\n" nil t) |
|
|
(point-max))) |
|
|
(kill-buffer buffer))))) |
|
4161 |
|
|
4162 |
(defalias 'fs-webserver 'fs-wserver) |
(defalias 'fs-webserver 'fs-wserver) |
4163 |
|
|
4164 |
(defun fsi-web (&optional site &rest args) |
(defun fsi-web (&optional site &rest args) |
4165 |
(unless site (error (format "Syntax: %s web SITE" erbnoc-char))) |
(unless site (error (format "Syntax: %s web SITE" erbnoc-char))) |
4166 |
(setq site (format "%s" site)) |
(setq site (format "%s" site)) |
4167 |
(let ((buffer (url-retrieve-synchronously site))) |
(erbnoc-with-web-page-buffer site |
4168 |
(save-excursion |
(shell-command-on-region (or (search-forward "\n\n" nil t) |
4169 |
(set-buffer buffer) |
(point-min)) |
4170 |
(goto-char (point-min)) |
(point-max) |
4171 |
(shell-command-on-region (or (search-forward "\n\n" nil t) |
"w3m -dump -T text/html" t t) |
4172 |
(point-min)) |
(buffer-substring (point) (mark)))) |
4173 |
(point-max) |
|
|
"w3m -dump -T text/html" t t) |
|
|
(prog1 |
|
|
(buffer-substring (point) (mark)) |
|
|
(kill-buffer buffer))))) |
|
4174 |
|
|
4175 |
;;;###autoload |
;;;###autoload |
4176 |
(defun fsi-length-load-history () |
(defun fsi-length-load-history () |