unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#39020] Lean won't work with the emacs mode
@ 2020-01-07 18:53 Arvid Marx
  2020-01-07 19:11 ` Brett Gilio
  2020-01-07 21:39 ` Maxim Cournoyer
  0 siblings, 2 replies; 5+ messages in thread
From: Arvid Marx @ 2020-01-07 18:53 UTC (permalink / raw)
  To: 39020

The emacs mode for Lean (which doesn't appear to be packaged yet, but
of course works via MELPA etc.) expects some sort of root directory for
Lean, which is not given simply because binaries and other files are
put into separate directories. This of course makes Lean impossible to
use as intended. However, I'm not quite sure how this would be fixed in
practice, as I'm not aware of any suitable directory hierarchy in such
a case.

Any ideas?

--

Arvid

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

* [bug#39020] Lean won't work with the emacs mode
  2020-01-07 18:53 [bug#39020] Lean won't work with the emacs mode Arvid Marx
@ 2020-01-07 19:11 ` Brett Gilio
  2020-01-07 21:39 ` Maxim Cournoyer
  1 sibling, 0 replies; 5+ messages in thread
From: Brett Gilio @ 2020-01-07 19:11 UTC (permalink / raw)
  To: Arvid Marx; +Cc: 39020, bandali

Arvid Marx <arvid.marx@logicandtypes.org> writes:

> The emacs mode for Lean (which doesn't appear to be packaged yet, but
> of course works via MELPA etc.) expects some sort of root directory for
> Lean, which is not given simply because binaries and other files are
> put into separate directories. This of course makes Lean impossible to
> use as intended. However, I'm not quite sure how this would be fixed in
> practice, as I'm not aware of any suitable directory hierarchy in such
> a case.
>
> Any ideas?
>
> --
>
> Arvid

Cc'ing Amin Bandali, who took care of packaging Lean. I am happy to help
too, but I want to see what he says first.

-- 
Brett M. Gilio
GNU Guix, Contributor | GNU Project, Webmaster
[DFC0 C7F7 9EE6 0CA7 AE55 5E19 6722 43C4 A03F 0EEE]
<brettg@gnu.org> <brettg@posteo.net>

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

* [bug#39020] Lean won't work with the emacs mode
  2020-01-07 18:53 [bug#39020] Lean won't work with the emacs mode Arvid Marx
  2020-01-07 19:11 ` Brett Gilio
@ 2020-01-07 21:39 ` Maxim Cournoyer
  2020-01-08 14:18   ` Arvid Marx
  1 sibling, 1 reply; 5+ messages in thread
From: Maxim Cournoyer @ 2020-01-07 21:39 UTC (permalink / raw)
  To: Arvid Marx; +Cc: 39020

Hello Arvid,

Arvid Marx <arvid.marx@logicandtypes.org> writes:

> The emacs mode for Lean (which doesn't appear to be packaged yet, but
> of course works via MELPA etc.) expects some sort of root directory for
> Lean, which is not given simply because binaries and other files are
> put into separate directories. This of course makes Lean impossible to
> use as intended. However, I'm not quite sure how this would be fixed in
> practice, as I'm not aware of any suitable directory hierarchy in such
> a case.
>
> Any ideas?

When writing the package definition for the Emacs Lead mode, the code
could be rewritten to refer to the absolute path of the files/programs
it uses from the Lean project, by patching it with `substitute*' uses,
for example.

If that is not easy to do, another idea would be to create some kind of
overlay directory which would flatly collect all the items needed then
refer to that (the items would be symlinked to their real location).
See the `union-build' procedure of the (guix build union) module of
Guix.

HTH!

Maxim

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

* [bug#39020] Lean won't work with the emacs mode
  2020-01-07 21:39 ` Maxim Cournoyer
@ 2020-01-08 14:18   ` Arvid Marx
  2020-01-13 22:00     ` bug#39020: " Brett Gilio
  0 siblings, 1 reply; 5+ messages in thread
From: Arvid Marx @ 2020-01-08 14:18 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: 39020

Maxim Cournoyer wrote:
> Hello Arvid,
> 
> [...]
> When writing the package definition for the Emacs Lead mode, the code
> could be rewritten to refer to the absolute path of the
> files/programs
> it uses from the Lean project, by patching it with `substitute*'
> uses,
> for example.
> 
> If that is not easy to do, another idea would be to create some kind
> of
> overlay directory which would flatly collect all the items needed
> then
> refer to that (the items would be symlinked to their real location).
> See the `union-build' procedure of the (guix build union) module of
> Guix.
> 
> HTH!
> 
> Maxim

Hello Maxim,

thanks for your response! The second idea is basically what I had in
mind, as the Lean mode seems to depend on an actual file tree. Patching
the emacs mode however looks quite simple, as all one needed to do is
change the definition of lean-get-executable as defined in 
https://raw.githubusercontent.com/leanprover/lean-mode/master/lean-util.el
. I might take a closer look and write a simple patch at some point,
but up to that point, it appears that just using ~/.guix-profile as a
root directory works as well, or at least doesn't raise any errors when
type checking etc.

Again, thanks for feedback!

--

Arvid 

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

* bug#39020: Lean won't work with the emacs mode
  2020-01-08 14:18   ` Arvid Marx
@ 2020-01-13 22:00     ` Brett Gilio
  0 siblings, 0 replies; 5+ messages in thread
From: Brett Gilio @ 2020-01-13 22:00 UTC (permalink / raw)
  To: Arvid Marx; +Cc: 39020-done, Maxim Cournoyer

Arvid Marx <arvid.marx@logicandtypes.org> writes:

> Maxim Cournoyer wrote:
>> Hello Arvid,
>> 
>> [...]
>> When writing the package definition for the Emacs Lead mode, the code
>> could be rewritten to refer to the absolute path of the
>> files/programs
>> it uses from the Lean project, by patching it with `substitute*'
>> uses,
>> for example.
>> 
>> If that is not easy to do, another idea would be to create some kind
>> of
>> overlay directory which would flatly collect all the items needed
>> then
>> refer to that (the items would be symlinked to their real location).
>> See the `union-build' procedure of the (guix build union) module of
>> Guix.
>> 
>> HTH!
>> 
>> Maxim
>
> Hello Maxim,
>
> thanks for your response! The second idea is basically what I had in
> mind, as the Lean mode seems to depend on an actual file tree. Patching
> the emacs mode however looks quite simple, as all one needed to do is
> change the definition of lean-get-executable as defined in 
> https://raw.githubusercontent.com/leanprover/lean-mode/master/lean-util.el
> . I might take a closer look and write a simple patch at some point,
> but up to that point, it appears that just using ~/.guix-profile as a
> root directory works as well, or at least doesn't raise any errors when
> type checking etc.
>
> Again, thanks for feedback!
>
> --
>
> Arvid 
>
>
>
>
>

Closing.

-- 
Brett M. Gilio
GNU Guix, Contributor | GNU Project, Webmaster
[DFC0 C7F7 9EE6 0CA7 AE55 5E19 6722 43C4 A03F 0EEE]
<brettg@gnu.org> <brettg@posteo.net>

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

end of thread, other threads:[~2020-01-13 22:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-07 18:53 [bug#39020] Lean won't work with the emacs mode Arvid Marx
2020-01-07 19:11 ` Brett Gilio
2020-01-07 21:39 ` Maxim Cournoyer
2020-01-08 14:18   ` Arvid Marx
2020-01-13 22:00     ` bug#39020: " Brett Gilio

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.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).