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.devel Subject: Re: sqlite3 Date: Sun, 12 Dec 2021 05:37:53 +0100 Message-ID: <87wnkah1zy.fsf@gnus.org> References: <87tufmjyai.fsf@gnus.org> <877dcil2sj.fsf@ericabrahamsen.net> <87czm98qi1.fsf@gnu.org> <87o85tcwm0.fsf@ericabrahamsen.net> <874k7ljwkr.fsf@gnus.org> <87fsr5cuzq.fsf@ericabrahamsen.net> <878rwx8mdn.fsf@gnu.org> <87r1aphuei.fsf@gnus.org> <837dcex6ub.fsf@gnu.org> <83a6h9tu1c.fsf@gnu.org> <83mtl7r1c5.fsf@gnu.org> <87fsqzihsb.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20881"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Dec 12 05:38:52 2021 Return-path: Envelope-to: ged-emacs-devel@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 1mwGdP-0005I6-S2 for ged-emacs-devel@m.gmane-mx.org; Sun, 12 Dec 2021 05:38:52 +0100 Original-Received: from localhost ([::1]:58240 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mwGdO-0005bK-Jj for ged-emacs-devel@m.gmane-mx.org; Sat, 11 Dec 2021 23:38:50 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:34774) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mwGcq-0004u3-1T for emacs-devel@gnu.org; Sat, 11 Dec 2021 23:38:16 -0500 Original-Received: from [2a01:4f9:2b:f0f::2] (port=34120 helo=quimby.gnus.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mwGci-0000xU-76; Sat, 11 Dec 2021 23:38:15 -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:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=TKFnidrXZEa7H/NoLWJu2s2uYelVWH5ih2dEjPJUD60=; b=a66B3WCZTV2T6nLrneOiDfcorN ofS+AnXCGcjL5z8/2a5R8nvPVYEAPRVnI8HHOVqapUnH+yA7THnJyyqx9BgeOYGdhXinm08YcdhrW yKoaHh16LkboJW83psw2X7479iBd0fxTNOa3ed/Z1MFI013o7tdN9O8TRtcpYhHh0k58=; 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 1mwGcb-0001iD-E0; Sun, 12 Dec 2021 05:38:04 +0100 X-Now-Playing: Shopping's _Consumer Complaints_: "Long Way Home" In-Reply-To: (Stefan Monnier's message of "Sat, 11 Dec 2021 08:59:09 -0500") X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a01:4f9:2b:f0f::2 (failed) Received-SPF: pass client-ip=2a01:4f9:2b:f0f::2; envelope-from=larsi@gnus.org; helo=quimby.gnus.org X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:281738 Archived-At: Stefan Monnier writes: > I don't think we currently have a way to deal with that, but it would be > good to add one, because sqlite files aren't the one files which are > typically large and for which we want to have a specialized mode which > gives access to its content without loading it all upfront > (e.g. archive-mode could benefit from such a thing). And for image files, too, I guess? They're currently loaded in the least efficient way imaginable -- first we put all the data into a multibyte buffer (typically using >2x the number of bytes of the original file), and then we re-read the via from image.c and display the image. So perhaps the way to make this workable, we should introduce a new thing that short-circuits most of the logic in... `find-file-noselect'? Like a `special-file-alist' (with the same syntax as `auto-mode-alist') that calls out to functions to interpret the file and present us with a buffer in the correct mode. The buffer returned shouldn't be visiting the file, I guess? Because we don't want to accidentally overwrite the file contents, since what we're displaying in the buffer is just a view into the file, and not the file itself. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no