From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joseph Vidal-Rosset Subject: Re: Links for getting email in Gmail (IMAP) with Gnus ? Date: Tue, 13 Nov 2018 11:05:56 +0100 Message-ID: <87k1lhxpff.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40743) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gMVa8-0007ZC-TO for emacs-orgmode@gnu.org; Tue, 13 Nov 2018 05:06:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gMVa7-0006ca-Qi for emacs-orgmode@gnu.org; Tue, 13 Nov 2018 05:06:04 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:56157) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gMVa6-0006ad-Mo for emacs-orgmode@gnu.org; Tue, 13 Nov 2018 05:06:03 -0500 Received: by mail-wm1-x32c.google.com with SMTP id i73-v6so5954961wmd.5 for ; Tue, 13 Nov 2018 02:05:59 -0800 (PST) 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: Eric S Fraga Cc: emacs-orgmode list Le mar. 13 nov. 2018 =C3=A0 09:36:17 , Eric S Fraga = a envoy=C3=A9 ce message: > On Saturday, 10 Nov 2018 at 22:09, Joseph Vidal-Rosset wrote: >> Hello, >> >> I know that it is possible to link emails in Todo list, but I meet >> difficulties with Gmail IMAP and Gnus when the mail is in the box "All >> emails" ("Tous les messages" in French): as soon as the email is in this >> Archive, the link is broken and Gnus does not fetch it. > > Instead of reading your gmail messages in the Inbox, you could read them > in the All mail group instead and link to emails in that group? > Alternatively, don't archive your emails. Many thanks Eric for your suggestion, but finally, I succeeded in writing a code that makes the job. I am going to give it to the list, it could be helpful for others. Here it is (in my scimax/user/user.el): #+BEGIN_SRC emacs-lisp ;;capture todo items using C-c c t (define-key global-map (kbd "C-c c") 'org-capture) (setq org-capture-templates '(("t" "todo" entry (file+headline "~/Dropbox/Orgzly/todo.org" "Tasks= ") "* TODO [#A] %?"))) (setq org-capture-templates '(("t" "todo" entry (file+headline "~/Dropbox/Orgzly/todo.org" "Tasks= ") "* TODO [#A] %?\nSCHEDULED: %(org-insert-time-stamp (org-read-date= nil t \"+0d\"))\n") ("m" "TODO from Mail" entry (file+headline "~/Dropbox/Orgzly/todo.= org" "Tasks")=20 "* TODO [#A] %?\n Voir l'email du %(org-insert-time-stamp (org-read-da= te nil t \"+0d\"))\n* LINK %a") )) (defun hs/replace () (interactive) (goto-char 1) (let ((search-invisible t)) (replace-string "gnus:INBOX#" "gnus:%5BGmail%5= D/Tous les messages#")))=20 #+END_SRC Note that %5B codes [ and that %5D codes ] .=20 As soon as the Todo note is in my todo.org, the email is linked correctly and can be put in "Tous les messages" folder.=20 I have now another small problem to write a convenient kbd to archive items once they are done, if I do not succeed to find the solution, I will write again to the list.=20 Best wishes,=20 --=20 Joseph=20