emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Links for getting email in Gmail (IMAP) with Gnus ?


From: Joseph Vidal-Rosset
Subject: Re: [O] Links for getting email in Gmail (IMAP) with Gnus ?
Date: Tue, 13 Nov 2018 11:05:56 +0100

Le mar.  13 nov. 2018 à  09:36:17 , Eric S  Fraga <address@hidden> a
envoyé 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") 
     "* TODO [#A] %?\n Voir l'email du %(org-insert-time-stamp (org-read-date 
nil t \"+0d\"))\n* LINK %a")
        ))

(defun hs/replace ()
   (interactive)
   (goto-char 1)
 (let ((search-invisible t)) (replace-string "gnus:INBOX#" 
"gnus:%5BGmail%5D/Tous les messages#"))) 
#+END_SRC

Note that %5B codes [  and that %5D codes ] . 

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. 

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. 

Best wishes, 

-- 
Joseph 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]