From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/85082 Path: news.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.gnus.general Subject: Re: Deleting mail in virtual group Date: Sun, 05 Oct 2014 16:36:46 +0800 Message-ID: <87a95a9ald.fsf@ericabrahamsen.net> References: <87mw9cfazu.fsf@mailbox.org> <87zjdcyp8o.fsf@ericabrahamsen.net> <874mvkexiw.fsf@mailbox.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1412497966 12241 80.91.229.3 (5 Oct 2014 08:32:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 5 Oct 2014 08:32:46 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M33326@lists.math.uh.edu Sun Oct 05 10:32:39 2014 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XahF6-0006xc-G6 for ding-account@gmane.org; Sun, 05 Oct 2014 10:32:37 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1XahEn-0003pF-PC; Sun, 05 Oct 2014 03:32:17 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1XahEl-0003op-HE for ding@lists.math.uh.edu; Sun, 05 Oct 2014 03:32:15 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1:AES128-SHA:128) (Exim 4.76) (envelope-from ) id 1XahEj-00039l-TG for ding@lists.math.uh.edu; Sun, 05 Oct 2014 03:32:14 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]) by quimby.gnus.org with esmtp (Exim 4.80) (envelope-from ) id 1XahEf-0001pG-In for ding@gnus.org; Sun, 05 Oct 2014 10:32:09 +0200 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XahEf-0006nJ-EJ for ding@gnus.org; Sun, 05 Oct 2014 10:32:09 +0200 Original-Received: from 125.77.228.68 ([125.77.228.68]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 05 Oct 2014 10:32:09 +0200 Original-Received: from eric by 125.77.228.68 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 05 Oct 2014 10:32:09 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 39 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 125.77.228.68 User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) Cancel-Lock: sha1:agO19dNW2oJNyY/xlqEd9lpo3ZQ= X-Spam-Score: -1.7 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:85082 Archived-At: Alexander Baier writes: > On 2014-10-04 14:48 Eric Abrahamsen wrote: >>> I want to write my own command that finds the original group of the >>> article in question and executes the move in that group. Is there a >>> function that gets me the original group of an article in a virtual >>> group? >> >> I'm pretty sure that nnvirtual-find-group-art will do what you want. >> Feed it the article number of the article under point, along with >> gnus-newsgroup-name in the virtual Summary buffer. See how it works! > > Thank you for your quick reply! These to functions do what I want and I > get the correct original group and article. But now I am stuck and do > not know how to get to the original group. This is what I tried: > > #+BEGIN_SRC emacs-lisp > (defun my-nnvirtual-delete-article () > (interactive) > (let ((original (nnvirtual-find-group-art > gnus-newsgroup-name > (gnus-summary-article-number)))) > (with-current-buffer gnus-group-buffer > (gnus-group-goto-group (car original)) > (gnus-summary-goto-article (cdr original))))) > #+END_SRC All `gnus-group-goto-group' does is move to the group's line in the *Group* buffer. Try `gnus-group-read-group' instead. That -- or something involving that -- ought to do what you want. > The group and article number returned by nnvirtual-find-group-art are > correct, I checked. But the with-current-buffer part does not seem to > work, as gnus always displays the article from the nnvirtual group with > the original number. > > How do I switch to the original group? > > TIA,