From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Support for Sqlite Archive files Date: Fri, 21 Jun 2024 22:48:06 +0300 Message-ID: <86o77ujcw9.fsf@gnu.org> References: <86ed8qlepr.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4958"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Vladimir Kazanov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jun 21 21:48:58 2024 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 1sKkFm-00012y-8N for ged-emacs-devel@m.gmane-mx.org; Fri, 21 Jun 2024 21:48:58 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sKkF2-0005H5-At; Fri, 21 Jun 2024 15:48:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sKkF0-0005GU-LX for emacs-devel@gnu.org; Fri, 21 Jun 2024 15:48:10 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sKkF0-000711-CX; Fri, 21 Jun 2024 15:48:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Wcy3gmqGnD5vR5eChgCt6GpuYYKzgvoR+D9WIVdeuxI=; b=c9tch0R4QokS ALAFXw/etJTC+BPExPHF/O2f685cYCQebCjdmO0VOIsyoqlZkXJFd02RSvr6hziIbjRXX1Qh5cYSy HxdyDpnJQ7VusXUKv0fkGFsN6e9llx2p5HTrN1083QAllAYA+8WppEmXbC6xxaw1E9Zp2jm5+Cg/d /3+sofEo7OOshJpJOCVvvxguN0Gnck0+4jTXqqGWNIKpsiF4eiiR04IODoQCZbPtQUg4Uhe2vPRBd eZtu/N1mK4qV09cCpkcM/oX7i3cu+kbkScMDE0Q0IVL/TnvivUDg6sU5p/Dq3S0cuTkB6UR+1XPjK 2m9D9gJ8jBsAKluErUK0Pw==; In-Reply-To: (message from Vladimir Kazanov on Fri, 21 Jun 2024 20:42:07 +0100) 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:320439 Archived-At: > From: Vladimir Kazanov > Date: Fri, 21 Jun 2024 20:42:07 +0100 > Cc: emacs-devel@gnu.org > > Thanks for looking into this! > > On Fri, 21 Jun 2024 at 12:26, Eli Zaretskii wrote: > > > Thanks, but why do we need a cli utility when we have built-in SQLite > > support? Can't we access the SQLite Archive files via that built-in > > support? I'd prefer to have that instead of relying on external > > utility. > > That's what I thought. I began exploring SQLite Archives in the > context of some other idea of mine related to buffers backed by > databases instead of files > (https://mail.gnu.org/archive/html/emacs-devel/2024-06/msg00344.html). > > But it turns out that archive-mode has rather strong assumptions about > having to run external utilities. Nothing impossible but code-wise it > is just easier. Why do it via arc-mode at all? why not directly via sqlite.c? Also, arc-mode can use internal methods as well, not only external utilities. > > In any case, the code you posted should at least bind > > coding-system-for-read and coding-system-for-write to utf-8 (and > > perhaps also file-name-coding-system if necessary), since AFAIU SQLite > > databases use UTF-8 encoding for text. Suggest to try your code in a > > non-UTF-8 locale to see if it works or not. > > > > Well, it works on all Linux flavours :-) Including when the locale has non-UTF-8 codeset? > > The version should be 31.1, I think (as Emacs 30 will start its > > release cycle very soon). > > Can I make it in time for Emacs 30 by any chance? Unlikely, since Emacs 30 will not get new features anymore. Sorry.