[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Mysterious gzipped images
From: |
Lars Magne Ingebrigtsen |
Subject: |
Re: Mysterious gzipped images |
Date: |
Wed, 14 Aug 2013 01:40:00 +0200 |
User-agent: |
Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux) |
I was tracking down a parsing problem, and the cause was that
zlib-decompress-region moves point around. If it left point "where it
was" (for some value of), then things would be OK. And that seems like
a nicer behaviour, anyway.
So I tried the following, but it doesn't help. Point is stubbornly at
the end of the buffer here:
(url-retrieve "https://icons.duckduckgo.com/i/a-z-animals.com.ico" (lambda
(&rest ignore) (pop-to-buffer (current-buffer))))
I'm probably doing something stupid, and I'm too tired to see what it
is. gdb claims that old_point is what is should be -- the start of the
body.
=== modified file 'src/decompress.c'
--- src/decompress.c 2013-08-13 21:17:09 +0000
+++ src/decompress.c 2013-08-13 23:28:30 +0000
@@ -95,12 +95,14 @@
struct decompress_unwind_data *data = ddata;
fn_inflateEnd (data->stream);
- /* Delete any uncompressed data already inserted and restore point. */
+ /* Delete any uncompressed data already inserted on error. */
if (data->start)
- {
- del_range (data->start, PT);
- SET_PT (data->old_point);
- }
+ del_range (data->start, PT);
+
+ /* Put point where it was, or if the buffer has shrunk because the
+ compressed data is bigger than the uncompressed, at
+ point-max. */
+ SET_PT (min (data->old_point, ZV));
}
DEFUN ("zlib-available-p", Fzlib_available_p, Szlib_available_p, 0, 0, 0,
--
(domestic pets only, the antidote for overdose, milk.)
No Gnus T-Shirt for sale: http://ingebrigtsen.no/no.php
and http://lars.ingebrigtsen.no/2013/08/twenty-years-of-september.html
- Re: Mysterious gzipped images, (continued)
- Re: Mysterious gzipped images, Stefan Monnier, 2013/08/11
- Re: Mysterious gzipped images, Lars Magne Ingebrigtsen, 2013/08/12
- Re: Mysterious gzipped images, Stefan Monnier, 2013/08/12
- Re: Mysterious gzipped images, Eli Zaretskii, 2013/08/12
- Re: Mysterious gzipped images, Lars Magne Ingebrigtsen, 2013/08/12
- Re: Mysterious gzipped images, Eli Zaretskii, 2013/08/12
- Re: Mysterious gzipped images, Eli Zaretskii, 2013/08/12
- Re: Mysterious gzipped images, Eli Zaretskii, 2013/08/12
- Re: Mysterious gzipped images, Lars Magne Ingebrigtsen, 2013/08/12
- Re: Mysterious gzipped images, Eli Zaretskii, 2013/08/12
- Re: Mysterious gzipped images,
Lars Magne Ingebrigtsen <=
- Re: Mysterious gzipped images, Lars Magne Ingebrigtsen, 2013/08/14
- Re: Mysterious gzipped images, Eli Zaretskii, 2013/08/14
- Re: Mysterious gzipped images, Lars Magne Ingebrigtsen, 2013/08/17
- Re: Mysterious gzipped images, Eli Zaretskii, 2013/08/17
- Re: Mysterious gzipped images, Eli Zaretskii, 2013/08/17
- Re: Mysterious gzipped images, Lars Magne Ingebrigtsen, 2013/08/18
- Re: Mysterious gzipped images, RĂ¼diger Sonderfeld, 2013/08/07
- FFI (was: Mysterious gzipped images), Stefan Monnier, 2013/08/07
- FFI (was: Mysterious gzipped images), Stephen J. Turnbull, 2013/08/07