From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#52569: 29.0.50; Wishlist: There should be a way for packages to handle files without reading them in first Date: Mon, 20 Dec 2021 10:53:54 +0100 Message-ID: <87mtkvppot.fsf@gnus.org> References: <87tuf7zksh.fsf@gnus.org> <861r28io75.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38608"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 52569@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 21 05:10:58 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mzWUL-0009qF-Ld for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 21 Dec 2021 05:10:57 +0100 Original-Received: from localhost ([::1]:54942 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mzWUK-0008Ea-Ou for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 20 Dec 2021 23:10:56 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:35950) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzWTW-0006P4-OS for bug-gnu-emacs@gnu.org; Mon, 20 Dec 2021 23:10:06 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40451) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mzWTT-0008On-O0 for bug-gnu-emacs@gnu.org; Mon, 20 Dec 2021 23:10:06 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mzWTT-0000Vj-KB for bug-gnu-emacs@gnu.org; Mon, 20 Dec 2021 23:10:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 21 Dec 2021 04:10:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52569 X-GNU-PR-Package: emacs Original-Received: via spool by 52569-submit@debbugs.gnu.org id=B52569.16400597821894 (code B ref 52569); Tue, 21 Dec 2021 04:10:03 +0000 Original-Received: (at 52569) by debbugs.gnu.org; 21 Dec 2021 04:09:42 +0000 Original-Received: from localhost ([127.0.0.1]:51991 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mzWT7-0000UT-PQ for submit@debbugs.gnu.org; Mon, 20 Dec 2021 23:09:42 -0500 Original-Received: from quimby.gnus.org ([95.216.78.240]:60132) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mzWT6-0000UH-U6 for 52569@debbugs.gnu.org; Mon, 20 Dec 2021 23:09:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Resent-Message-ID:Resent-Date:Resent-From: Resent-To:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Sender:Resent-Cc:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=3VfBrhIccToVf1JJvL7WQT/+J9rO3q7OkRGKu9htlvE=; b=GyrtFryRaS/RXub3ZKtdjWIO1u BzdPNFjsQwbllRnJUnQcXF+NvPuduIFPBAXm7zsT2ydRgqxlKVOJU39S9isZpp0jQW3FB40XbaJTI tGsPyHwgAfbxJ1UhZsCJ/yS7fDG3JusUtPEW//6W4bn6pQVOnQ9QYQhEiJFnSBtdbrbE=; Original-Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mzWSy-0002oY-Vd for 52569@debbugs.gnu.org; Tue, 21 Dec 2021 05:09:35 +0100 Resent-X-Now-Playing: Heidi Berry's _Love_: "Gloria" Resent-To: 52569@debbugs.gnu.org Resent-From: Lars Ingebrigtsen Resent-Date: Tue, 21 Dec 2021 05:09:31 +0100 Resent-Message-ID: <87ee66lhtw.fsf@gnus.org> X-From-Line: nobody Mon Dec 20 10:53:58 2021 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACVBMVEWOoVlMZDn///9k 6/PIAAAAAWJLR0QCZgt8ZAAAAAd0SU1FB+UMFAkxCrmP2HsAAAFESURBVCjPRVFBDuQwCDNSuKdS +A+RmjuR4P9fWdMd7ebSOAZsXIBnYMx4+yaJwFCYF1xLHJgVFkBV34HFqvhAQJdpg5KA8N1gBLvu hChbiE7VADzZTxJKPpsi5lTJU2BJ1fW20c+ZJBKmG/1uFbRDvUFRspcjEl7q99btVpSr63cl6DW0 fiBi/gf3vp/L5iGie44pY9LBddHRJw73L31YMrjsYAZ7TpGXlYKzG4BgDepsVfEnpy+cDorlPInn S7LjqPjikr+aDHH/qrT4fhw/N9zH//UUZt7AuxSHJcnUOhjoFrIJPQd4juEpH0+q49HLELGYVFXr VI6VztC6hy0fEebajE2qs06Qiz1ZVLj0PXzFsqAx/tNB49PcMKzLqMjkocYPg5DqZV6UTs4+QiOL FsM5zSlEvz73sAeRjEq5txqTnbA/cGxYvOKgEBwAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjEtMTIt MjBUMDk6NDk6MTArMDA6MDDZqP18AAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIxLTEyLTIwVDA5OjQ5 OjEwKzAwOjAwqPVFwAAAAABJRU5ErkJggg== X-Now-Playing: The Lilac Time's _Strange Folk_: "Morning Sun" In-Reply-To: <861r28io75.fsf@mail.linkov.net> (Juri Linkov's message of "Sun, 19 Dec 2021 19:16:42 +0200") Original-Lines: 52 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:222843 Archived-At: Juri Linkov writes: >> This would be useful for large files like .sqlite and images. > > I'm not sure about images since some image formats are editable, > like .svg, .xpm, .ps... I think we'd want to keep the traditinal auto-mode-alist for the editable image formats. > Only .pdf with in doc-view-mode could have this optimization of not > loading the whole file. Also archive files could benefit from this > optimization. arc-mode interprets zip files etc by itself, so I think that would be a bigger challenge. >> This function would be called with the file name and would be >> responsible for returning a buffer that "displays" the file in some >> sense. > > Or when it returns t, this could mean that the function displayed > the buffer in some other way, for example, by calling an external command. > > Then find-file-alist could be used to implement a smarter > dired-guess-shell-alist like for https://debbugs.gnu.org/18132#92 > So not only files visited by dired will be redirected > to an external command, but also files visited by C-x C-f. Hm... interesting idea... I think I'll have to ponder that more, because that'd be a real user interface change, while the thing I was thinking of here wouldn't be very apparent to the user at all -- it'd just make things faster. >> There's some details that aren't clear. Should this new buffer be >> visiting the file? That sounds dangerous, because saving the buffer >> contents to the file would destroy the file. But that could be handled >> by... write-file-functions? > > Also functions that ask about saving a modified file buffer should > probably skip such buffers. Yes, probably. > non-persistent-file-mode, or transient-file-mode, or ephemeral-mode... Hm... if `view-mode' wasn't taken already, perhaps that would have been an option. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no