From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Sebasti=C3=A1n_Mon=C3=ADa?= Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Use vtable for eww-bookmarks Date: Sun, 01 Dec 2024 11:17:27 -0500 Message-ID: <87o71vml7s.fsf@sebasmonia.com> References: <87ldx0vufd.fsf@sebasmonia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31208"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org, jporterbugs@gmail.com To: Adam Porter Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Dec 01 17:18:32 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 1tHmeU-0007wH-9I for ged-emacs-devel@m.gmane-mx.org; Sun, 01 Dec 2024 17:18:31 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tHmdd-0005cD-7n; Sun, 01 Dec 2024 11:17:37 -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 1tHmdX-0005br-Qp for emacs-devel@gnu.org; Sun, 01 Dec 2024 11:17:31 -0500 Original-Received: from fhigh-a6-smtp.messagingengine.com ([103.168.172.157]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tHmdV-0002gq-RV for emacs-devel@gnu.org; Sun, 01 Dec 2024 11:17:31 -0500 Original-Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfhigh.phl.internal (Postfix) with ESMTP id CB37411400CE; Sun, 1 Dec 2024 11:17:28 -0500 (EST) Original-Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-01.internal (MEProxy); Sun, 01 Dec 2024 11:17:28 -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=1733069848; x=1733156248; bh=x1ZWu2hVGkjQIWnIfMUPGbBrF8KqVmO4 Dml3wu/3zaQ=; b=NhJOEwyKbPWHE8ZFVBb2FIiV63mComBHwY+yvN9Gcpp/1fbV 6jbERvMC8BCyxA6zeP1RxfjPjRhwPKdkEJeuatgkYJ1PL01F1zdslD7vV4Jds9AA mjIwgqU+j9BnzoJXocWqcJkY9HEI/20EVMXYwL1aP/HfgrhtoGfGqPvLUow0wSD0 tRtjF+oqkiW8p4zaWpfNvCpbM+cVhGt+tkF+4l1MwYO4RyZeqJ+NcbOlJm2U6ZM+ EG0sbCHKUvWZsC4WkV9Y5lxLVnZ4ZDGu4/wkUfSjQQXTlkX/3qlj2fRip5luOc/X yMtXKU5m0Vm50ZAzqQc1WfVK52qnvW5uoRrYTA== 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=1733069848; x= 1733156248; bh=x1ZWu2hVGkjQIWnIfMUPGbBrF8KqVmO4Dml3wu/3zaQ=; b=H 27kHnosklxw4LX1urUuEq55YBGLCpRo/AKPrPLd7C61IDHUBAAu+aoss+yeqGTgo tKjhIyL3qdoc++1Z8p3KzQO7Y4d0Zcquzt4Jf4vA+IBtYRYwjnz8hrX+/booENA1 /BcKEvCl/XsPyIug9k+F7lZoXfOYMXFONciAorYd9po3Wk+eqYcUvnpL7eXecvHP 4wz3d/dZjDuxOlc55USNV9nOMdPq1JbBZnq7CqHNng7KkAEhnremV7XJuxBlW3bo VT6Q6eFdhHQmkYL3bA1IK7LIHup5TOceUc04U4GcuZePJnFy7ZtunuSt+uZO8gUG 22gZlOnrwpWaKUxfVVs/Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrheejgdekhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth hsucdlqddutddtmdenucfjughrpefhvfevufgjfhffkfgfgggtgfesthhqredttderjeen ucfhrhhomhepufgvsggrshhtihojnhcuofhonhovrgcuoehsvggsrghsthhirghnsehsvg gsrghsmhhonhhirgdrtghomheqnecuggftrfgrthhtvghrnhepkeetteekgedvgeehveel tdeuhfevgffgkeehkeefteevkeeiheeivedttefhledunecuffhomhgrihhnpehsvggsrg hsmhhonhhirgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgr ihhlfhhrohhmpehsvggsrghsthhirghnsehsvggsrghsmhhonhhirgdrtghomhdpnhgspg hrtghpthhtohepfedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepjhhpohhrthgv rhgsuhhgshesghhmrghilhdrtghomhdprhgtphhtthhopegvmhgrtghsqdguvghvvghlse hgnhhurdhorhhgpdhrtghpthhtoheprggurghmsegrlhhphhgrphgrphgrrdhnvght X-ME-Proxy: Feedback-ID: iab2c46da:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 1 Dec 2024 11:17:28 -0500 (EST) In-Reply-To: (Adam Porter's message of "Sun, 1 Dec 2024 00:39:33 -0600") Received-SPF: pass client-ip=103.168.172.157; envelope-from=sebastian@sebasmonia.com; helo=fhigh-a6-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:325925 Archived-At: Adam Porter writes: >> Jim Porter writes: >>> I'm not sure what a better key would be though. Maybe "C" for "clear so= rt"? >> Attached a patch that uses "c" ("c", not "C") and renames the >> function >> to match. >> Let me know what you think! > Given how many similar modes and buffers that are in Emacs (i.e. where > some kind of objects are displayed in a list with metadata), I think > it would be best if any new such feature followed existing paradigms > as closely as possible. To have each vtable-like view (whether > implemented with vtable or tabulated-list or anything else) have > slightly different concepts and bindings is not helpful to the user. There is already some slight differences here and there and it is sometimes jarring, so, great point. For example Gnus uses # for marking, instead of m like vc-dir/dired, sometimes it trips me. > In this case, the vtable-map already binds > vtable-sort-by-current-column. So it seems like what we need is a > column by which to sort entries by default. That would seem to leave > us with two options: > > a) Sort by bookmark name by default > > b) Add a column for the bookmarks' place in the list, and sort by > that by default. The reason the bookmarks order matters, and this killing and yanking feature exists, is that EWW binds M-n and M-p to navigate to the next/prev bookmark. I doubt it is a popular feature (only found out about it when writing this patch...) but I wouldn't remove it. So defaulting to sort by name would be off the table, as it breaks the whole thing. Adding a column "Navigation order", or "rank" (both terrible names, open to suggestions) seems like a great idea.=20 > BTW, instead of doing: > > + (while (not (equal (vtable-current-object) > + bookmark-at-point)) > + (forward-line 1)))) > > Could you use vtable-goto-object? I realize that it currently uses EQ > for comparison, but 1) we've talked about changing that, and 2) ISTM > that EQ should work for this case anyway, because entries in the > bookmark list are being compared, and they shouldn't be getting > copied. Am I missing something? You are not, that code is a 1:1 conversion of the previous code. Next patch, which may include the new column, will make better use of vtable-goto-object when applicable. Thank you! Regards, Seb --=20 Sebasti=C3=A1n Mon=C3=ADa https://site.sebasmonia.com/