unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Dani Moncayo <dmoncayo@gmail.com>, 18823@debbugs.gnu.org
Subject: bug#18823: Built-in support for visiting compressed files
Date: Tue, 13 Jul 2021 23:28:44 +0200	[thread overview]
Message-ID: <87h7gxoqcz.fsf_-_@gnus.org> (raw)
In-Reply-To: <83wq7o4hzn.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 25 Oct 2014 12:27:08 +0300")

Eli Zaretskii <eliz@gnu.org> writes:

> So I think the requested feature could be reworded as follows: enhance
> jka-compr to support internal decompression methods such as
> zlib-decompress-region.

I've now added this to Emacs 28.  I added it as a fallback (when the
external programme doesn't exist), because that seemed least likely to
break something, but we could consider reversing the code (since it's
likely to be faster to use the internal function).

This also reminded me that I wanted to add a function that does the
"reverse" of `insert-buffer-substring', which I don't think we have.  That
is, to allow saying

(let ((buf (current-buffer)))
  (with-temp-buffer
    (create-lots-of-data)
    (insert-into-buffer buf (point-min) (point-max))))

in an efficient way.  When dealing with temporary buffers, you have to
contort yourself to use `insert-buffer-substring' in the other
direction, and

(insert
  (with-temp-buffer
    ...
    (buffer-string)))

is pretty inefficient.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  reply	other threads:[~2021-07-13 21:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-25  9:17 bug#18823: 24.4; Built-in support on MS-Windows for visiting compressed files Dani Moncayo
2014-10-25  9:27 ` Eli Zaretskii
2021-07-13 21:28   ` Lars Ingebrigtsen [this message]
2021-07-14 12:49     ` bug#18823: Built-in support " Eli Zaretskii
2021-07-14 13:05       ` Lars Ingebrigtsen
2021-07-14 13:16         ` Eli Zaretskii
2021-07-14 13:17           ` Lars Ingebrigtsen
2021-07-14 13:50           ` Lars Ingebrigtsen
2014-10-25  9:37 ` bug#18823: 24.4; " Dani Moncayo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h7gxoqcz.fsf_-_@gnus.org \
    --to=larsi@gnus.org \
    --cc=18823@debbugs.gnu.org \
    --cc=dmoncayo@gmail.com \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).