From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id +A08HUHavWRYJAEASxT56A (envelope-from ) for ; Mon, 24 Jul 2023 03:56:17 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id qM4lHUHavWR1GAEA9RJhRA (envelope-from ) for ; Mon, 24 Jul 2023 03:56:17 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 3FC2051E1B for ; Mon, 24 Jul 2023 03:56:12 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=ericabrahamsen.net header.s=mail header.b=SNfNx9oo; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=ericabrahamsen.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1690163773; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=8IFrXrQeBIbXYtWEo1n6IoYO8XBr4u73HIcFR8ZXsaQ=; b=EFvOeK/LuPm7mtdDBA3YIjKX/pyoR6SfXJh+7wwQ8r4vNSbiI5Ka7EoyVkP4Wd1jfxGIWx 8k9HMqUh7FUKn8Y03pp5dVPdut1yeC47J9Ry1WCzS893Bl3XUy0v+iIQTh7jxDOThOJGNj 6VSUi8HK/bR5AEpy4jC9HA5AfuYm04eTN+YfiWLEXkeYl24OkuGLhBSlBYA8C8I2RubtQJ u1DxOLvUXm05kisa9uxbE5mcU3BnJKst0jgQVYFSMtG5nqfmB9POcqRn3Muib/kMDV4hmM TfmwLcv8vkqkeGU4gueQ78whNu5xNzJ83h0DY34U6AAQvfePwIPhqlC2okfm1Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=ericabrahamsen.net header.s=mail header.b=SNfNx9oo; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=ericabrahamsen.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1690163773; a=rsa-sha256; cv=none; b=LBeOqzsDJop2fV2sxgINfDmkNmFzeVTvhNAoMQyqiraBTaVqh4DaNouWhvG/nQ5cm120WN atjrLQL2EauFavt2SJjoT5L6L4zggdfjNJpobqUoL1yGRmKnDAVfYdE/X1JQiarYg8qRYq Mdnbq5VeBqd5e+6Sjm6VZRyrvUJbuN4RKGc/gJX4VW6XxBVVVovs6gukyu2GTkvkLCRSLs MIA1idFauc/WRjn+6rdYHSNJbND/hawRCEdP6J8C84T4P50KS+dg3k/cq4cYGRjwJdArK+ zmN1Aa7jOpfkFP44zSY19/nf3QPfudmvHd1M1Wsv10wo1zWgzy75YlDB7vzcVA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qNknI-0000vD-On; Sun, 23 Jul 2023 21:55:29 -0400 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 1qNkn7-0000u7-1h for emacs-orgmode@gnu.org; Sun, 23 Jul 2023 21:55:18 -0400 Received: from mail.ericabrahamsen.net ([52.70.2.18]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qNkn3-0004PQ-3c for emacs-orgmode@gnu.org; Sun, 23 Jul 2023 21:55:14 -0400 Received: from localhost (c-71-197-232-41.hsd1.wa.comcast.net [71.197.232.41]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 38E8DFA095; Mon, 24 Jul 2023 01:55:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1690163702; bh=8IFrXrQeBIbXYtWEo1n6IoYO8XBr4u73HIcFR8ZXsaQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=SNfNx9oo3KYeElHKclW2Kl5F+c3R3eJ4qb33Ta55pqL06x+SP0FVrk2RL0xG4030T xHnDv/qd3YYDA6WHFar4jKV12bICiSJSPRUiZOL/NCmFb/m9slT1ptD9qU1zgKQrf4 7DcWb50rqejg3/Rpoj6sZirPzBDPtMLnskVGkfeg= From: Eric Abrahamsen To: Ihor Radchenko Cc: emacs-orgmode@gnu.org Subject: Re: [BUG] Issues in ol-gnus when storing links in nnvirtual and nnselect articles [9.7-pre (release_9.6.7-570-gd6f3ae.dirty @ /home/jschmidt/work/org-mode/lisp/)] In-Reply-To: <87msznrur7.fsf@localhost> (Ihor Radchenko's message of "Sun, 23 Jul 2023 06:45:32 +0000") References: <2fa5914d-2cbf-f41f-8be6-e79e77794140@vodafonemail.de> <87y1j8rrag.fsf@localhost> <1b9fbe38-0572-7861-e433-8f26457302bb@vodafonemail.de> <87edkzveks.fsf@ericabrahamsen.net> <87msznrur7.fsf@localhost> Date: Sun, 23 Jul 2023 18:55:01 -0700 Message-ID: <87bkg2t6oa.fsf@ericabrahamsen.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=52.70.2.18; envelope-from=eric@ericabrahamsen.net; helo=mail.ericabrahamsen.net X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_MED=-2.3, 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-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Spam-Score: -8.42 X-Migadu-Queue-Id: 3FC2051E1B X-Migadu-Spam-Score: -8.42 X-Migadu-Scanner: mx0.migadu.com X-TUID: hWlVPy6YDRTH Ihor Radchenko writes: > Eric Abrahamsen writes: > >> We should definitely be using the paradigm above (using the >> gnus-summary-buffer as the current buffer). The article number fetching >> only works by accident in the article buffer, and other stuff (like >> finding the original nnselect group name) won't work at all. > > I am convinced then. > Ideally, it would be nice to have tests, though I have no clue how to > approach writing them. > >> Later in the function we've got this: >> >> (save-window-excursion >> (save-excursion >> (gnus-article-show-summary) >> (gnus-summary-article-header))) >> >> If we're currently in article-mode. The call to >> `gnus-article-show-summary' would protect against the case where the >> summary buffer has been killed in the meantime, but I agree that's kind >> of a pathological case. > > I'd say that the patch will be an improvement anyway. > >> Probably it would be enough to wrap the whole containing `let*' in a >> (with-current-buffer gnus-summary-buffer ...). If we're already in the >> summary buffer, no harm done. > > I am not sure if it is safe. > There is > (save-window-excursion (gnus-summary-select-article)) > which calls (set-buffer gnus-summary-buffer) > > `with-current-buffer' will certainly alter how things work (although, > switching buffer when capturing link is already fishy). Ugh, this whole thing is a mess. I think the first question is: should this function "fix" the state of Gnus before it makes a link? Should it attempt to re-open the Summary buffer if it's been closed? Should it switch current articles if the open article buffer is not the one that point is on in the Summary buffer? If we make a decision about that, then it should be easier to decide how to handle the code changes themselves. Eric