From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?iso-8859-1?Q?Sebasti=E1n_Mon=EDa?= Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Use vtable for eww-bookmarks Date: Thu, 12 Dec 2024 14:37:23 -0500 Message-ID: References: <87ldx0vufd.fsf@sebasmonia.com> <8fde5a67-f778-f0c8-bcdd-ece08c95d369@gmail.com> <87h67nm4su.fsf@sebasmonia.com> <28ba395f-5c52-1fc8-a99a-9bae461520d8@gmail.com> <36a57a48-76ab-4254-b3bc-af1fff2d9b98@app.fastmail.com> <87ttb9k04u.fsf@sebasmonia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1802"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Jim Porter , emacs-devel , Eli Zaretskii To: Adam Porter Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Dec 12 20:38:05 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 1tLp0d-0000Fk-SR for ged-emacs-devel@m.gmane-mx.org; Thu, 12 Dec 2024 20:38:05 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tLp07-0002Ni-3s; Thu, 12 Dec 2024 14:37:31 -0500 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 1tLp05-0002NY-1z for emacs-devel@gnu.org; Thu, 12 Dec 2024 14:37:29 -0500 Original-Received: from fhigh-a3-smtp.messagingengine.com ([103.168.172.154]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tLp02-0008KA-VH; Thu, 12 Dec 2024 14:37:28 -0500 Original-Received: from phl-compute-11.internal (phl-compute-11.phl.internal [10.202.2.51]) by mailfhigh.phl.internal (Postfix) with ESMTP id 0CCE211400D9; Thu, 12 Dec 2024 14:37:25 -0500 (EST) Original-Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-11.internal (MEProxy); Thu, 12 Dec 2024 14:37:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sebasmonia.com; h=cc:cc:content-transfer-encoding:content-type:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=fm1; t=1734032245; x=1734118645; bh=kLhujPUlrXOK5/OzAOd60Za6HkDKE0zI 3hxltbV+iGk=; b=frm80bom6aWVwwtQ8CIXBDI5GtD8Uebqawah8MRp46AXQOQI HWks7zLxgJnFOTEpnhYoIjXAzTN3PWAg7KgG0TxiVY4gXGoyHc5tjT8gJjt+qzSo u8fXmvsywW9XXrdoVAfALS0GR0yeJZlZZep0kIPOBoVXFSVLISj6DfawM+vjASaL Z/Cs/vuHCEvd1iXEgzET00YhiycurJeHINOMevZaX9EREG3pLgtGTUE3rVc2eYas uHUu/6ShlJMc8mtsvjSNgGCAVpPS1/nZ+6SIqAkfmatb8edxJoyyJgO//SFXoz4I mjlozMFyjHibk+Y5mDrwXAYB6QwPAaslV1Io8g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1734032245; x= 1734118645; bh=kLhujPUlrXOK5/OzAOd60Za6HkDKE0zI3hxltbV+iGk=; b=Y 4LJpE7KQjEqxqhcTI6Vtxixh6Jd6NQvO00vfmLRYUFVU9ZW4+ZXu0XDkCxb8TZSH YIGxlA/HNUzz/ziD1s5QebeeAYElA/s7k4Q+p+1E0JqwM7oLpHVpo3qcecFZXLI4 fVhfn8lXIPfs7nZdqcoXqFVLPIq8Lk5t6MO6hXNVaDPA5+ZnijbLp1xE3K3VZTXn FvRkkyQtvRSiBocMw3ylZXSeeDBnfGjTb7lvituXr7hMgllmF8h+g08KP71LBogx GRV8BQ26VJ/q8mFE/iq8ZPfwsZ4IZNeXGqcB4O0JIgGWBCiV5on/rNjkbISnBT30 NHczOK0NjB2L8Djbl9F7g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrkeehgdduvdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhephffvvefujghffffkfgggtgfgsehtqhertddtredu necuhfhrohhmpefuvggsrghsthhijohnucfoohhnvogruceoshgvsggrshhtihgrnhessh gvsggrshhmohhnihgrrdgtohhmqeenucggtffrrghtthgvrhhnpeejfeekteevuedvffeh tdegueektdevkeevtefhvdfgffeiieeiteeugfdvieevkeenucffohhmrghinhepshgvsg grshhmohhnihgrrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehm rghilhhfrhhomhepshgvsggrshhtihgrnhesshgvsggrshhmohhnihgrrdgtohhmpdhnsg gprhgtphhtthhopeegpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegvlhhiiies ghhnuhdrohhrghdprhgtphhtthhopegvmhgrtghsqdguvghvvghlsehgnhhurdhorhhgpd hrtghpthhtohepjhhpohhrthgvrhgsuhhgshesghhmrghilhdrtghomhdprhgtphhtthho pegruggrmhesrghlph X-ME-Proxy: Feedback-ID: iab2c46da:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 12 Dec 2024 14:37:24 -0500 (EST) In-Reply-To: (Adam Porter's message of "Thu, 12 Dec 2024 12:08:05 -0600") Received-SPF: pass client-ip=103.168.172.154; envelope-from=sebastian@sebasmonia.com; helo=fhigh-a3-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-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:326442 Archived-At: Adam Porter writes: > About regenerating the elements and not being able to use EQ: is that > because the original bookmark objects are not being used as-is? Correct. > If so, could we address that? We could add the order in the file format. Or number the items when we read them. Then use the object including the number to track it all. But when change the "order" number associated with a row, then it won't be eq/equal anymore, anyway. Maybe better: vtable provides a mechanism to have a printer function called on each row. Then the objects stay the same, in the `eq' sense, and we can keep the counter for order outside the row, as part of the printer/"formatter" (in vtable parlance). To consider: then we would call a function for each printed row vs calling it once to generate the list in one go. Plus the code to update the items order number when removing and inserting each one. Of course the real answer on which one is "faster" or "leaner" needs a benchmark. For 90% of cases the amount of bookmarks won't be more than a couple dozen, so I don't think it will matter. I would leave it as-is on the grounds of (add less code + the speed/memory difference is small)(1). But as usual, if there's consensus that we rather do the outlined above instead, I'll do it. (1) like I said, no benchmark, so "_I assume_ the difference is small" > On Thu, Dec 12, 2024, 09:25 Sebasti=E1n Mon=EDa wrote: > > Sebasti=E1n Mon=EDa writes: > > > Sebasti=E1n Mon=EDa writes: > > Hi all, > > Attached a patch with "Order" and validation for this sort before > > kill/yank. > > As always, open to feedback. > > Updated the patch to include the changelog :) > > --=20 > Sebasti=E1n Mon=EDa > https://site.sebasmonia.com/ > --=20 Sebasti=E1n Mon=EDa https://site.sebasmonia.com/