all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Mark package as installed when use git
@ 2017-06-12 13:11 Martin
  2017-06-12 16:59 ` John Ankarström
  0 siblings, 1 reply; 6+ messages in thread
From: Martin @ 2017-06-12 13:11 UTC (permalink / raw)
  To: help-gnu-emacs

Hi there,

I use org-mode from github with in my init.el:

(add-to-list 'load-path (concat my-user-emacs-directory "contrib/org-mode/lisp"))
(add-to-list 'load-path (concat my-user-emacs-directory "contrib/org-mode/contrib/lisp"))
(require 'org)

And later I like to use pandoc for export:

(use-package orgbox :ensure t)

So now this use-package will install org also from melpa.  Is there a
way to avoid that?  So like tell package.el that org is allready
installed, don't check that dependency?

Thanks,
Martin

-- 
Thanks for your help!



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Mark package as installed when use git
  2017-06-12 13:11 Mark package as installed when use git Martin
@ 2017-06-12 16:59 ` John Ankarström
  2017-06-12 17:03   ` John Ankarström
  0 siblings, 1 reply; 6+ messages in thread
From: John Ankarström @ 2017-06-12 16:59 UTC (permalink / raw)
  To: help-gnu-emacs

Martin <mylists@kaffanke.at> writes:

> Is there a way to avoid that? So like tell package.el that org
> is allready installed, don't check that dependency?

Quoting from the `use-package' README:

> If your package needs a directory added to the load-path in
> order to load, use :load-path.

So, the following should suffice:

> (add-to-list 'load-path (concat my-user-emacs-directory
> "contrib/org-mode/lisp"))

--8<---------------cut here---------------start------------->8---
(use-package org
  :load-path "contrib/org-mode/lisp")
--8<---------------cut here---------------end--------------->8---

Repeat that for `org-contrib' and I think it should work.

- John



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Mark package as installed when use git
  2017-06-12 16:59 ` John Ankarström
@ 2017-06-12 17:03   ` John Ankarström
  2017-06-12 18:24     ` Martin
  0 siblings, 1 reply; 6+ messages in thread
From: John Ankarström @ 2017-06-12 17:03 UTC (permalink / raw)
  To: help-gnu-emacs


Quick correction:

john@ankarstrom.se (John Ankarström) writes:

> So, the following should suffice:
>
>> (add-to-list 'load-path (concat my-user-emacs-directory
>> "contrib/org-mode/lisp"))
>
> (use-package org
>   :load-path "contrib/org-mode/lisp")

After sending the message I realize I might have been
unclear: I didn't mean to include the `add-to-list' code, which I
accidentally quoted from your message, Martin.

Sorry about that! If you use `use-package', you shouldn't need to
manually edit `load-path'.

- John



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Mark package as installed when use git
  2017-06-12 17:03   ` John Ankarström
@ 2017-06-12 18:24     ` Martin
  2017-06-13 10:14       ` John Ankarström
  0 siblings, 1 reply; 6+ messages in thread
From: Martin @ 2017-06-12 18:24 UTC (permalink / raw)
  To: John Ankarström; +Cc: help-gnu-emacs

Hi John,
John Ankarström writes:

> Quick correction:
>
> john@ankarstrom.se (John Ankarström) writes:
>
>> So, the following should suffice:
>>
>>> (add-to-list 'load-path (concat my-user-emacs-directory
>>> "contrib/org-mode/lisp"))
>>
>> (use-package org
>>   :load-path "contrib/org-mode/lisp")
>
> After sending the message I realize I might have been
> unclear: I didn't mean to include the `add-to-list' code, which I
> accidentally quoted from your message, Martin.
>
> Sorry about that! If you use `use-package', you shouldn't need to
> manually edit `load-path'.

Now I'm a bit unclear. :(

I changed my config from init.el with some load-path for mu4e and
org-mode to this:

https://github.com/novoid/dot-emacs

Short: The org mode is loaded before the use-package in this setting, so
I don't really know where to change or put your code in.

Thanks,
- Martin

-- 
Thanks for your help!



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Mark package as installed when use git
  2017-06-12 18:24     ` Martin
@ 2017-06-13 10:14       ` John Ankarström
  2017-06-13 11:20         ` Martin
  0 siblings, 1 reply; 6+ messages in thread
From: John Ankarström @ 2017-06-13 10:14 UTC (permalink / raw)
  To: help-gnu-emacs

Martin <mylists@kaffanke.at> writes:

> Now I'm a bit unclear. :(
>
> I changed my config from init.el with some load-path for mu4e and
> org-mode to this:
>
> https://github.com/novoid/dot-emacs

Hi again,

My point was that, if you use `use-package', you should never
need to manually add anything to the `load-path' variable using
`add-to-list'. The `use-package' keyword :load-path handles this
for you.

I looked at your config.org; I'm not sure what `my-load-local-el'
does, but I'm sure you could replace it with `use-package'.

If you for any reason don't want to configure Org-mode via the
`use-package' function, you should replace `:ensure t' with
`:ensure nil' on any package that has Org-mode as a dependency;
setting :ensure to t means that `use-package' will automatically
install the package (as well as its dependencies).

Overall, though, you should either use `use-package' fully and
avoid manually loading packages outside of `use-package', or
abandon `use-package' entirely. In my opinion :-)

If anything's unclear, feel free to ask again.

- John



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Mark package as installed when use git
  2017-06-13 10:14       ` John Ankarström
@ 2017-06-13 11:20         ` Martin
  0 siblings, 0 replies; 6+ messages in thread
From: Martin @ 2017-06-13 11:20 UTC (permalink / raw)
  To: John Ankarström; +Cc: help-gnu-emacs

Ok, thats clear now.

Thanks,
Martin

John Ankarström writes:

> Martin <mylists@kaffanke.at> writes:
>
>> Now I'm a bit unclear. :(
>>
>> I changed my config from init.el with some load-path for mu4e and
>> org-mode to this:
>>
>> https://github.com/novoid/dot-emacs
>
> Hi again,
>
> My point was that, if you use `use-package', you should never
> need to manually add anything to the `load-path' variable using
> `add-to-list'. The `use-package' keyword :load-path handles this
> for you.
>
> I looked at your config.org; I'm not sure what `my-load-local-el'
> does, but I'm sure you could replace it with `use-package'.
>
> If you for any reason don't want to configure Org-mode via the
> `use-package' function, you should replace `:ensure t' with
> `:ensure nil' on any package that has Org-mode as a dependency;
> setting :ensure to t means that `use-package' will automatically
> install the package (as well as its dependencies).
>
> Overall, though, you should either use `use-package' fully and
> avoid manually loading packages outside of `use-package', or
> abandon `use-package' entirely. In my opinion :-)
>
> If anything's unclear, feel free to ask again.
>
> - John


-- 
Thanks for your help!



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-06-13 11:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-12 13:11 Mark package as installed when use git Martin
2017-06-12 16:59 ` John Ankarström
2017-06-12 17:03   ` John Ankarström
2017-06-12 18:24     ` Martin
2017-06-13 10:14       ` John Ankarström
2017-06-13 11:20         ` Martin

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.