From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aaron Ecay Subject: Re: [POLL] Should Org tempo be enabled by default? (expand templates thru e.g. " References: <87lgd671k7.fsf@bzg.fr> <87o9i2p9qq.fsf@nicolasgoaziou.fr> <87k1sq6znz.fsf@bzg.fr> <871seyp6fr.fsf@nicolasgoaziou.fr> <874lju6tap.fsf@bzg.fr> <87bme1y7ft.fsf@gmail.com> <87h8nrbclk.fsf@gmail.com> <87lgd2whh9.fsf@gmx.us> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41215) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fDvIm-0005Os-Sd for emacs-orgmode@gnu.org; Wed, 02 May 2018 13:12:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fDvIj-0005CB-Kn for emacs-orgmode@gnu.org; Wed, 02 May 2018 13:12:24 -0400 Received: from mail-wr0-x236.google.com ([2a00:1450:400c:c0c::236]:46466) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fDvIj-0005Bx-9K for emacs-orgmode@gnu.org; Wed, 02 May 2018 13:12:21 -0400 Received: by mail-wr0-x236.google.com with SMTP id o2-v6so11913696wrj.13 for ; Wed, 02 May 2018 10:12:20 -0700 (PDT) In-Reply-To: <87lgd2whh9.fsf@gmx.us> 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: Rasmus Pank Roulund Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Rasmus, 2018ko maiatzak 2an, Rasmus Pank Roulund-ek idatzi zuen: >> Finally, irrespective of which options are chosen, I think that org-tempo >> would be better implemented in terms of a minor mode. This would allow >> it to be autoloaded, turned on/off for different buffer(s) in an emacs >> session, and avoid duplicating the logic for activating global minor >> modes. Patch attached. >=20 > I agree. OK, that=CA=BCs good to know. I=CA=BCve held off on any pushing of the pat= ch to master until everything is worked out. In the meantime, I=CA=BCve put it in a branch =E2=80=9Corg-tempo=E2=80=9D. I also added a second commit to that branch which implements my vision of the upgrade path (deprecation warnings, etc.) For convenience, that patch is also attached to this email. One remaining decision to make is: what is the future of org-tempo? I am sympathetic to the idea that the best place for it eventually would be org-contrib or GNU ELPA, and not org core. If that is decided now, then we can include that information in the upgrade message (i.e. that users who opt in to org-tempo will eventually have to install it specifically). --=20 Aaron Ecay --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0002-Add-compatibility-code-to-org-tempo.patch >From 414503d59b2129c24e95e1e57b54d5662a17308b Mon Sep 17 00:00:00 2001 From: Aaron Ecay Date: Wed, 2 May 2018 17:48:18 +0100 Subject: [PATCH 2/2] Add compatibility code to org-tempo This will warn users of +Alternatively, you may wish to use the new template expansion +facility `org-insert-structure-template', which is bound to +\\[org-insert-structure-template] in org-mode buffers."))))) + + + (provide 'org-tempo) ;;; org-tempo.el ends here diff --git a/lisp/org.el b/lisp/org.el index 0b8e62357..c67c8d2c5 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -23582,6 +23582,12 @@ when non-nil, is a regexp matching keywords names." (lambda () (add-hook 'change-major-mode-hook 'org-show-all 'append 'local))) +;; For compatibility; remove in Org 10 +(require 'org-tempo) +(defvar org-tempo--user-activated) +(let (org-tempo--user-activated) + (org-tempo-global-mode 1)) + (provide 'org) (run-hooks 'org-load-hook) -- 2.17.0 --=-=-=--