From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: Fwd: how do you compose mails in Gnus with org-mode Date: Fri, 02 Mar 2018 07:25:00 +0000 Message-ID: <87tvtzaqib.fsf@ucl.ac.uk> References: <87inafvrwi.fsf@gmail.com> <87inafanug.fsf@gmail.com> <87vaef97ze.fsf@gmail.com> <87k1uvq1af.fsf@gmail.com> <87bmg7vmor.fsf@gmail.com> <878tbbohow.fsf@gmail.com> <87h8pzu0z3.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53854) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1erf3z-0001Uf-Ji for emacs-orgmode@gnu.org; Fri, 02 Mar 2018 02:25:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1erf3v-0004V4-J3 for emacs-orgmode@gnu.org; Fri, 02 Mar 2018 02:25:07 -0500 Received: from mail-wr0-x22e.google.com ([2a00:1450:400c:c0c::22e]:38369) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1erf3v-0004Ua-Be for emacs-orgmode@gnu.org; Fri, 02 Mar 2018 02:25:03 -0500 Received: by mail-wr0-x22e.google.com with SMTP id n7so9029141wrn.5 for ; Thu, 01 Mar 2018 23:25:03 -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: Joseph Vidal-Rosset Cc: "Liste-emacs-orgmode@gnu.org" --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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=20 (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=20 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... =2D-=20 Eric S Fraga via Emacs 27.0.50, Org release_9.1.6-191-g90607d --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQSPXCedOQfhSlwpVw3IkZPY//z2fQUCWpj8TAAKCRDIkZPY//z2 fTrPAJ9KhSxDX0Y6S6kyfzYR/jmDiQJMKwCfaCZzigooRU1uwFVZxYbrP+2rRQE= =U3ib -----END PGP SIGNATURE----- --=-=-=--