From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Vladimir Kazanov Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Support for Sqlite Archive files Date: Fri, 21 Jun 2024 20:42:07 +0100 Message-ID: References: <86ed8qlepr.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16214"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jun 21 21:43:20 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 1sKkAJ-00041q-5l for ged-emacs-devel@m.gmane-mx.org; Fri, 21 Jun 2024 21:43:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sKk9Q-0003lr-7c; Fri, 21 Jun 2024 15:42:24 -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 1sKk9P-0003li-G5 for emacs-devel@gnu.org; Fri, 21 Jun 2024 15:42:23 -0400 Original-Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sKk9N-00067H-SH; Fri, 21 Jun 2024 15:42:23 -0400 Original-Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-52cd790645eso950425e87.3; Fri, 21 Jun 2024 12:42:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718998939; x=1719603739; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=acBjRLKhqq7Hgu1fxl7oXHqBmpCzgy6XVmKaY6mwUSI=; b=d1bA+Pl1TWdqU5ywVppkrZ/v+LlVuBFYZ4m/ZZdJfCRGCJZ1Tc1cAEz3jjOWxNn0Cj Lfphk6NbAdhVkvyFWPy3PXwR9+rZi9yZJWzO2PSBfyTf9Mxz72Mpg9YLwoK1+k0BCQEf fXVP/+xr1OVv7r2IbxMzwJwflrtXggdvQDJTQo2m1U4Dn28733oZv4ntHeLumCkc7DWp UjJJJF/sms7d7/OHjdU0vggLlPNli7Y/w7JMgJ5B3B1NMwR+e7MdHTtmPBnQivhd3g4Y EjuY7lXS1RCMzFzQtAZYZeTexdsyLTAoMm2xsfQjCAO3GN+y6LAl0VKowOdYzGr8pr+a 2wCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718998939; x=1719603739; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=acBjRLKhqq7Hgu1fxl7oXHqBmpCzgy6XVmKaY6mwUSI=; b=puffQmFl1s4+Xsi6OI/SiWsWxQFpSCqua7I7wk5a1aMv/nicBAtppxNvQ1qgnTmRc2 Bhj/o/S1wPPDQaTrcWB2czrCLqINDcbQ9Q+NHbv3JUr2UJNNYzonNfwCNL7v2D4hfEmw 5iycbkGYzt7SImnroKRryYhUuCCf3D0baBbkViQgixH4ofuXt/ycEH9st6cByGBONjn+ bX+8SU1J1Q5lMlnlXivVrroBGe8IWkFHzvHDqrwcQ9hfGttt7TrBPe9GnICIqIgMnV3e 0H4FegkbWhW1agwUpPpUhRXtSeBonl3FuUiZEMCTCC5X4hxodOLcgcu5Tuy86Aq7Z4mV FraA== X-Gm-Message-State: AOJu0Yz29BSeO61X3ZJWuCHcpuOwbl2Fkg0TrRcuGkx3S3zrJhEsu3wE fMfC9ZGauw1BcpuKL01DvRdY2vlo2Z+4TJwW1CYqcxtvPkamkqGtvbE0BkHmRefb4343NKUx/9h KFfoxN8Rjx5vH+hJlyhuFPK7Mhn93rM4= X-Google-Smtp-Source: AGHT+IHkgiTmMixeUiyeIfpbmm5rxRoyq8l72NovkNqoulOTDoloUsGoVsKwPS3/kJJDNUoCR1Wnys0EF9io97tjkgo= X-Received: by 2002:a05:6512:3408:b0:52c:c9bb:2ba4 with SMTP id 2adb3069b0e04-52ccaa88229mr6470128e87.46.1718998939040; Fri, 21 Jun 2024 12:42:19 -0700 (PDT) In-Reply-To: <86ed8qlepr.fsf@gnu.org> Received-SPF: pass client-ip=2a00:1450:4864:20::130; envelope-from=vekazanov@gmail.com; helo=mail-lf1-x130.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:320438 Archived-At: 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. > 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 :-) Archive-mode expects default system-wide file name encoding. I found a problem with archive file names by forcing non utf-8 encodings. Anyways, will fix it and try to come up with a test for the case. > > The doc string seems like a copy/paste mistake. Got it. > 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? -- Regards, Vladimir Kazanov