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] EWW - use revert--buffer-function to reload, and allow reload in eww-list-buffer Date: Sat, 24 Aug 2024 10:27:51 -0700 Message-ID: References: <86jzgg5pgv.fsf@gnu.org> <86frqunwgu.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10659"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Eli Zaretskii , =?UTF-8?B?U2ViYXN0acOhbiBNb27DrWE=?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Aug 24 19:28:48 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 1shuZD-0002gy-OR for ged-emacs-devel@m.gmane-mx.org; Sat, 24 Aug 2024 19:28:47 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1shuYN-0003fv-Qq; Sat, 24 Aug 2024 13:27:55 -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 1shuYM-0003fi-8C for emacs-devel@gnu.org; Sat, 24 Aug 2024 13:27:54 -0400 Original-Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1shuYK-0001Ph-Ne; Sat, 24 Aug 2024 13:27:53 -0400 Original-Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-71423704ef3so2459925b3a.3; Sat, 24 Aug 2024 10:27:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724520471; x=1725125271; darn=gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=8TxYYjs49c9rlgNgROrRvuJZvPP0AVO5lxEgH9bvVws=; b=L3aHD8EsJ2jmKtlhOFZBf6NMUOdTQuCJzRsEFYS6d6eNAym+Pu4SBBq1u0WVHyRYNg B1rOJpgyaR+FX0ibnfcoyA6B3pgCNdhVjmXLLPXjCG/QWPLKYcrtcj9SwvEW7hL+dGj6 c2xg3uzMfO9D1F5CM+S0VVF2YyZ3Y1tlW+K19hYHY91IsS4/U7sBn8EkVik3uu1Iwm8k KpN9nQduxIoerLqL5oFi7BmTdLlTQmo7BdczWcsA6dqnP77c1qr1qGZHltlrF+VpfC3l htg1/L3rK/tu633DRj5K7kQsNiBWWnrIsOaI9vrqcXi3MR9C0R69uW6iUgMF7UhAGKRE M56g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724520471; x=1725125271; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=8TxYYjs49c9rlgNgROrRvuJZvPP0AVO5lxEgH9bvVws=; b=TohIl5v4p2M9NsvjeQg1W+DXCQ0OQzt3ngX21P5o3JvNahJv/fsjDLsGy63k3clnnX 1HdjlffoFTFpX+37ZaAxMcYNPzwKdU6MJeiTJg9ZU9xxy2/rLzwEK689B6HXZjZqSWts oghtOeDt69ISyBHVSjk1XI2J/Rul7aXuqsIdhd1QihHjyYbwmoSPGWGT2MNRLSlOF/mt h1LYL3br6McJUE1brseTXVGABgig4LmDede5sjJq0KIKw4/PIb++n67v+O+Hxb/8KP4q IcTZQph8M87ObZtbbINRCib94ldKGETSoF7GtncXQjSNegK+YkHuyKDCBVd/0rov5w50 vDAQ== X-Gm-Message-State: AOJu0YzYE/wbLJJHSjiyLm2B0jIuWLlH0FNcyt0F3UmCnpJD6fANzttT gs/FERKyQjk3a3HpVEtC4tOA0HH4p8GP2xRGCc+fI7DabiPM3uUjX9g9Qg== X-Google-Smtp-Source: AGHT+IHigiA6ApUGKj0Y5ZxHBCAv6BdtVm38o6zke/9dX8ro570zQyWEcbXGzUd9XVeDrmPVc/8MiA== X-Received: by 2002:a05:6a21:339a:b0:1cc:961f:33c6 with SMTP id adf61e73a8af0-1cc961f36e0mr5527565637.19.1724520470682; Sat, 24 Aug 2024 10:27:50 -0700 (PDT) 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 d2e1a72fcca58-7143427507esm4845109b3a.96.2024.08.24.10.27.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 24 Aug 2024 10:27:50 -0700 (PDT) Content-Language: en-US In-Reply-To: <86frqunwgu.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=jporterbugs@gmail.com; helo=mail-pf1-x42f.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, T_SCC_BODY_TEXT_LINE=-0.01 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:323110 Archived-At: On 8/24/2024 1:42 AM, Eli Zaretskii wrote: > Jim, would you please review this and provide comments, if any? Hmm, it seems strange to me that this patch makes 'eww-list-buffers' be the 'revert-buffer-function'. That function contains some additional logic that I don't think belongs for reverting the buffer. For example, if I opened the EWW buffer list and then renamed the buffer, I'd expect 'revert-buffer' to update the contents of that (now-renamed) buffer. From reading the code, I think what would happen is that it pops to a *new* buffer with the original "*eww buffers*" name. So I think we'd want some new function like 'eww--do-list-buffers' that takes the code from 'eww-list-buffers' that actually writes out the text (i.e. the 'let' form starting with '(inhibit-read-only t)'). Then have 'eww-list-buffers' call that, and set 'revert-buffer-function' to 'eww--do-list-buffers'. Or something like that anyway...