emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Joseph Vidal-Rosset <joseph.vidal.rosset@gmail.com>
To: Eric S Fraga <esflists@gmail.com>
Cc: emacs-orgmode list <emacs-orgmode@gnu.org>
Subject: Re: Links for getting email in Gmail (IMAP) with Gnus ?
Date: Tue, 13 Nov 2018 11:05:56 +0100	[thread overview]
Message-ID: <87k1lhxpff.fsf@gmail.com> (raw)
In-Reply-To: xuu68t1xe2um.fsf@gmail.com

Le mar.  13 nov. 2018 à  09:36:17 , Eric S  Fraga <esflists@gmail.com> 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 

      parent reply	other threads:[~2018-11-13 10:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-10 21:09 Links for getting email in Gmail (IMAP) with Gnus ? Joseph Vidal-Rosset
     [not found] ` <xuu68t1xe2um.fsf@gmail.com>
2018-11-13 10:05   ` Joseph Vidal-Rosset [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k1lhxpff.fsf@gmail.com \
    --to=joseph.vidal.rosset@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=esflists@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).