From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joseph Vidal-Rosset Subject: Re: org-links for Gnus in imap with Gmail (for a convenient todo.org list) Date: Sat, 27 Jul 2019 11:36:50 +0200 Message-ID: <5d3c1b32.1c69fb81.91715.a5f9@mx.google.com> References: <5d39d7af.1c69fb81.2893e.8fde@mx.google.com> <87k1c6x6vu.fsf@gmail.com> <5d3aa844.1c69fb81.a5d88.d59d@mx.google.com> <87ef2d1cmz.fsf@gmail.com> <5d3aaeaf.1c69fb81.409b9.f45e@mx.google.com> <87k1c4zosh.fsf@bobnewell.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:40965) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hrJ8J-0008Jw-3s for emacs-orgmode@gnu.org; Sat, 27 Jul 2019 05:36:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hrJ8I-0005KC-51 for emacs-orgmode@gnu.org; Sat, 27 Jul 2019 05:36:55 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:38173) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hrJ8H-0005Jo-TS for emacs-orgmode@gnu.org; Sat, 27 Jul 2019 05:36:54 -0400 Received: by mail-wr1-x432.google.com with SMTP id g17so56774096wrr.5 for ; Sat, 27 Jul 2019 02:36:53 -0700 (PDT) In-Reply-To: <87k1c4zosh.fsf@bobnewell.net> (Bob Newell's message of "Fri, 26 Jul 2019 07:30:38 -1000") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Bob Newell Cc: emacs-orgmode list Le ven. 26 juil. 2019 =C3=A0 07:30:38 , Bob Newell a envoy=C3=A9 ce message: > Aloha, > > I too came across this long ago. I like a 'zero inbox' and so I archive > (or delete!) my gmail after reading. And indeed, when you move from > INBOX to "All Mail" an org-link to INBOX will no longer function. > > I use Gnus and do something rather simple and easy: > > (defun changegroupinemaillink (args) > (setcar args > (replace-regexp-in-string > "gmail.com:INBOX" > "gmail.com:[Gmail]/All Mail" (car args))) > args > ) > (advice-add 'org-gnus-article-link :filter-args #'changegroupinemaillink) > > After this, links point to All Mail and the mail will always be found. Many thanks for your message Bob (I know your impressive website that is helpful for org-mode, thanks also for that). My problem is how can I change the following code: (setq org-capture-templates '( ("t" "todo" entry (file+headline "~/Dropbox/Orgzly/todo.org" "Tasks") "* TODO [#A] %?\n [[~/Dropbox/Orgzly/links.org::%(org-insert-time-= stamp (org-read-date nil t \"%:date\"))]] \n* %(org-insert-time-stamp (org-= read-date nil t \"%:date\")) %a " ) ) ) in order to get All Mail (or Tous les messages in my case) directly in the produced link once "t" key is entered? I have tried to do it with the function hs/replace that I have defined, without success. I guess that it is of course possible, but it is not easy for me. Your help will be again very welcome. Best wishes, --=20 Jo.