From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id UBwdJmScu2QgZAEASxT56A (envelope-from ) for ; Sat, 22 Jul 2023 11:07:48 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 6ITCJWScu2SFqQAAauVa8A (envelope-from ) for ; Sat, 22 Jul 2023 11:07:48 +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 352A73914E for ; Sat, 22 Jul 2023 11:07:48 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=vodafonemail.de header.s=vfde-mb-mr2-21dec header.b=pBFnXcbQ; 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=quarantine) header.from=vodafonemail.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1690016868; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=TFgsh5S6y2Trkdi27zpbt6z8gNSZb61IsHkHNvxaBfI=; b=qfuhk5YRfiWhy68xPOeRjI+oVfcN++oAOgADWsYmIHYPevEbJjUcJDOJ+h4iMMPpKE0Win giw4DbltAG7rdYGsCgY6J5+YQpQE0jHWUBYum2OvBYRf9+f7QYayd0a9NIgpCcE7HS6hAW NJpQfqSPYWaPoHSMwO3DVjg8s8anr2SUIbp8HDhB8yXjXOW4/YJZJIDo6Y0cK7ZyK8OVTG nvYhcqpaESzuO5wscNH4aENNKUHAibeBpOGWlARe0pkxPrYMWYTsdGRc2BuCDmjuxqfmPH xiYbqhRunH9I49Sahi3kFsf4eLyyGa+fR9EFyowQpNSvJXVIuzpSOPNBsKmgYw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1690016868; a=rsa-sha256; cv=none; b=BVLHvtoarsR0sT8V7l6neDNcFChZYjRQIaRw3k3ajT9fgN0ljF2mgSD0PQynLL8JAQ96O0 gb5h8q502S09AEKhf75bMo0v0t35Y6AUqEPXc2ExzUztafmVjPBlBE6RV6EaBkSGDGtVFu dERpEItfHufku12fTmLC5ggo+uluKTghP6DhlbhWcxqKis5I0OHQ/c89QIJJ2DLz54twnK 2fI7qvcW79EdL9jqh6lGZNTvv/xeOubWR4v3lo9XxsQRh++m7V1IdU/jbwJe+9AThfM5By xc9/hiFhb56J45bMQ8/WWQ9MFcLp4QzKUFxZ2gAUvVIfNGAT4LbGoiL/ra5ccg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=vodafonemail.de header.s=vfde-mb-mr2-21dec header.b=pBFnXcbQ; 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=quarantine) header.from=vodafonemail.de Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qN8Zf-0007OE-QR; Sat, 22 Jul 2023 05:06:51 -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 1qN8Ze-0007O1-Ip for emacs-orgmode@gnu.org; Sat, 22 Jul 2023 05:06:50 -0400 Received: from mr6.vodafonemail.de ([145.253.228.166]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qN8Zc-0004RE-7P for emacs-orgmode@gnu.org; Sat, 22 Jul 2023 05:06:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de; s=vfde-mb-mr2-21dec; t=1690016797; bh=TFgsh5S6y2Trkdi27zpbt6z8gNSZb61IsHkHNvxaBfI=; h=Content-Type:Message-ID:Date:User-Agent:Content-Language:From:To: Subject:From; b=pBFnXcbQbp0L/kveWm2OoVC614pCrAvlxmxVHDsCCHv1GXz98JBqCDPydTouuLxbR ThIPYqg/QOeUWgOMCNR/gRh6c1AR+pVEanO1Y1Yp07nGmbJhP2mX6KvIsWGBoPka+Z hZNv3UJ006SKdLOEsMzQ5IzWV+iraIeJ1hM7RU5U= Received: from smtp.vodafone.de (unknown [10.0.0.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mr6.vodafonemail.de (Postfix) with ESMTPS id 4R7LC14Vyzz1yFN for ; Sat, 22 Jul 2023 09:06:37 +0000 (UTC) Received: from [192.168.178.41] (port-92-194-211-18.dynamic.as20676.net [92.194.211.18]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp.vodafone.de (Postfix) with ESMTPSA id 4R7LBx2FXGzHnf1 for ; Sat, 22 Jul 2023 09:06:30 +0000 (UTC) Content-Type: multipart/mixed; boundary="------------J0IJCuUE6LtlF3rV4hVQTubR" Message-ID: <2fa5914d-2cbf-f41f-8be6-e79e77794140@vodafonemail.de> Date: Sat, 22 Jul 2023 11:06:29 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Content-Language: de-DE-frami, en-US From: Jens Schmidt To: emacs-orgmode@gnu.org Subject: [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/)] X-purgate-type: clean X-purgate: clean X-purgate-size: 7090 X-purgate-ID: 155817::1690016793-2FFF8487-77E569AC/0/0 Received-SPF: pass client-ip=145.253.228.166; envelope-from=jschmidt4gnu@vodafonemail.de; helo=mr6.vodafonemail.de 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, 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-Migadu-Scanner: mx2.migadu.com X-Migadu-Spam-Score: -8.61 X-Spam-Score: -8.61 X-Migadu-Queue-Id: 352A73914E X-TUID: 6JO0/Ssucqn2 This is a multi-part message in MIME format. --------------J0IJCuUE6LtlF3rV4hVQTubR Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Tags: patch `org-store-link' has a number of related issues when storing links from article buffers related to nnvirtual, nnselect, or nnir groups. I describe them here in prose without providing a full repro case, which would be somewhat difficult to set up. Just let me know if you think you need more information, I have the data available. The most obvious symptom is this: - Create an nnselect group and open an article from that. In the article buffer, do M-x org-store-link RET, then paste the link with C-c C-l in some Org mode buffer. The resulting link looks like gnus:#E18xcfu-0004HT-00@fencepost.gnu.org That is, it lacks the group name before the hash sign. Correct would have been: gnus:nnml+archive:test01#E18xcfu-0004HT-00@fencepost.gnu.org Starting with Emacs 30, you even more obviously get an error: Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil) nnselect-article-group(nil) org-gnus-store-link() org-store-link(nil 1) funcall-interactively(org-store-link nil 1) call-interactively(org-store-link record nil) command-execute(org-store-link record) execute-extended-command(nil "org-store-link" nil) funcall-interactively(execute-extended-command nil "org-store-link" nil) call-interactively(execute-extended-command nil nil) command-execute(execute-extended-command) Less obvious, occuring for nnvirtual groups: - Create an nnvirtual group and open an article from that. In the article buffer, do M-x org-store-link RET. Observe the "current article arrow" in the fringe being set in the article header, even though that arrow should be used only in a summary buffer. The root cause is that some of the Gnus functions used in `org-gnus-store-link' must be called only in summary buffers, and not in article buffers. These are: gnus-summary-article-number nnselect-article-group Not sure about these, but it is probably also better to call these in summary buffers only: nnvirtual-map-article nnir-article-group The remedy for these issues is simple: When calling above functions just temporarily and unconditionally switch to the summary buffer with (with-current-buffer gnus-summary-buffer ...) where buffer-local variable `gnus-summary-buffer' in an article buffer points to the summary buffer where the articles comes from. (And for a summary buffer the variable points to the summary buffer itself.) Finally, there is a related inefficiency when determining the article header structure in function `org-gnus-store-link': Here the authors indeed switch to the summary buffer when currently in the article buffer, but using "user-land" interactive function `gnus-article-show-summary' to do so where a simple (with-current-buffer gnus-summary-buffer ...) would suffice. Emacs : GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0) of 2023-07-20 Package: Org mode version 9.7-pre (release_9.6.7-570-gd6f3ae.dirty @ /home/jschmidt/work/org-mode/lisp/) --------------J0IJCuUE6LtlF3rV4hVQTubR Content-Type: text/x-patch; charset=UTF-8; name="0001-ol-gnus.el-Fix-issue-when-storing-links-from-Gnus-ar.patch" Content-Disposition: attachment; filename*0="0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