From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Re: is it bad to have both org and org-plus-contrib installed? Date: Tue, 24 Jan 2017 12:14:36 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1145a5baeb7ca80546d60f17 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49593) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cVzzv-0001Kr-Nj for emacs-orgmode@gnu.org; Tue, 24 Jan 2017 07:14:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cVzzu-00042c-7B for emacs-orgmode@gnu.org; Tue, 24 Jan 2017 07:14:51 -0500 Received: from mail-vk0-x234.google.com ([2607:f8b0:400c:c05::234]:33441) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cVzzu-00042M-10 for emacs-orgmode@gnu.org; Tue, 24 Jan 2017 07:14:50 -0500 Received: by mail-vk0-x234.google.com with SMTP id k127so110254850vke.0 for ; Tue, 24 Jan 2017 04:14:48 -0800 (PST) In-Reply-To: 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: Alan Schmitt , emacs-orgmode --001a1145a5baeb7ca80546d60f17 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I don't recall facing the issue like yours when org gets auto-installed as dependency. But I found it annoying to wait for org to get installed as dependency magically when some package having that as dependency got updated. So I would delete it manually, some package would get updated, and it would get installed again. So eventually I came up with this and this has worked fine: ;; http://emacs.stackexchange.com/a/26513/115 (defun modi/package-dependency-check-ignore (orig-ret) "Remove the `black listed packages' from ORIG-RET. Packages listed in the let-bound `pkg-black-list' will not be auto-installe= d even if they are found as dependencies. It is known that this advice is not effective when installed packages asynchronously using `paradox'. Below is effective on synchronous package installations." (let ((pkg-black-list '(org)) new-ret pkg-name) (dolist (pkg-struct orig-ret) (setq pkg-name (package-desc-name pkg-struct)) (if (member pkg-name pkg-black-list) (message (concat "Package `%s' will not be installed. " "See `modi/package-dependency-check-ignore'.") pkg-name) ;; (message "Package to be installed: %s" pkg-name) (push pkg-struct new-ret))) new-ret)) (advice-add 'package-compute-transaction :filter-return #'modi/package-dependency-check-ignore) On Tue, Jan 24, 2017, 3:55 AM Alan Schmitt wrote: > Hello, > > I recently had one of those transient problems that go away when > reinstalling org (the one where no code block can be executed). As I was > doing so, I noticed that I had both org and org-plus-contrib installed, > visibly because some packages depend on org. > > Is this a bad thing? And is there a way to make sure package > dependencies pick up org-plus-contrib when it is installed, and do not > install org as well? > > Thanks, > > Alan > > -- > OpenPGP Key ID : 040D0A3B4ED2E5C7 > Monthly Athmospheric CO=E2=82=82, Mauna Loa Obs. 2016-12: 404.48, 2015-12= : 401.85 > --=20 Kaushal Modi --001a1145a5baeb7ca80546d60f17 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

I don't recall facing the issue like yours when org gets= auto-installed as dependency. But I found it annoying to wait for org to g= et installed as dependency magically when some package having that as depen= dency got updated. So I would delete it manually, some package would get up= dated, and it would get installed again.

So eventually I came up with this and this has worked fine:<= /p>

;; ht= tp://emacs.stackexchange.com/a/26513/115
(defun modi/package-dependency-check-ignore (orig-ret)
=C2=A0 "Remove the `black listed packages' from ORIG-RET.
Packages listed in the let-bound `pkg-black-list' will not be auto-inst= alled
even if they are found as dependencies.
It is known that this advice is not effective when installed packages
asynchronously using `paradox'. Below is effective on synchronous
package installations."
=C2=A0 (let ((pkg-black-list '(org))
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 new-ret
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 pkg-name)
=C2=A0=C2=A0=C2=A0 (dolist (pkg-struct orig-ret)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (setq pkg-name (package-desc-name pkg-struct= ))
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (if (member pkg-name pkg-black-list)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (message (concat &qu= ot;Package `%s' will not be installed. "
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 "See `modi/package-dependency-check-ignore'.")
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 pkg-name)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ;; (message "Package to be = installed: %s" pkg-name)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (push pkg-struct new-ret)))
=C2=A0=C2=A0=C2=A0 new-ret))
(advice-add 'package-compute-transaction :filter-return #'modi/pack= age-dependency-check-ignore)


On Tue, Jan 24, 2017, 3:55 = AM Alan Schmitt <alan.= schmitt@polytechnique.org> wrote:
Hello,

I recently had one of those transient problems that go away when
reinstalling org (the one where no code block can be executed). As I was doing so, I noticed that I had both org and org-plus-contrib installed,
visibly because some packages depend on org.

Is this a bad thing? And is there a way to make sure package
dependencies pick up org-plus-contrib when it is installed, and do not
install org as well?

Thanks,

Alan

--
OpenPGP Key ID : 040D0A3B4ED2E5C7
Monthly Athmospheric CO=E2=82=82, Mauna Loa Obs. 2016-12: 404.48, 2015-12: = 401.85
--

Kaushal Modi

--001a1145a5baeb7ca80546d60f17--