Re: [O] Fwd: how do you compose mails in Gnus with org-mode

2018-03-01 Thread Roland Everaert
I also want to thank you for the last link, notmuch seems waht I was search
for too.


Regards,


Roland.

On Thu, Mar 1, 2018 at 8:01 PM, Brian Shine  wrote:

> Thank you so much.  This looks like a great website.  I’ll have a read and
> see whether I can get it to work.  I may well call on you!
>
> Best wishes,
> Brian
>
> On 1 Mar 2018, at 18:46, Joseph Vidal-Rosset <
> joseph.vidal.ros...@gmail.com> wrote:
>
> Le jeu. 01 mars 2018 à 06:17:48 , Brian Shine  a
> envoyé ce message:
> > This is a wonderful resource, but I wonder if I can ask how to set up
> > email using emacs? I’ve failed multiple times to do this using
> > several solutions that are suggested. My main accounts are with iCloud
> > and Exchange and I have never managed to log in through the suggested
> > methods. I’m obviously doing something basic incorrectly.
> >
> > Is there a really simple guide to setting this up?
> >
> > Best wishes,
> > Brian
>
> Hello,
>
> It is difficult to give you and advice, because as you know there are
> many email clients for emacs.
>
> Maybe you can read this web page first, that could help you to make a
> choice:
>
> https://wwwtech.de/articles/2016/jul/my-personal-mail-setup
>
> I am using Gnus with Gmail, and it works smoothly. I do not believe
> that I will change now. But it is time consuming to get the convenient
> setup.
>
> If Gnus can be you choice, I will be happy to help you, as I can,
> because there many people in this list that are more experts than me
> (Eric Fraga for example).
>
> Best wishes,
>
> Jo.
>
>
>


Re: [O] Fwd: how do you compose mails in Gnus with org-mode

2018-03-01 Thread Eric S Fraga
On Thursday,  1 Mar 2018 at 19:04, Joseph Vidal-Rosset wrote:

[...]

> autoinsert works well  for new org files,  it is a first  good point for
> me. I receive this message: Perform org-mode auto-insertion? (y or n)
> and after replying "y" I get my org file with the bibliography link.
>
> Unfortunately, it does not work in Gnus with the command M-x org-mode on
> a reply to a message, and I do not understand why.

Because switching to org mode is not creating a new file but simply
changing the mode of an existing buffer.  Autoinsert is only for new
files.  What you could do is customise gnus to create your email buffer
with the right content instead.

If there is a predictable circumstance when you want to effect this
auto-insertion in emails, I would suggest you look at gnus posting
styles (section 5.6 of the gnus info manual).  You can specify a default
"body" for an email when created (along with other things, typically a
signature).  For instance, the signature on this email is automatically
inserted by gnus when I respond to an email in the org mailing list.

