GNU bug report logs -
#16733
messed up unicode chars in package description
Previous Next
Reported by: Glenn Morris <rgm <at> gnu.org>
Date: Thu, 13 Feb 2014 01:48:02 UTC
Severity: normal
Found in version 24.3
Fixed in version 24.4
Done: Juanma Barranquero <lekktu <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #139 received at 16733 <at> debbugs.gnu.org (full text, mbox):
On Tue, Mar 25, 2014 at 4:35 AM, Stefan Monnier
<monnier <at> iro.umontreal.ca> wrote:
> The old package.el code included (buffer-substring-no-properties (point)
> (line-end-position)) in the message. Would it make sense to put it here
> as well?
It's the HTTP error description. As the "no buffer" case doesn't have
such a description, I've modified url-insert-file-contents so in tha
case it returns "No Data", to match "Not Found" and other HTTP errors.
That's the resulting url-i-f-c:
(defun url-insert-file-contents (url &optional visit beg end replace)
(let ((buffer (url-retrieve-synchronously url)))
(unless buffer (signal 'file-error (list url "No Data")))
(with-current-buffer buffer
(let ((response (url-http-parse-response)))
(if (and (>= response 200) (< response 300))
(goto-char (point-min))
(let ((desc (buffer-substring-no-properties (1+ (point))
(line-end-position))))
(kill-buffer buffer)
(signal 'file-error (list url desc))))))
(if visit (setq buffer-file-name url))
(save-excursion
(let* ((start (point))
(size-and-charset (url-insert buffer beg end)))
(kill-buffer buffer)
(when replace
(delete-region (point-min) start)
(delete-region (point) (point-max)))
(unless (cadr size-and-charset)
;; If the headers don't specify any particular charset, use the
;; usual heuristic/rules that we apply to files.
(decode-coding-inserted-region start (point) url visit beg
end replace))
(list url (car size-and-charset))))))
This bug report was last modified 11 years and 63 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.