From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Use vtable for eww-bookmarks Date: Sat, 23 Nov 2024 11:12:22 -0800 Message-ID: <9c2c262e-320d-139b-cf6a-5b93cd98eb8b@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34172"; mail-complaints-to="usenet@ciao.gmane.io" To: =?UTF-8?B?U2ViYXN0acOhbiBNb27DrWE=?= , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Nov 23 20:13:18 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 1tEvZF-0008oL-T5 for ged-emacs-devel@m.gmane-mx.org; Sat, 23 Nov 2024 20:13:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tEvYc-0001zD-Mh; Sat, 23 Nov 2024 14:12:38 -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 1tEvYS-0001yJ-K9 for emacs-devel@gnu.org; Sat, 23 Nov 2024 14:12:29 -0500 Original-Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tEvYQ-0003me-Jk for emacs-devel@gnu.org; Sat, 23 Nov 2024 14:12:28 -0500 Original-Received: by mail-pg1-x52f.google.com with SMTP id 41be03b00d2f7-7ee51d9ae30so2567148a12.1 for ; Sat, 23 Nov 2024 11:12:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732389144; x=1732993944; darn=gnu.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=ghVYWBHDys8+knkbhIkhZ5DtbM2HIChiC7kWUldEoyI=; b=b6vmT184gSoLAu1D3jr1cweuVCGLvY/lzutewM5h4YjVgAUyXfrsas6IvUOLuTjrRx x9jBqrsrAcKfMmhiGCLaxYHeLKZ03dV6Cd4Zo7q1t8glutJ22ulVhB+T1wQ2l36ab/te 1GqIL3gbB0xdp9cUgW3ZZ22KijTIoQdqVW9didW7wFLsSXenAlxj+SdRedTaPESGNJZN ZPmgTDKp+8OEgGQ2zE9UV3MxaGZPcTNxUD5GMw93Oh0cDT2q8FCm+iZ+v9SnkiEn7GBJ NZ+WOjjcQ6DUToMwiHdtCrJcZl3SonzRqE6mTQypIGlmf6tUqM7U1c677d4dsW9JjPEJ aRlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732389144; x=1732993944; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ghVYWBHDys8+knkbhIkhZ5DtbM2HIChiC7kWUldEoyI=; b=wGcFPg9sU2PXII1HUIyXIkM2kZiQLEWVgcj1R+d8dAU7P4E14lqdJsxVNu4BeZHx+K dT1SGdrQdVHaLzxYBZ1Wgcu9nqFdqq/9J+CjS618zcyc3is+mFmfRpSQJ2rwvbvgDtld 5HE2IO+UoVm5twPMQ8/CSgGLi9NwhNa5haDI8JdvT7uPafVjwSaKRdKzpHa6wiI0Owr2 XF2/liH1GMiY6L9IOF+oCdplFvmPeevJA/wnqMiVWGRTf3Rn16GLCdEGFJNIkbuxlVm9 EBlfPoIrIWrThd93kabviVtSQb5qE8T7by7xES/UKneTGvLTmyuZHl45ieo86bhXKtKy cX+Q== X-Forwarded-Encrypted: i=1; AJvYcCVBnf1mb/QqoZ1roJRS6U2TuL+08fUaE4zb97l/zAgbf8LTE7/nulBEDzh58nHKz43nXsAdS1+QKL7Sew==@gnu.org X-Gm-Message-State: AOJu0YxbLM40V9kPl1FK3+HT8TgTpzqbR5f3dHMi1vJN4SgyPxRz6odB pzANBW2MBNU41xdNGdBN/5FwgqvCpL5MVZrgCaV8mpKiR+tW4BYwPyhtZg== X-Gm-Gg: ASbGncsO6axxy+Na1McMD8OVPodFR4s+hMPJOyZy5iZecHb6yX8SXOyRy54Lz9IS2Wq GPICkeCc1DWVlI9VNL70WJSI6m5mKdTUKQyi6fGixXkB+ggb/MDWdA+6lnspcEQfEpWAalHH9w0 puI4A2BM/x5V1afafX2roo6UO5fSoAqJpZOqzLtF8W3+JF6YGbNNrZuAcWyyKqzPqNQxJVtijyP 4s9WQkLscopuevU256EOuODBFxFC+XFs8yqmo2dAGuebmdA74B9QCboAgbOFVK6sEnZia9i+WnJ u9hVM/NQOffHSeu+Q7P0qTGmLG8= X-Google-Smtp-Source: AGHT+IFFAi/re/ywPGzufMkTvcZHovZMBmPNc7AhH+Jmbu71bOiNUzIJLsFtsVXLe5j36CqKWRLZPg== X-Received: by 2002:a05:6a20:a11a:b0:1db:e3f6:560 with SMTP id adf61e73a8af0-1e09e40a0edmr11160005637.13.1732389143759; Sat, 23 Nov 2024 11:12:23 -0800 (PST) Original-Received: from [192.168.1.2] (syn-023-240-098-037.res.spectrum.com. [23.240.98.37]) by smtp.googlemail.com with ESMTPSA id 41be03b00d2f7-7fbcbfc4c40sm3686823a12.7.2024.11.23.11.12.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 23 Nov 2024 11:12:23 -0800 (PST) Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::52f; envelope-from=jporterbugs@gmail.com; helo=mail-pg1-x52f.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:325632 Archived-At: On 11/5/2024 2:53 PM, Sebastián Monía wrote: > Hi all, > > The attached patch is a first attempt at bringing eww-bookmarks in line > with the previous switch of eww-buffer-list to vtable. > > There are features of eww-bookmarks I had no idea about, like the > ability to re-arrange them by killing and yaking. Or navigating to the > next bookmark from an eww buffer or invoking the command via M-x. I think this looks good overall. Just one thought: instead of requiring users to manually undo sorting when killing/yanking, what if we had 'eww-bookmark-kill' and 'eww-yank-bookmark' prompt the user to ask if they want to undo the sorting first? Something like this (untested): (defun eww-bookmark-kill (&optional interactive) (interactive "p") (when (and interactive (vtable-current-table) (vtable-sort-by (vtable-current-table))) (if (y-or-n-p "Reset sorting of bookmarks?") (eww-bookmark-undo-sort) (user-error "Can't kill sorted bookmarks"))) ;; ... ) Then we might not even need a keybinding for 'eww-bookmark-sort'.