From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 06 14:57:51 2020 Received: (at submit) by debbugs.gnu.org; 6 Jun 2020 18:57:51 +0000 Received: from localhost ([127.0.0.1]:52473 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jhe0s-0001cM-HZ for submit@debbugs.gnu.org; Sat, 06 Jun 2020 14:57:51 -0400 Received: from lists.gnu.org ([209.51.188.17]:57846) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jhd2a-0006Py-T2 for submit@debbugs.gnu.org; Sat, 06 Jun 2020 13:55:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52884) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jhd2Z-0004sA-4T for bug-gnu-emacs@gnu.org; Sat, 06 Jun 2020 13:55:32 -0400 Received: from aibo.runbox.com ([91.220.196.211]:52564) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jhd2W-0003n3-PN for bug-gnu-emacs@gnu.org; Sat, 06 Jun 2020 13:55:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=runbox.com; s=selector1; h=Content-Type:MIME-Version:Message-ID:Date:Subject:Cc:To:From; bh=SzNzh/Hv96QYtO96rh1YzHtNRjF1RRYb2ih7dO1odd4=; b=WkNj3KhTAoA9t3zHUXiBjoSyw dqMvsA0IyPm6DLnbhpKq0H3SnyO1xcPagOFKI9WMts+iWVjt6ZrTunf2waub7h3vkQbx6V0Eu54B9 lzhvxMG9JhzUEgibnQD9H8k2DLubWsd01eAvWjdg5JVF3OM1zVzLS/YvC1G1u5F7w31I9kNCFfF00 t7mv2/eo9JEtxnImnoSehosxrREPaARaBHkvQP9nHm0DsURjMa/4D2XhjdXWZfUUle+QwXaPgrvoe ehcMlWFuWLiQZ4WP8QvYT1+YZM0Xi1xyGJQUmDv+ZMJ8p5c6jmvyFonhOePUlXq4IPQ4jP0kfOMw2 j/PObWdQA==; Received: from [10.9.9.74] (helo=submission03.runbox) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1jhbrb-0007jb-MY; Sat, 06 Jun 2020 18:40:07 +0200 Received: by submission03.runbox with esmtpsa [Authenticated alias (963757)] (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) id 1jhbrZ-00051X-Mb; Sat, 06 Jun 2020 18:40:05 +0200 From: =?utf-8?Q?Simen_Heggest=C3=B8yl?= To: bug-gnu-emacs@gnu.org Subject: [PATCH] Save project list as lisp data Date: Sat, 06 Jun 2020 18:40:05 +0200 Message-ID: <877dwkno62.fsf@simenheg@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=91.220.196.211; envelope-from=simenheg@runbox.com; helo=aibo.runbox.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/06 13:55:24 X-ACL-Warn: Detected OS = ??? X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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, MSGID_MULTIPLE_AT=1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: 1.6 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi. I'm attaching a suggested patch for changing project.el's project list format from a line based one to proper Lisp data as discussed in the "New feature in project.el: Remembering the previously used [...] Content analysis details: (1.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: runbox.com] 1.0 MSGID_MULTIPLE_AT Message-ID contains multiple '@' characters 0.9 SPF_FAIL SPF: sender does not match SPF record (fail) [SPF failed: Please see http://www.openspf.org/Why?s=mfrom; id=simenheg%40runbox.com; ip=209.51.188.17; r=debbugs.gnu.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (simenheg[at]runbox.com) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [209.51.188.17 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H4 RBL: Very Good reputation (+4) [209.51.188.17 listed in wl.mailspike.net] 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 2.0 SPOOFED_FREEMAIL No description available. X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sat, 06 Jun 2020 14:57:49 -0400 Cc: "Basil L. Contovounesios" , Juri Linkov , Dmitry Gutov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) --=-=-= Content-Type: text/plain Hi. I'm attaching a suggested patch for changing project.el's project list format from a line based one to proper Lisp data as discussed in the "New feature in project.el: Remembering the previously used projects" thread on emacs-devel. No metadata is added at this point, but it makes it extensible for the future. -- Simen --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Save-project-list-as-lisp-data.patch >From 3084f651d6c0f5e6b4b3ac699b59742f98af2248 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simen=20Heggest=C3=B8yl?= Date: Fri, 5 Jun 2020 19:32:30 +0200 Subject: [PATCH] Save project list as lisp data Save the project list file as lisp data instead of line separated strings to make it more extendable in the future. * lisp/progmodes/project.el (project--read-project-list) (project--write-project-list, project--add-to-project-list-front) (project--remove-from-project-list): Adjust to `project--list' now being an alist. --- lisp/progmodes/project.el | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 4d57fb25fd..3b007bc8dc 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -757,19 +757,13 @@ project--list "List of known project directories.") (defun project--read-project-list () - "Initialize `project--list' from the project list file." + "Initialize `project--list' from the file `project-list-file'." (let ((filename project-list-file)) (setq project--list - (when (file-exists-p filename) + (when (file-readable-p filename) (with-temp-buffer (insert-file-contents filename) - (let ((dirs (split-string (buffer-string) "\n" t)) - (project-list '())) - (dolist (dir dirs) - (cl-pushnew (file-name-as-directory dir) - project-list - :test #'equal)) - (reverse project-list))))))) + (car (read-from-string (buffer-string)))))))) (defun project--ensure-read-project-list () "Initialize `project--list' if it hasn't already been." @@ -780,7 +774,8 @@ project--write-project-list "Persist `project--list' to the project list file." (let ((filename project-list-file)) (with-temp-buffer - (insert (string-join project--list "\n")) + (insert ";;; -*- lisp-data -*-\n") + (pp project--list (current-buffer)) (write-region nil nil filename nil 'silent)))) (defun project--add-to-project-list-front (pr) @@ -788,9 +783,9 @@ project--add-to-project-list-front Save the result to disk if the project list was changed." (project--ensure-read-project-list) (let ((dir (project-root pr))) - (unless (equal (car project--list) dir) - (setq project--list (delete dir project--list)) - (push dir project--list) + (unless (equal (caar project--list) dir) + (setq project--list (assoc-delete-all dir project--list)) + (push (list dir) project--list) (project--write-project-list)))) (defun project--remove-from-project-list (pr-dir) @@ -798,8 +793,8 @@ project--remove-from-project-list If the directory was in the list before the removal, save the result to disk." (project--ensure-read-project-list) - (when (member pr-dir project--list) - (setq project--list (delete pr-dir project--list)) + (when (assoc pr-dir project--list) + (setq project--list (assoc-delete-all pr-dir project--list)) (message "Project `%s' not found; removed from list" pr-dir) (project--write-project-list))) -- 2.26.2 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 06 18:59:21 2020 Received: (at 41741) by debbugs.gnu.org; 6 Jun 2020 22:59:21 +0000 Received: from localhost ([127.0.0.1]:52723 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jhhmb-0003Kp-7u for submit@debbugs.gnu.org; Sat, 06 Jun 2020 18:59:21 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:40382) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jhhmZ-0003Kc-51 for 41741@debbugs.gnu.org; Sat, 06 Jun 2020 18:59:19 -0400 Received: by mail-wm1-f66.google.com with SMTP id r15so12781355wmh.5 for <41741@debbugs.gnu.org>; Sat, 06 Jun 2020 15:59:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=aMsKtz77KpCQm8MNDZ8ZNZQjhJ8CnIDERgda/nyihSI=; b=AH+Ggzg1LNWNTFd/ja/JvGOXzEycWisGyB2/2NpGESWhQSy4xrFC/p30metto3E8nY rsaJjJwV+uqEzZcEGRj1ityV78tDWtjwdC/CVY+Y2RcBi5GKeXAs5uj2mEO76DD9kpaR HC5c+uRBO5Wb+8/ME14sKeJclg0jHD45AvOF/G87yJVUxJxA++652hqvNrncDpEXQzFh ZfZdU9APTckEiJjsMI2Ol818fEjr3U6bAEMeLQJapcCkgTfKRSelfdf+J0gD6m6iRipX QF4gfiNHQkIX7LYgK4UCXDoV0GzUn9f2vn71/fBizvvhAsOVtdKd1pZgvwcC5izA0qIB fOiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=aMsKtz77KpCQm8MNDZ8ZNZQjhJ8CnIDERgda/nyihSI=; b=h+x81Y6iQq9nstQ72E375Y1Rq3clJjE2O3MfcfSix0jtOnq0DYZIAoe9d8AJ0DzCLT B4Ad8PFsNSNMhaMLo07Ljf7FHlsFx7zKSSPgeK6bGH7QGfwGzLNZPwM9lMcq/loVFmcB 4buKgzJtPAQN1A/qtpOD4smNecQUcKVOtg/yuGHv+3zE0DBhQllfJPHfs/k6DTXx7Fm6 acBbcX1468MDtZiQn38I5SMQX4sTlSAxSznWMCdognQdAldbX34Jh0lKIVoR1NNduZHL +uqh6Jx4muofx1V/4AEKHLg/coRuqID9UyBLCq5MTZVog5E67kphqYzCkC2fU62QCHBM x3TA== X-Gm-Message-State: AOAM531yLxiNgFryttB6IKpxV5vMk6Rfn7+YvJuHsQCGDPBqE8wzqn+t L3mnqCsaflnrkPiAvYweyek= X-Google-Smtp-Source: ABdhPJyif2Mm+gCjIT47B3EvIfCCEols8C9u661OE1JmIiW4v1plrlooaNz+g4oby12OOUvnJqVlOg== X-Received: by 2002:a1c:44c3:: with SMTP id r186mr8979043wma.67.1591484353170; Sat, 06 Jun 2020 15:59:13 -0700 (PDT) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id z7sm17741085wrt.6.2020.06.06.15.59.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 06 Jun 2020 15:59:12 -0700 (PDT) Subject: Re: bug#41741: [PATCH] Save project list as lisp data To: =?UTF-8?Q?Simen_Heggest=c3=b8yl?= , 41741@debbugs.gnu.org References: <877dwkno62.fsf@simenheg@gmail.com> From: Dmitry Gutov Message-ID: Date: Sun, 7 Jun 2020 01:59:10 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <877dwkno62.fsf@simenheg@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 41741 Cc: "Basil L. Contovounesios" , Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) Hi Simen, On 06.06.2020 19:40, Simen Heggestøyl wrote: > I'm attaching a suggested patch for changing project.el's project list > format from a line based one to proper Lisp data as discussed in the > "New feature in project.el: Remembering the previously used projects" > thread on emacs-devel. Some comments below. > No metadata is added at this point, but it makes it extensible for the > future. I'm not sure we'd really be able to store metadata in it. The list is more or less transient: the entries are added automatically, and removed automatically as well. If someone needs to know something about a project, it's better to leave that to an overridable method, and maybe add a project-vc- variable (if that value needs to be user-customizable). For that reason, we should probably opt for storing directories only. > - "Initialize `project--list' from the project list file." > + "Initialize `project--list' from the file `project-list-file'." I think the previous string was okay. > - (when (file-exists-p filename) > + (when (file-readable-p filename) What's the difference? File exists, but belongs to another account? I'm not sure we'd want to silently fail in that case (kinda puzzling behavior), and writing to the file is likely to fail later too. > + (car (read-from-string (buffer-string)))))))) AKA: (goto-char (point-min)) (read (current-buffer)) Though the practical difference will be tiny. From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 07 15:55:18 2020 Received: (at 41741) by debbugs.gnu.org; 7 Jun 2020 19:55:18 +0000 Received: from localhost ([127.0.0.1]:54992 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ji1O2-0003R1-Br for submit@debbugs.gnu.org; Sun, 07 Jun 2020 15:55:18 -0400 Received: from aibo.runbox.com ([91.220.196.211]:39872) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ji1Nz-0003Qr-Kh for 41741@debbugs.gnu.org; Sun, 07 Jun 2020 15:55:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=runbox.com; s=selector1; h=Content-Transfer-Encoding:Content-Type:MIME-Version: Message-ID:In-Reply-To:Date:References:Subject:Cc:To:From; bh=m7y7FMpqty6hgNh4FfFLbZlPsSIC72J8pDp8oa2UsAk=; b=FhrUpvkR+mLQ1emOYhsjrI2wyN w9PZ2F36ayY4VR1fvhnx4/bubbEh3YP/Lkx7pG38RkC9Yk8ViLqrR/JEJviE5Pb7PTtsd0sjcojIP 6SeL9Z4G2HgiRzD1QiPM19x1ypGLyWIxSvEBUSKDJdujjdS681e7AzHtVd2zjaZqCiUB1gHqIkjBN A47KY7Obe2kZmKE8kFutqPMbGLf+IcK+6jqdhBQKK21RuRMoipOZk+XD68bCd6wMbBPEeuZ2bmpNO /o5j5lypqbq2kq2BHVifNaKYA6nhjvjkGlpBYVdUQCfWfsHaco65gSB3HwVsqhd6WQQBGFIeqkGGj qeFuH8XQ==; Received: from [10.9.9.73] (helo=submission02.runbox) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1ji1Nw-00064s-FF; Sun, 07 Jun 2020 21:55:12 +0200 Received: by submission02.runbox with esmtpsa [Authenticated alias (963757)] (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) id 1ji1Nr-0004UW-08; Sun, 07 Jun 2020 21:55:07 +0200 From: =?utf-8?Q?Simen_Heggest=C3=B8yl?= To: Dmitry Gutov Subject: Re: bug#41741: [PATCH] Save project list as lisp data References: <877dwkno62.fsf@simenheg@gmail.com> Date: Sun, 07 Jun 2020 21:55:06 +0200 In-Reply-To: (Dmitry Gutov's message of "Sun, 7 Jun 2020 01:59:10 +0300") Message-ID: <87wo4ips6d.fsf@simenheg@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 41741 Cc: "Basil L. Contovounesios" , 41741@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Dmitry Gutov writes: > On 06.06.2020 19:40, Simen Heggest=C3=B8yl wrote: > >> No metadata is added at this point, but it makes it extensible for the >> future. > > I'm not sure we'd really be able to store metadata in it. The list is > more or less transient: the entries are added automatically, and > removed automatically as well. If someone needs to know something > about a project, it's better to leave that to an overridable method, > and maybe add a project-vc- variable (if that value needs to be > user-customizable). > > For that reason, we should probably opt for storing directories only. It is transient now, yes. But the biggest gain from going from the one-directory-per-line format to the proposed alist format is (in my view) having the possibility to extend its uses in the future without breaking backward compatibility with existing project list files. Just as an example I can imagine an optional feature in the future where you could name a project interactively the first time it's seen (i.e. when it's added to the project list for the first time). I wouldn't like to maintain that in my config file; having the name live in the project list only would be fine with me. That would require extending project.el to keep project metadata when rearranging them. >> - "Initialize `project--list' from the project list file." >> + "Initialize `project--list' from the file `project-list-file'." > > I think the previous string was okay. Alright, reverted. >> - (when (file-exists-p filename) >> + (when (file-readable-p filename) > > What's the difference? File exists, but belongs to another account? > I'm not sure we'd want to silently fail in that case (kinda puzzling > behavior), and writing to the file is likely to fail later too. Hm, yes. I snatched that part from saveplace.el, but after you pointed it out I now also think it's better to get an error in that case. Reverted. >> + (car (read-from-string (buffer-string)))))))) > > AKA: > > (goto-char (point-min)) > (read (current-buffer)) > > Though the practical difference will be tiny. I don't mind changing it, but could you explain the difference to me? My understanding isn't deep enough to see anything but one line versus two. :) -- Simen From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 07 16:18:37 2020 Received: (at 41741) by debbugs.gnu.org; 7 Jun 2020 20:18:37 +0000 Received: from localhost ([127.0.0.1]:55016 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ji1kb-000423-7c for submit@debbugs.gnu.org; Sun, 07 Jun 2020 16:18:37 -0400 Received: from mail-wm1-f54.google.com ([209.85.128.54]:36462) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ji1kY-00041s-Tc for 41741@debbugs.gnu.org; Sun, 07 Jun 2020 16:18:35 -0400 Received: by mail-wm1-f54.google.com with SMTP id d128so14436834wmc.1 for <41741@debbugs.gnu.org>; Sun, 07 Jun 2020 13:18:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=XSvaQaGk3FopDyI7IltrxfFWMfVu94pWdptS46klJd0=; b=ElxjxaM8dEP808X9B5bmnvW9+FsRGw+JA3cMhk0t7WoLBWsiAA2cyS4+eIgLiVSmto XAcvbwYmTMtG2H0Sic9a/JrKLhGmCWQXIAinJn7KhpztAp6AcsD7bmYwE+BRimebXVXc DBDzq7DDY+mdD7vSMRvAsd4p47O09RDzTQTGkXVRzZsSdZvqz8qkvbZEloceXsLjHhWX Hfdmfba/nZ4UstP2kB/SR6kmnwlmgqVtR4dJxZ9AqAA/T1GDJmbEgOeE0MSPBNSl8Ml8 WAfPbCU4jEhWL25LPFrtjUvIItGOpV76oLnTXF9zZjVWblslLx4C2zGxTbuTblGpbxQa JsxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=XSvaQaGk3FopDyI7IltrxfFWMfVu94pWdptS46klJd0=; b=Wv864PZaqpmCElkBwZ4KmoEXkyi7+pXDL9jSuwe4qBTlMVT1zFQPgB8oC4EIL+9HCQ 1FvxVj8VJp/XqVaMQSuOayLGVt1eJoCLinX4IYgAOvSEaVg7H/LPWa+oRqACHwr4/crj Lqi6bUnJoEoNlYD6IrZaoCBTSYOzNBcS6jpcd6LpNIxx3WqL+hGuPXnKIvzMILIBesTT l6S7jxTRSYvwDEkR3h2K0YRiYXHsLD6TUVUlilMcRhL7Spgl574/Kt75wh5SBRPoegD9 gRvWFRB8hRUZEl8KR2O2hl8G/lff/wKA6gsYxo3OM+Np2MjurU62oYzCMukvI3HC7Ahq sDJA== X-Gm-Message-State: AOAM531IU017t+XXHLFcyBi6DZYa9ZYpLqzXN2XLF2qu5+m04WYAMPwH o+biUNkFL/w97E6rcb9b+Aw= X-Google-Smtp-Source: ABdhPJzdTEN7bOdLg/ittJsNQBs41AQpemtfG0FFlymLJ2mDrXa/F+hHeqze88i7wVUAiYmRz2Z+gQ== X-Received: by 2002:a7b:c0d9:: with SMTP id s25mr13830026wmh.175.1591561109075; Sun, 07 Jun 2020 13:18:29 -0700 (PDT) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id x8sm21261708wrs.43.2020.06.07.13.18.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 07 Jun 2020 13:18:28 -0700 (PDT) Subject: Re: bug#41741: [PATCH] Save project list as lisp data To: =?UTF-8?Q?Simen_Heggest=c3=b8yl?= References: <877dwkno62.fsf@simenheg@gmail.com> <87wo4ips6d.fsf@simenheg@gmail.com> From: Dmitry Gutov Message-ID: Date: Sun, 7 Jun 2020 23:18:26 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <87wo4ips6d.fsf@simenheg@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 41741 Cc: "Basil L. Contovounesios" , 41741@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On 07.06.2020 22:55, Simen Heggestøyl wrote: > It is transient now, yes. And later, it won't be? > Just as an example I can imagine an optional feature in the future where > you could name a project interactively the first time it's seen > (i.e. when it's added to the project list for the first time). And then lose all these annotations when a project root directory is moved/renamed/etc? But OK, maybe it won't happen too often to really worry about. >>> - (when (file-exists-p filename) >>> + (when (file-readable-p filename) >> >> What's the difference? File exists, but belongs to another account? >> I'm not sure we'd want to silently fail in that case (kinda puzzling >> behavior), and writing to the file is likely to fail later too. > > Hm, yes. I snatched that part from saveplace.el, but after you pointed > it out I now also think it's better to get an error in that > case. Reverted. Perhaps we should change saveplace as well. :-) >>> + (car (read-from-string (buffer-string)))))))) >> >> AKA: >> >> (goto-char (point-min)) >> (read (current-buffer)) >> >> Though the practical difference will be tiny. > > I don't mind changing it, but could you explain the difference to me? My > understanding isn't deep enough to see anything but one line versus > two. :) Just an extra string allocation, I guess. From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 08 15:00:55 2020 Received: (at 41741) by debbugs.gnu.org; 8 Jun 2020 19:00:55 +0000 Received: from localhost ([127.0.0.1]:57928 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jiN0w-0002Ht-KS for submit@debbugs.gnu.org; Mon, 08 Jun 2020 15:00:54 -0400 Received: from aibo.runbox.com ([91.220.196.211]:41924) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jiN0t-0002Hj-Qy for 41741@debbugs.gnu.org; Mon, 08 Jun 2020 15:00:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=runbox.com; s=selector1; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From; bh=HnVaVI3WDG1GzH33hDMUen5MymxqTcZ41+zIYUpm5LM=; b=cKDJ1OIDvdMq7g3Al7S/haBG9V YSPnMV31ZVnTv0gVPjsCFqd9/RSXQz3O+qRuydrk1o/ohta+Dd0wNZlAlPb93gsxN3PnWynthrsP6 3PxyzOlxVQsbnNLbMntwHbm//HManYXtG/ahbl/DE4oYq4dMbXb/SiX7pzdjfERL89Z5I/jJUH4oH au+qetx8MfV/QSeBMSGoe0sLICN0M2rujJqFgL46CNe8KIYTMCLI4oXtquVNX2Gy1bnFlNez94Fh/ fs/nhti/YN9p4V9pRvq+Qe0nE+2u4iFJX5045CHUGeSWFVU3VfzEVZMZBGxjkZdnxr7DPCDcxRtPE wZLgH8ww==; Received: from [10.9.9.72] (helo=submission01.runbox) by mailtransmit02.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1jiN0q-0002ic-JH; Mon, 08 Jun 2020 21:00:48 +0200 Received: by submission01.runbox with esmtpsa [Authenticated alias (963757)] (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) id 1jiN0e-0002XX-EA; Mon, 08 Jun 2020 21:00:36 +0200 From: =?utf-8?Q?Simen_Heggest=C3=B8yl?= To: Dmitry Gutov Subject: Re: bug#41741: [PATCH] Save project list as lisp data References: <877dwkno62.fsf@simenheg@gmail.com> <87wo4ips6d.fsf@simenheg@gmail.com> Date: Mon, 08 Jun 2020 21:00:36 +0200 In-Reply-To: (Dmitry Gutov's message of "Sun, 7 Jun 2020 23:18:26 +0300") Message-ID: <873675jsbv.fsf@simenheg@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 41741 Cc: "Basil L. Contovounesios" , 41741@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Dmitry Gutov writes: > On 07.06.2020 22:55, Simen Heggest=C3=B8yl wrote: > >> It is transient now, yes. > > And later, it won't be? Yes, later too (sorry, I think I misunderstood your original message). >> Just as an example I can imagine an optional feature in the future where >> you could name a project interactively the first time it's seen >> (i.e. when it's added to the project list for the first time). > > And then lose all these annotations when a project root directory is > moved/renamed/etc? > > But OK, maybe it won't happen too often to really worry about. Yes. I think it should only be used to store metadata that isn't a hassle to lose. Another example from the top of my head: recording project visit counts. That could be used for an option to show the most popular projects first in the completion list, for instance. >>> AKA: >>> >>> (goto-char (point-min)) >>> (read (current-buffer)) >>> >>> Though the practical difference will be tiny. >> I don't mind changing it, but could you explain the difference to >> me? My >> understanding isn't deep enough to see anything but one line versus >> two. :) > > Just an extra string allocation, I guess. Sure, I've changed it. Updated patch attached! -- Simen --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Save-project-list-as-lisp-data.patch >From 6a907d09b9a5b341f5c01f93fd031cb45229f320 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simen=20Heggest=C3=B8yl?= Date: Fri, 5 Jun 2020 19:32:30 +0200 Subject: [PATCH] Save project list as lisp data Save the project list file as lisp data instead of line separated strings to make it more extendable in the future. * lisp/progmodes/project.el (project--read-project-list) (project--write-project-list, project--add-to-project-list-front) (project--remove-from-project-list): Adjust to `project--list' now being an alist. --- lisp/progmodes/project.el | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 4d57fb25fd..0cca518d26 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -763,13 +763,8 @@ project--read-project-list (when (file-exists-p filename) (with-temp-buffer (insert-file-contents filename) - (let ((dirs (split-string (buffer-string) "\n" t)) - (project-list '())) - (dolist (dir dirs) - (cl-pushnew (file-name-as-directory dir) - project-list - :test #'equal)) - (reverse project-list))))))) + (goto-char (point-min)) + (read (current-buffer))))))) (defun project--ensure-read-project-list () "Initialize `project--list' if it hasn't already been." @@ -780,7 +775,8 @@ project--write-project-list "Persist `project--list' to the project list file." (let ((filename project-list-file)) (with-temp-buffer - (insert (string-join project--list "\n")) + (insert ";;; -*- lisp-data -*-\n") + (pp project--list (current-buffer)) (write-region nil nil filename nil 'silent)))) (defun project--add-to-project-list-front (pr) @@ -788,9 +784,9 @@ project--add-to-project-list-front Save the result to disk if the project list was changed." (project--ensure-read-project-list) (let ((dir (project-root pr))) - (unless (equal (car project--list) dir) - (setq project--list (delete dir project--list)) - (push dir project--list) + (unless (equal (caar project--list) dir) + (setq project--list (assoc-delete-all dir project--list)) + (push (list dir) project--list) (project--write-project-list)))) (defun project--remove-from-project-list (pr-dir) @@ -798,8 +794,8 @@ project--remove-from-project-list If the directory was in the list before the removal, save the result to disk." (project--ensure-read-project-list) - (when (member pr-dir project--list) - (setq project--list (delete pr-dir project--list)) + (when (assoc pr-dir project--list) + (setq project--list (assoc-delete-all pr-dir project--list)) (message "Project `%s' not found; removed from list" pr-dir) (project--write-project-list))) -- 2.26.2 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 08 16:32:29 2020 Received: (at 41741) by debbugs.gnu.org; 8 Jun 2020 20:32:29 +0000 Received: from localhost ([127.0.0.1]:58009 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jiORZ-0004WQ-HA for submit@debbugs.gnu.org; Mon, 08 Jun 2020 16:32:29 -0400 Received: from mail-wr1-f43.google.com ([209.85.221.43]:39286) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jiORY-0004WE-GT for 41741@debbugs.gnu.org; Mon, 08 Jun 2020 16:32:28 -0400 Received: by mail-wr1-f43.google.com with SMTP id t18so18911332wru.6 for <41741@debbugs.gnu.org>; Mon, 08 Jun 2020 13:32:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=e4+Ea4/D5Dl3vST6SXElOCH6dEBrPD3equpqDpzHixk=; b=WkTQmF3Af+sbVvSjGjyEaJpgGvJ+wgzLa0jPoRDE1vlEiTWRhVTZ4mBNaqA7OveEEh ys3qEzCy0yxzw8/z0ZMrInsjRPFSC3Bhe6iRS0hVQVUlyUWYFD7bmabr6c+c/actp27i Y1SgGCyhjmxJ7hwKWQMw7KTOL3USr/JM+S0sP4lNYdQaP1yfjQjsZRP1IUFeoW/SMGPc wqURUj9z1KzZ5vL405bNqZrS/dXFyQkcTB0UotSw7XCzrlVEoA/2GUEGTxEGjEBILxlH 1J1m/eIEsgGZ/JtoXpeJHZyff4k0kRTr/cugOi4DEhrWNgM8nvIslGJvbJIO9h1GgKT5 nBzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=e4+Ea4/D5Dl3vST6SXElOCH6dEBrPD3equpqDpzHixk=; b=Bf3h0Tyl+R/Ygzrc0CAQDgwNIrN6J9wnZr5XIjBlvq1dLIu0CXq55Ii9wQOHtGdZcw bf3q2NgUwHr3vTC3DKPKzmOKBl+sx0GtY6sn99KsS8Wlh0VHRm+KpiU69L80TMEiCNWv 5OcXM0dIxneuzs/OMuemR5Ulz2ikGbeVgn3Kfekw/LBd7pTLA013h2ACmOJd0aVGg7Ut EumzCMW8NnXUmh+jvj1Gjax1edAfftLFKy5vyYo6YUL0XBRbrbsdVflX1XqjfPrKaN7e Wz6MFEX7ySU0ULt5r5oczv7z9FSy6GXTxMAqpRgKQJfg1SNRTVOuNqZNsZy62ShnGE9U g+LA== X-Gm-Message-State: AOAM533TM9EEJKoxBr8jnIoWjd/awYdDhZXP3J8+E3PTHdHKrknDD6LZ ToHdiWGVTuwUIAA09DstaPc= X-Google-Smtp-Source: ABdhPJw/9JDWVyFuLAz+un6bbE6WXZb26r+wpKJdpquN3jz/0t0gSb3nXsHY6TSDItKfDSYpvVVUcw== X-Received: by 2002:a5d:554a:: with SMTP id g10mr595414wrw.334.1591648342546; Mon, 08 Jun 2020 13:32:22 -0700 (PDT) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id g82sm640143wmf.1.2020.06.08.13.32.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 08 Jun 2020 13:32:21 -0700 (PDT) Subject: Re: bug#41741: [PATCH] Save project list as lisp data To: =?UTF-8?Q?Simen_Heggest=c3=b8yl?= References: <877dwkno62.fsf@simenheg@gmail.com> <87wo4ips6d.fsf@simenheg@gmail.com> <873675jsbv.fsf@simenheg@gmail.com> From: Dmitry Gutov Message-ID: <6638b451-1014-d267-cf7b-fbac8f4be83e@yandex.ru> Date: Mon, 8 Jun 2020 23:32:19 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <873675jsbv.fsf@simenheg@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 41741 Cc: "Basil L. Contovounesios" , 41741@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On 08.06.2020 22:00, Simen Heggestøyl wrote: > Another example from the top of my head: recording project visit > counts. That could be used for an option to show the most popular > projects first in the completion list, for instance. OK then. > Updated patch attached! All good! From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 08 19:38:09 2020 Received: (at 41741) by debbugs.gnu.org; 8 Jun 2020 23:38:09 +0000 Received: from localhost ([127.0.0.1]:58239 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jiRLF-0000Ya-EB for submit@debbugs.gnu.org; Mon, 08 Jun 2020 19:38:09 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:57203) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jiRLD-0000Y1-00 for 41741@debbugs.gnu.org; Mon, 08 Jun 2020 19:38:07 -0400 X-Originating-IP: 91.129.108.6 Received: from mail.gandi.net (m91-129-108-6.cust.tele2.ee [91.129.108.6]) (Authenticated sender: juri@linkov.net) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 89121C0002; Mon, 8 Jun 2020 23:37:58 +0000 (UTC) From: Juri Linkov To: Simen =?iso-8859-1?Q?Heggest=F8yl?= Subject: Re: bug#41741: [PATCH] Save project list as lisp data Organization: LINKOV.NET References: <877dwkno62.fsf@simenheg@gmail.com> <87wo4ips6d.fsf@simenheg@gmail.com> <873675jsbv.fsf@simenheg@gmail.com> Date: Tue, 09 Jun 2020 02:09:09 +0300 In-Reply-To: <873675jsbv.fsf@simenheg@gmail.com> ("Simen =?iso-8859-1?Q?He?= =?iso-8859-1?Q?ggest=F8yl=22's?= message of "Mon, 08 Jun 2020 21:00:36 +0200") Message-ID: <87pna943cq.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 41741 Cc: "Basil L. Contovounesios" , 41741@debbugs.gnu.org, Dmitry Gutov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > Another example from the top of my head: recording project visit > counts. That could be used for an option to show the most popular > projects first in the completion list, for instance. Or record project visit time, and then sort by time, so that the most recently used projects are first. From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 08 19:39:38 2020 Received: (at 41741) by debbugs.gnu.org; 8 Jun 2020 23:39:38 +0000 Received: from localhost ([127.0.0.1]:58262 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jiRMg-0000bk-DS for submit@debbugs.gnu.org; Mon, 08 Jun 2020 19:39:38 -0400 Received: from mail-wm1-f54.google.com ([209.85.128.54]:55305) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jiRMe-0000bW-G4 for 41741@debbugs.gnu.org; Mon, 08 Jun 2020 19:39:37 -0400 Received: by mail-wm1-f54.google.com with SMTP id c71so1100876wmd.5 for <41741@debbugs.gnu.org>; Mon, 08 Jun 2020 16:39:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=2wbIvIsOoWePM5NXfMqxPo+iqc6e0J1Z8XOGrcqQAGo=; b=KUqS2anpQv4xNHHzsIKVEYu61RMHyRXMhPhXw4ImUpA22EuTeX3YmrBWb0nJOb4Nz7 k3k98ISo6ialfqXY1JVJTSglS6lHVJYaGrTwZOwPdzjOJCyeZex53d+q9mVvSB8b2DYw 1gQMHHauhd5QzfeBNTBu4xHbqwgtAyIJXCppUbf8+okV2f2nDLUXDYmCo34lqFZzgkdd bzKVBwLVBIK3UrwAx09iPKXFAxR1+XlemnmGlYW6nSavl3gskHq4UTGkV+GeYMMlgr5y D1zwtQHLVNTiMvJ9RK7gpzwc5nSEgszMA2M8P8grkvM0zoZOqPPs53CC+SAlwAvkec3+ HZDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=2wbIvIsOoWePM5NXfMqxPo+iqc6e0J1Z8XOGrcqQAGo=; b=GJiWi6jA2/4MosLCQLq2VQqQqSY3iVXpuH2v9CDU6UB/hZ1CIIMGP8fk1uWc+GBizm 3qJcS07iqz4WzgdQTmfj7UQcauddoxycEfd3UR6CzH0up5VKoRnQCoG5ZnChfwNiWpwB dybePvlRcRwociyzJwmrIAfTC8AEu5cc0nF6uugek7ZxkB3U5eDdi5Kf38Np7LPlvshv hP33+MS1VPupQHUtojizPk4bBg9ycFJ19GAsy2BQRwAi7G2dm4m1A3JurfT2OAQIuI55 JjVVfqcPkYnPIm+h1SX4gwo/BQGQS70NBPW/Th+BG/LSrZFP7R5mKmJkFwVl59tcbkul PvBw== X-Gm-Message-State: AOAM5327jYkF/Ec+WE2/eiocJf3Uti6XWksZU+NyjiJg768u/c+C7LLh 1+EG8kIdqRpSdsdKjDt2JsE= X-Google-Smtp-Source: ABdhPJwLXJTSYSY2CQDw4lJBT0kqeXM3GW9WkQP7cRzROTik2DfENa961thqG3l8OzSX7RrOgJimYQ== X-Received: by 2002:a1c:b656:: with SMTP id g83mr1027821wmf.27.1591659570527; Mon, 08 Jun 2020 16:39:30 -0700 (PDT) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id f71sm976861wmf.22.2020.06.08.16.39.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 08 Jun 2020 16:39:28 -0700 (PDT) Subject: Re: bug#41741: [PATCH] Save project list as lisp data To: Juri Linkov , =?UTF-8?Q?Simen_Heggest=c3=b8yl?= References: <877dwkno62.fsf@simenheg@gmail.com> <87wo4ips6d.fsf@simenheg@gmail.com> <873675jsbv.fsf@simenheg@gmail.com> <87pna943cq.fsf@mail.linkov.net> From: Dmitry Gutov Message-ID: <03edb0dd-b088-85ae-7bdc-cfcfccb404af@yandex.ru> Date: Tue, 9 Jun 2020 02:39:27 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <87pna943cq.fsf@mail.linkov.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 41741 Cc: "Basil L. Contovounesios" , 41741@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On 09.06.2020 02:09, Juri Linkov wrote: > Or record project visit time, and then sort by time, > so that the most recently used projects are first. We currently do that by changing the order of the entries. From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 08 19:49:01 2020 Received: (at 41741) by debbugs.gnu.org; 8 Jun 2020 23:49:01 +0000 Received: from localhost ([127.0.0.1]:58278 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jiRVk-0000pu-Pi for submit@debbugs.gnu.org; Mon, 08 Jun 2020 19:49:01 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:58736) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jiRVi-0000pg-Qj for 41741@debbugs.gnu.org; Mon, 08 Jun 2020 19:48:59 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 058NkZE9073664; Mon, 8 Jun 2020 23:48:52 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=l8Gl/ZcgsnFjXbkmdWkGpG4/D6MowTi0FiEnwnaHHaU=; b=tEpsLGzLDAGx6yxrQdlcAeU0dbjlVw2ZIqAsS7iT8ThPaQnUZmz2CzILAVqi7SjcotGr B96AdFEuHPk2ZGpwM/I43ArTjFiWaha8D7b+i8/nISzGMrQxFkeQjgcsGyji77/pnPYz srDLObCPIzCWe+/+SUYkN4DNSPQmXmppJ7wn66/nx+NFXt4HuEnq3T0elOflHb/RoXCG F/IWvJgXmMwrGqKV6ZdBlXcrnndCGfAMhHR1phCDX+liZ4yIpp6aWmSz8Wi7JL+kne4Z RoI32ZuXuYIlWsiJ1d2DsBjt+D8qF8vUf4rh7iCXXHDruzOOBNps06q9/ZiLhuRlQJ9a Rw== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2120.oracle.com with ESMTP id 31g3smsjcy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 08 Jun 2020 23:48:52 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 058NmZXx098229; Mon, 8 Jun 2020 23:48:51 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3020.oracle.com with ESMTP id 31gmwqk992-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 08 Jun 2020 23:48:51 +0000 Received: from abhmp0020.oracle.com (abhmp0020.oracle.com [141.146.116.26]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 058Nmj8D010826; Mon, 8 Jun 2020 23:48:45 GMT MIME-Version: 1.0 Message-ID: <1f13ef89-b2d6-4d97-8597-a89228ecca36@default> Date: Mon, 8 Jun 2020 16:48:43 -0700 (PDT) From: Drew Adams To: Juri Linkov , =?iso-8859-1?B?U2ltZW4gSGVnZ2VzdPh5bA==?= Subject: RE: bug#41741: [PATCH] Save project list as lisp data References: <877dwkno62.fsf@simenheg@gmail.com> <87wo4ips6d.fsf@simenheg@gmail.com> <873675jsbv.fsf@simenheg@gmail.com> <87pna943cq.fsf@mail.linkov.net> In-Reply-To: <87pna943cq.fsf@mail.linkov.net> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5005.0 (x86)] Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9646 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=18 spamscore=0 adultscore=0 mlxscore=0 mlxlogscore=999 bulkscore=0 malwarescore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006080164 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9646 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 priorityscore=1501 lowpriorityscore=0 impostorscore=0 cotscore=-2147483648 suspectscore=18 spamscore=0 bulkscore=0 malwarescore=0 phishscore=0 mlxscore=0 mlxlogscore=999 clxscore=1011 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006080164 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41741 Cc: "Basil L. Contovounesios" , 41741@debbugs.gnu.org, Dmitry Gutov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > > Another example from the top of my head: recording project visit > > counts. That could be used for an option to show the most popular > > projects first in the completion list, for instance. >=20 > Or record project visit time, and then sort by time, > so that the most recently used projects are first. Haven't been following this thread; sorry. But this is one of the things bookmarks are great for. Whatever it is, bookmark it, and use the bookmark to access it. Each time you do, the bookmark updates the date+time visited and the number of visits. Nothing else is needed, just the ability to bookmark something. And you can do that for pretty much anything you can visit. If no existing bookmark type is relevant you can easily define a new bookmark type. From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 09 14:48:18 2020 Received: (at 41741-done) by debbugs.gnu.org; 9 Jun 2020 18:48:18 +0000 Received: from localhost ([127.0.0.1]:60921 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jijII-0000TM-3x for submit@debbugs.gnu.org; Tue, 09 Jun 2020 14:48:18 -0400 Received: from aibo.runbox.com ([91.220.196.211]:44456) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jijIG-0000TC-87 for 41741-done@debbugs.gnu.org; Tue, 09 Jun 2020 14:48:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=runbox.com; s=selector1; h=Content-Transfer-Encoding:Content-Type:MIME-Version: Message-ID:In-Reply-To:Date:References:Subject:Cc:To:From; bh=Vfp9FQSYUwiIBmcqcy2d6QDzcJOwGjIh+eFtLokf0CM=; b=HfNE2J9iiiUIGfXYqF4C8R3I/4 820jTg3/gBCY7wuxAo9sfgLIKETfyVOmZoKwZhjkOMqGrS72WCMfo5bkKgjQ2bL4PY2D99WDzUB+T DQ+EGPa7HaOVd8PqITDCkMxOezwRh9eXi2VZH4NuvOwiSCK0HoZloTY6DzXGtAfHKI6X/US8tykj8 PbgBRDx8pdfdlWB5wt6T7byNUE4wcXdQLgqGheiPF+Zcjs3C60Jvl5kYpN1CIZK4Vg5xVMB91qdYh XO9oNY4/RbXWtd4c/UiNj4/oloAgvqPd10hbS7KBLJdIpyMIO8VyX/i7rocbfy4km5xWxwYEmpZrU Zbni8C1A==; Received: from [10.9.9.72] (helo=submission01.runbox) by mailtransmit02.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1jijIB-0003Au-QQ; Tue, 09 Jun 2020 20:48:12 +0200 Received: by submission01.runbox with esmtpsa [Authenticated alias (963757)] (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) id 1jijI5-0001Wi-0x; Tue, 09 Jun 2020 20:48:05 +0200 From: =?utf-8?Q?Simen_Heggest=C3=B8yl?= To: Dmitry Gutov Subject: Re: bug#41741: [PATCH] Save project list as lisp data References: <877dwkno62.fsf@simenheg@gmail.com> <87wo4ips6d.fsf@simenheg@gmail.com> <873675jsbv.fsf@simenheg@gmail.com> <6638b451-1014-d267-cf7b-fbac8f4be83e@yandex.ru> Date: Tue, 09 Jun 2020 20:48:04 +0200 In-Reply-To: <6638b451-1014-d267-cf7b-fbac8f4be83e@yandex.ru> (Dmitry Gutov's message of "Mon, 8 Jun 2020 23:32:19 +0300") Message-ID: <87bllsnkij.fsf@simenheg@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 41741-done Cc: "Basil L. Contovounesios" , 41741-done@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Dmitry Gutov writes: > On 08.06.2020 22:00, Simen Heggest=C3=B8yl wrote: > >> Updated patch attached! > > All good! Installed! Thanks for reviewing. -- Simen From unknown Wed Jun 18 23:12:07 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 08 Jul 2020 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator