* is it bad to have both org and org-plus-contrib installed?
@ 2017-01-24 8:53 Alan Schmitt
2017-01-24 12:14 ` Kaushal Modi
0 siblings, 1 reply; 6+ messages in thread
From: Alan Schmitt @ 2017-01-24 8:53 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 565 bytes --]
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₂, Mauna Loa Obs. 2016-12: 404.48, 2015-12: 401.85
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 454 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: is it bad to have both org and org-plus-contrib installed?
2017-01-24 8:53 is it bad to have both org and org-plus-contrib installed? Alan Schmitt
@ 2017-01-24 12:14 ` Kaushal Modi
2017-01-24 14:19 ` Alan Schmitt
0 siblings, 1 reply; 6+ messages in thread
From: Kaushal Modi @ 2017-01-24 12:14 UTC (permalink / raw)
To: Alan Schmitt, emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 2124 bytes --]
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-installed
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 <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₂, Mauna Loa Obs. 2016-12: 404.48, 2015-12: 401.85
>
--
Kaushal Modi
[-- Attachment #2: Type: text/html, Size: 3151 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: is it bad to have both org and org-plus-contrib installed?
2017-01-24 12:14 ` Kaushal Modi
@ 2017-01-24 14:19 ` Alan Schmitt
2017-01-24 16:28 ` Thomas S. Dye
0 siblings, 1 reply; 6+ messages in thread
From: Alan Schmitt @ 2017-01-24 14:19 UTC (permalink / raw)
To: Kaushal Modi; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1874 bytes --]
On 2017-01-24 12:14, Kaushal Modi <kaushal.modi@gmail.com> writes:
> 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.
Unfortunately I cannot deleting it without deleting all the packages
that depend on it :(
> 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-installed
> 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)
Thank you for the suggestion, but I use Spacemacs, which in turn uses
paradox.
Why couldn't there be an org-contrib package, depending on org? So that
way org would not be duplicated in two packages.
Thanks again,
Alan
--
OpenPGP Key ID : 040D0A3B4ED2E5C7
Monthly Athmospheric CO₂, Mauna Loa Obs. 2016-12: 404.48, 2015-12: 401.85
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 454 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: is it bad to have both org and org-plus-contrib installed?
2017-01-24 14:19 ` Alan Schmitt
@ 2017-01-24 16:28 ` Thomas S. Dye
2017-04-11 22:38 ` Kaushal Modi
0 siblings, 1 reply; 6+ messages in thread
From: Thomas S. Dye @ 2017-01-24 16:28 UTC (permalink / raw)
To: Alan Schmitt; +Cc: emacs-orgmode, Kaushal Modi
Alan Schmitt writes:
> Thank you for the suggestion, but I use Spacemacs, which in turn uses
> paradox.
>
> Why couldn't there be an org-contrib package, depending on org? So that
> way org would not be duplicated in two packages.
I've run into the same problem with Spacemacs and would welcome a
solution.
All the best,
Tom
--
Thomas S. Dye
http://www.tsdye.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: is it bad to have both org and org-plus-contrib installed?
2017-01-24 16:28 ` Thomas S. Dye
@ 2017-04-11 22:38 ` Kaushal Modi
2017-04-11 22:56 ` Cook, Malcolm
0 siblings, 1 reply; 6+ messages in thread
From: Kaushal Modi @ 2017-04-11 22:38 UTC (permalink / raw)
To: Thomas S. Dye, Alan Schmitt; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 2397 bytes --]
Hi all,
I just discovered a bug in this advice that I suggested earlier in this
thread.. I needed to fix the order of packages in the new-ret list that is
returned. The bug was that the order of pkgs in new-ret was flipped
compared to that in orig-ret.. so I needed to flip it back using reverse.
So just for record, here is the fixed function:
;; 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-installed
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)
(push pkg-struct new-ret)))
;; Tue Apr 11 17:48:16 EDT 2017 - kmodi
;; It's *very* critical that the order of packages stays the same in
NEW-RET
;; as in ORIG-RET. The `push' command flips the order, so use `reverse'
;; to flip the order back to the original.
;; Without this step, you will get errors like below when installing
;; packages with dependencies:
;; Debugger entered--Lisp error: (error "Unable to activate package
‘nim-mode’.
;; Required package ‘flycheck-28’ is unavailable")
(setq new-ret (reverse new-ret))
new-ret))
(advice-add 'package-compute-transaction :filter-return
#'modi/package-dependency-check-ignore)
On Tue, Jan 24, 2017 at 11:28 AM Thomas S. Dye <tsd@tsdye.com> wrote:
>
> Alan Schmitt writes:
>
> > Thank you for the suggestion, but I use Spacemacs, which in turn uses
> > paradox.
> >
> > Why couldn't there be an org-contrib package, depending on org? So that
> > way org would not be duplicated in two packages.
>
> I've run into the same problem with Spacemacs and would welcome a
> solution.
>
> All the best,
> Tom
>
> --
> Thomas S. Dye
> http://www.tsdye.com
>
--
Kaushal Modi
[-- Attachment #2: Type: text/html, Size: 4684 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: is it bad to have both org and org-plus-contrib installed?
2017-04-11 22:38 ` Kaushal Modi
@ 2017-04-11 22:56 ` Cook, Malcolm
0 siblings, 0 replies; 6+ messages in thread
From: Cook, Malcolm @ 2017-04-11 22:56 UTC (permalink / raw)
To: 'Kaushal Modi', 'Thomas S. Dye',
'Alan Schmitt'
Cc: 'emacs-orgmode'
[-- Attachment #1: Type: text/plain, Size: 3101 bytes --]
Hi,
Coming late to this fray and responding to original Subject
If you
(require 'use-package)
Then you might find the following to work, as I do:
(use-package org
:ensure org-plus-contrib ; following http://emacs.stackexchange.com/questions/7890/org-plus-contrib-and-org-with-require-or-use-package
;; .. etc
)
YMMV,
Malcolm
From: Emacs-orgmode [mailto:emacs-orgmode-bounces+mec=stowers.org@gnu.org] On Behalf Of Kaushal Modi
Sent: Tuesday, April 11, 2017 5:39 PM
To: Thomas S. Dye <tsd@tsdye.com>; Alan Schmitt <alan.schmitt@polytechnique.org>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: [O] is it bad to have both org and org-plus-contrib installed?
Hi all,
I just discovered a bug in this advice that I suggested earlier in this thread.. I needed to fix the order of packages in the new-ret list that is returned. The bug was that the order of pkgs in new-ret was flipped compared to that in orig-ret.. so I needed to flip it back using reverse.
So just for record, here is the fixed function:
;; 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-installed
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)
(push pkg-struct new-ret)))
;; Tue Apr 11 17:48:16 EDT 2017 - kmodi
;; It's *very* critical that the order of packages stays the same in NEW-RET
;; as in ORIG-RET. The `push' command flips the order, so use `reverse'
;; to flip the order back to the original.
;; Without this step, you will get errors like below when installing
;; packages with dependencies:
;; Debugger entered--Lisp error: (error "Unable to activate package ‘nim-mode’.
;; Required package ‘flycheck-28’ is unavailable")
(setq new-ret (reverse new-ret))
new-ret))
(advice-add 'package-compute-transaction :filter-return #'modi/package-dependency-check-ignore)
On Tue, Jan 24, 2017 at 11:28 AM Thomas S. Dye <tsd@tsdye.com<mailto:tsd@tsdye.com>> wrote:
Alan Schmitt writes:
> Thank you for the suggestion, but I use Spacemacs, which in turn uses
> paradox.
>
> Why couldn't there be an org-contrib package, depending on org? So that
> way org would not be duplicated in two packages.
I've run into the same problem with Spacemacs and would welcome a
solution.
All the best,
Tom
--
Thomas S. Dye
http://www.tsdye.com
--
Kaushal Modi
[-- Attachment #2: Type: text/html, Size: 12567 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-04-11 22:56 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-24 8:53 is it bad to have both org and org-plus-contrib installed? Alan Schmitt
2017-01-24 12:14 ` Kaushal Modi
2017-01-24 14:19 ` Alan Schmitt
2017-01-24 16:28 ` Thomas S. Dye
2017-04-11 22:38 ` Kaushal Modi
2017-04-11 22:56 ` Cook, Malcolm
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).