#+begin_src emacs-lisp
  (setq gnus-posting-styles
'((".*:lists.org"
   (signature esf/orgmode-signature-version
#+end_src 

(much abridged) where lists.org is the group in which org emails are
split to (by gnus) and

#+begin_src emacs-lisp
  (defun esf/orgmode-signature-version ()
(format "Eric S Fraga via Emacs %s, Org %s\n"
emacs-version (org-git-version)))
#+end_src 

You could also consider defining entries in *gnus-alias-identity-alist*
which you can then invoke manually on specific emails using
gnus-alias-use-identity, which I have bound to C-c i.  This can insert
default text in the body as well as do other things, much like posting
styles.

gnus is much like org in that if there's something you want to do,
there's more than likely a solution already!  Well, actually, I guess
this is really a feature of emacs...

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.1.6-191-g90607d


signature.asc
Description: PGP signature


Re: [O] Fwd: how do you compose mails in Gnus with org-mode

2018-03-01 Thread Brian Shine
Thank you so much.  This looks like a great website.  I’ll have a read and see 
whether I can get it to work.  I may well call on you!

Best wishes,
Brian

> On 1 Mar 2018, at 18:46, Joseph Vidal-Rosset  
> wrote:
> 
> Le jeu. 01 mars 2018 à 06:17:48 , Brian Shine  a
> envoyé ce message:
> > This is a wonderful resource, but I wonder if I can ask how to set up
> > email using emacs? I’ve failed multiple times to do this using
> > several solutions that are suggested. My main accounts are with iCloud
> > and Exchange and I have never managed to log in through the suggested
> > methods. I’m obviously doing something basic incorrectly.
> >
> > Is there a really simple guide to setting this up?
> >
> > Best wishes,
> > Brian
> Hello,
> It is difficult to give you and advice, because as you know there are
> many email clients for emacs.
> Maybe you can read this web page first, that could help you to make a
> choice:
> https://wwwtech.de/articles/2016/jul/my-personal-mail-setup 
> 
> I am using Gnus with Gmail, and it works smoothly. I do not believe
> that I will change now. But it is time consuming to get the convenient
> setup.
> If Gnus can be you choice, I will be happy to help you, as I can,
> because there many people in this list that are more experts than me
> (Eric Fraga for example).
> Best wishes,
> Jo.
> 



Re: [O] Fwd: how do you compose mails in Gnus with org-mode

2018-03-01 Thread Joseph Vidal-Rosset
Le jeu.  01 mars 2018  à 06:17:48  , Brian Shine   a
envoyé ce message:
> This is a wonderful resource, but I wonder  if I can ask how to set up
> email  using emacs?   I’ve  failed  multiple times  to  do this  using
> several solutions that are suggested. My main accounts are with iCloud
> and Exchange and I have never  managed to log in through the suggested
> methods.  I’m obviously doing something basic incorrectly. 
>
> Is there a really simple guide to setting this up?  
>
> Best wishes,
> Brian

Hello,

It is difficult  to give you and  advice, because as you  know there are
many email clients for emacs.

Maybe you can  read this web page  first, that could help you  to make a
choice:

[[https://wwwtech.de/articles/2016/jul/my-personal-mail-setup]]

I am using  Gnus with Gmail, and  it works smoothly. I  do not believe
that I will change now. But it is time consuming to get the convenient
setup. 

If Gnus  can be you  choice, I will  be happy to  help you, as  I can,
because there many  people in this list that are  more experts than me
(Eric Fraga for example). 

Best wishes, 

Jo. 


Re: [O] Fwd: how do you compose mails in Gnus with org-mode

2018-03-01 Thread Brian Shine
This is a wonderful resource, but I wonder if I can ask how to set up email 
using emacs?   I’ve failed multiple times to do this using several solutions 
that are suggested. My main accounts are with iCloud and Exchange and I have 
never managed to log in through the suggested methods.  I’m obviously doing 
something basic incorrectly. 

Is there a really simple guide to setting this up?  

Best wishes,
Brian


> On 1 Mar 2018, at 18:04, Joseph Vidal-Rosset  
> wrote:
> 
> Le jeu.  01 mars 2018 à  04:59:27 , Eric S  Fraga  > a
> envoyé ce message:
>> On Thursday,  1 Mar 2018 at 16:29, Joseph Vidal-Rosset wrote:
>>> The first option would be the best for me: because my use of org-mode is
>>> mainly for my work and I am always pasting this link in new org file. It
>>> is boring. If you could me help to define such a hook, I will be again
>>> indebted to you. But please do it only if it is not time consuming for
>>> you.
>> 
>> I use autoinsert to automatically insert contents into new files.  Look
>> at autoinsert.el in your emacs distribution.  I do the following:
>> 
>>  (require 'autoinsert)
>>  (push '(org-mode . "/SOMEPATH/orgskeleton.org") auto-insert-alist)
>>  (add-hook 'find-file-hook 'auto-insert)
>> 
>> where orgskeleton.org has the initial contents I want inserted into any
>> new org file.  These include settings and some default headlines in my
>> case.
> 
> Many thanks Eric, it is very kind of you to help me so much.
> 
> autoinsert works well  for new org files,  it is a first  good point for
> me. I receive this message: Perform org-mode auto-insertion? (y or n)
> and after replying "y" I get my org file with the bibliography link.
> 
> Unfortunately, it does not work in Gnus with the command M-x org-mode on
> a reply to a message, and I do not understand why.
> 
> Regards, and thanks again !
> 
> -- 
> Joseph Vidal-Rosset



Re: [O] Fwd: how do you compose mails in Gnus with org-mode

2018-03-01 Thread Joseph Vidal-Rosset
Le jeu.  01 mars 2018 à  04:59:27 , Eric S  Fraga  a
envoyé ce message:
> On Thursday,  1 Mar 2018 at 16:29, Joseph Vidal-Rosset wrote:
>> The first option would be the best for me: because my use of org-mode is
>> mainly for my work and I am always pasting this link in new org file. It
>> is boring. If you could me help to define such a hook, I will be again
>> indebted to you. But please do it only if it is not time consuming for
>> you.
>
> I use autoinsert to automatically insert contents into new files.  Look
> at autoinsert.el in your emacs distribution.  I do the following:
>
>   (require 'autoinsert)
>   (push '(org-mode . "/SOMEPATH/orgskeleton.org") auto-insert-alist)
>   (add-hook 'find-file-hook 'auto-insert)
>
> where orgskeleton.org has the initial contents I want inserted into any
> new org file.  These include settings and some default headlines in my
> case.

Many thanks Eric, it is very kind of you to help me so much.

autoinsert works well  for new org files,  it is a first  good point for
me. I receive this message: Perform org-mode auto-insertion? (y or n)
and after replying "y" I get my org file with the bibliography link.

Unfortunately, it does not work in Gnus with the command M-x org-mode on
a reply to a message, and I do not understand why.

Regards, and thanks again !

-- 
Joseph Vidal-Rosset



Re: [O] Fwd: how do you compose mails in Gnus with org-mode

2018-03-01 Thread Eric S Fraga
On Thursday,  1 Mar 2018 at 16:29, Joseph Vidal-Rosset wrote:
> The first option would be the best for me: because my use of org-mode is
> mainly for my work and I am always pasting this link in new org file. It
> is boring. If you could me help to define such a hook, I will be again
> indebted to you. But please do it only if it is not time consuming for
> you.

I use autoinsert to automatically insert contents into new files.  Look
at autoinsert.el in your emacs distribution.  I do the following:

  (require 'autoinsert)
  (push '(org-mode . "/SOMEPATH/orgskeleton.org") auto-insert-alist)
  (add-hook 'find-file-hook 'auto-insert)

where orgskeleton.org has the initial contents I want inserted into any
new org file.  These include settings and some default headlines in my
case.

> htmlize works again now in my setup. Strangely I saw that I had to
> install jupyter…

Very strange.  I do not have jupyter installed, as far as I know.

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.1.7-466-ga16590


signature.asc
Description: PGP signature


Re: [O] Fwd: how do you compose mails in Gnus with org-mode

2018-03-01 Thread Joseph Vidal-Rosset
Le jeu.  01 mars 2018 à  03:10:48 , Eric S  Fraga  a
envoyé ce message:

> I am not sure I understand what you wish to do.  If it is to always add
> that line to the message you are composing when you switch to org-mode,
> the natural way would be through a hook but that hook would apply to any
> other org files as well.  Alternatively, you could use the signature
> methods in gnus?

The first option would be the best for me: because my use of org-mode is
mainly for my work and I am always pasting this link in new org file. It
is boring. If you  could me help to define such a hook,  I will be again
indebted to you. But  please do it only if it is  not time consuming for
you. 

> In any case, I'm not sure what you would gain by adding that link to an
> email as htmlize will not do anything reasonable with it?

htmlize works  again now  in my  setup. Strangely  I saw  that I  had to
install jupyter...

Best wishes,

Jo. 


Re: [O] Fwd: how do you compose mails in Gnus with org-mode

2018-03-01 Thread Eric S Fraga
On Thursday,  1 Mar 2018 at 15:40, Joseph Vidal-Rosset wrote:

[...]

> Many thanks Eric! I suspected that there should be a simple solution,
> but I did not expected that it was so much simple!
>
> I am applying what you say in replying to you. And it works perfectly!

Excellent.  Glad I could help.

> I am going to define two keybindings for this and I would be happy if
> you could suggest to me how adding automatically this link
>
> [[bibliography:/home/joseph/MEGA/org/reforg.bib]]
>
> with the command M-x org-mode RET .

I am not sure I understand what you wish to do.  If it is to always add
that line to the message you are composing when you switch to org-mode,
the natural way would be through a hook but that hook would apply to any
other org files as well.  Alternatively, you could use the signature
methods in gnus?

In any case, I'm not sure what you would gain by adding that link to an
email as htmlize will not do anything reasonable with it?

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.1.7-466-ga16590


signature.asc
Description: PGP signature


[O] Fwd: how do you compose mails in Gnus with org-mode

2018-03-01 Thread Joseph Vidal-Rosset
Le jeu.  01 mars 2018 à  02:10:15 , Eric S  Fraga  a
envoyé ce message:
> On Thursday,  1 Mar 2018 at 14:37, Joseph Vidal-Rosset wrote:
>> Supposing that I want to reply
>> to an email, I  would be glad to write my reply in  a org file and, once
>> finished this reply,  going back to gnus to be  able to org-mime-htmlize
>> it and send it.
>> At the moment the only solution that I  have is to quit gnus in order to
>> make an org file that I copy and paste in the reply.
>
> You don't have to quit gnus or even switch to another
> buffer/file.  Simply change the mode to org (M-x org-mode RET), compose
> your email, switch back to message mode (M-x message-mode RET), htmlize
> the email and send it.

Many thanks Eric! I suspected that  there should be a simple solution,
but I did not expected that it was so much simple!

I am applying what you say in replying to you. And it works perfectly!

I am going  to define two keybindings  for this and I would  be happy if
you could suggest to me how adding automatically this link

[[bibliography:/home/joseph/MEGA/org/reforg.bib]]

with the command M-x org-mode RET . But if you need time for this last
point, forget it, you helped me a lot already .

Thanks again !

Jo.

PS: After  an upgrade, my "org-mime-htmlize"  does not work any  more at
the moment, but that is another topic.