Emacs (was stack and the Atom editor)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

Emacs (was stack and the Atom editor)

Rustom Mody
On Sun, Apr 10, 2016 at 7:29 AM, Thomas Koster <[hidden email]> wrote:

If I can't make Atom work for me, I will drop it just as fast as I
dropped Emacs. Spacemacs was suggested to me off-list; if it addresses
my complaints about Emacs, I might give it a chance. But Atom is the
topic of this thread, so lest this thread descend into a text editor
flame war, I suggest we stop talking about Emacs (or Vim, or Eclipse,
or anything else).


[Note the changed subject line :-) ]

Ive been having a great deal of confusion/trouble with emacs haskell-mode of late.
No this is not a gripe about haskell-mode
Just that I find myself confused over
  1. The old comint interface and new λ one -- when does which kick in
  2. Basic setups -- is it called haskell-mode/haskell-emacs or what?
  3. I dont quite know when things stopped working/being comfortable/familiar but I remember it as having nothing to do with haskell -- updating org mode or some such

Just that I am supposed to be (at least out here!!) an emacs and haskell expert and while showing others how to get started I am often finding my own setups embarrassingly broken

Any tips for an old emacs-geezer?

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Emacs (was stack and the Atom editor)

Ivan Lazar Miljenovic
On 10 April 2016 at 17:36, Rustom Mody <[hidden email]> wrote:

> On Sun, Apr 10, 2016 at 7:29 AM, Thomas Koster <[hidden email]> wrote:
>>
>>
>> If I can't make Atom work for me, I will drop it just as fast as I
>> dropped Emacs. Spacemacs was suggested to me off-list; if it addresses
>> my complaints about Emacs, I might give it a chance. But Atom is the
>> topic of this thread, so lest this thread descend into a text editor
>> flame war, I suggest we stop talking about Emacs (or Vim, or Eclipse,
>> or anything else).
>>
>
> [Note the changed subject line :-) ]
>
> Ive been having a great deal of confusion/trouble with emacs haskell-mode of
> late.
> No this is not a gripe about haskell-mode
> Just that I find myself confused over
>
> The old comint interface and new λ one -- when does which kick in

I don't think the old comint interface is used at all any more (but
may still be present for backwards-compatibility).

> Basic setups -- is it called haskell-mode/haskell-emacs or what?

haskell-emacs was Chris Done's first attempt at writing a new Haskell
mdoe for Emacs before he merged it into haskell-mode proper; so you
probably don't want to use haskell-emacs any more (it's rather old and
quite probably bitrotted).

> I dont quite know when things stopped working/being comfortable/familiar but
> I remember it as having nothing to do with haskell -- updating org mode or
> some such

? org-mode can be a pain to upgrade due to compilations trying to use
already loaded/present versions, but installing haskell-mode via
package.el is rather easy.

> Just that I am supposed to be (at least out here!!) an emacs and haskell
> expert and while showing others how to get started I am often finding my own
> setups embarrassingly broken
>
> Any tips for an old emacs-geezer?

Chris Done has a sample config:
https://github.com/chrisdone/emacs-haskell-config/

--
Ivan Lazar Miljenovic
[hidden email]
http://IvanMiljenovic.wordpress.com
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Emacs (was stack and the Atom editor)

Rustom Mody
On Sun, Apr 10, 2016 at 2:13 PM, Ivan Lazar Miljenovic <[hidden email]> wrote:
On 10 April 2016 at 17:36, Rustom Mody <[hidden email]> wrote:

> Basic setups -- is it called haskell-mode/haskell-emacs or what?

haskell-emacs was Chris Done's first attempt at writing a new Haskell
mdoe for Emacs before he merged it into haskell-mode proper; so you
probably don't want to use haskell-emacs any more (it's rather old and
quite probably bitrotted).

Just tried the "Quick Install" instructions at https://github.com/haskell/haskell-mode
As best as I can see there is no haskell-mode after package-refresh contents
There is only these when I try to do package-install [completions buffer]

Click on a completion to select it.
In this buffer, type RET to select the completion near point.

Possible completions are:
haskell-emacs     haskell-emacs-base
haskell-emacs-text     haskell-snippets
haskell-tab-indent

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Emacs (was stack and the Atom editor)

Rustom Mody


On Sun, Apr 10, 2016 at 2:55 PM, Rustom Mody <[hidden email]> wrote:
On Sun, Apr 10, 2016 at 2:13 PM, Ivan Lazar Miljenovic <[hidden email]> wrote:
On 10 April 2016 at 17:36, Rustom Mody <[hidden email]> wrote:

> Basic setups -- is it called haskell-mode/haskell-emacs or what?

haskell-emacs was Chris Done's first attempt at writing a new Haskell
mdoe for Emacs before he merged it into haskell-mode proper; so you
probably don't want to use haskell-emacs any more (it's rather old and
quite probably bitrotted).

Just tried the "Quick Install" instructions at https://github.com/haskell/haskell-mode
As best as I can see there is no haskell-mode after package-refresh contents
There is only these when I try to do package-install [completions buffer]

Click on a completion to select it.
In this buffer, type RET to select the completion near point.

Possible completions are:
haskell-emacs     haskell-emacs-base
haskell-emacs-text     haskell-snippets
haskell-tab-indent


Update:
While the install via emacs package system doesn't work, install via git does

<ot remark>
Emacs package system is about as broken as a linux kernel would be if it tried to do the job of grub
</ot remark>

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Emacs (was stack and the Atom editor)

Ivan Lazar Miljenovic
On 10 April 2016 at 20:35, Rustom Mody <[hidden email]> wrote:

>
>
> On Sun, Apr 10, 2016 at 2:55 PM, Rustom Mody <[hidden email]> wrote:
>>
>> On Sun, Apr 10, 2016 at 2:13 PM, Ivan Lazar Miljenovic
>> <[hidden email]> wrote:
>>>
>>> On 10 April 2016 at 17:36, Rustom Mody <[hidden email]> wrote:
>>>
>>> > Basic setups -- is it called haskell-mode/haskell-emacs or what?
>>>
>>> haskell-emacs was Chris Done's first attempt at writing a new Haskell
>>> mdoe for Emacs before he merged it into haskell-mode proper; so you
>>> probably don't want to use haskell-emacs any more (it's rather old and
>>> quite probably bitrotted).
>>
>>
>> Just tried the "Quick Install" instructions at
>> https://github.com/haskell/haskell-mode
>> As best as I can see there is no haskell-mode after package-refresh
>> contents
>> There is only these when I try to do package-install [completions buffer]
>>
>> Click on a completion to select it.
>> In this buffer, type RET to select the completion near point.
>>
>> Possible completions are:
>> haskell-emacs     haskell-emacs-base
>> haskell-emacs-text     haskell-snippets
>> haskell-tab-indent
>
>
>
> Update:
> While the install via emacs package system doesn't work, install via git
> does
>
> <ot remark>
> Emacs package system is about as broken as a linux kernel would be if it
> tried to do the job of grub
> </ot remark>
>

Can you double check whether melpa-stable was indeed added to
package-archives?  (That said, I use melpa itself rather than
melpa-stable to get regular snapshots rather than specific releases.)

Another alternative is to use el-get to fetch it from git rather than
package.el.

> _______________________________________________
> Haskell-Cafe mailing list
> [hidden email]
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
>



--
Ivan Lazar Miljenovic
[hidden email]
http://IvanMiljenovic.wordpress.com
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Emacs (was stack and the Atom editor)

Rustom Mody
On Sun, Apr 10, 2016 at 6:32 PM, Ivan Lazar Miljenovic <[hidden email]> wrote:
On 10 April 2016 at 20:35, Rustom Mody <[hidden email]> wrote:
>
>
> On Sun, Apr 10, 2016 at 2:55 PM, Rustom Mody <[hidden email]> wrote:
>>
>> On Sun, Apr 10, 2016 at 2:13 PM, Ivan Lazar Miljenovic
>> <[hidden email]> wrote:
>>>
>>> On 10 April 2016 at 17:36, Rustom Mody <[hidden email]> wrote:
>>>
>>> > Basic setups -- is it called haskell-mode/haskell-emacs or what?
>>>
>>> haskell-emacs was Chris Done's first attempt at writing a new Haskell
>>> mdoe for Emacs before he merged it into haskell-mode proper; so you
>>> probably don't want to use haskell-emacs any more (it's rather old and
>>> quite probably bitrotted).
>>
>>
>> Just tried the "Quick Install" instructions at
>> https://github.com/haskell/haskell-mode
>> As best as I can see there is no haskell-mode after package-refresh
>> contents
>> There is only these when I try to do package-install [completions buffer]
>>
>> Click on a completion to select it.
>> In this buffer, type RET to select the completion near point.
>>
>> Possible completions are:
>> haskell-emacs     haskell-emacs-base
>> haskell-emacs-text     haskell-snippets
>> haskell-tab-indent
>
>
>
> Update:
> While the install via emacs package system doesn't work, install via git
> does
>
> <ot remark>
> Emacs package system is about as broken as a linux kernel would be if it
> tried to do the job of grub
> </ot remark>
>

Can you double check whether melpa-stable was indeed added to
package-archives?  (That said, I use melpa itself rather than
melpa-stable to get regular snapshots rather than specific releases.)

Another alternative is to use el-get to fetch it from git rather than
package.el.


Changing the melpa url from http to https seems to make it work -- thanks!
[Instructions here https://github.com/haskell/haskell-mode give http]
I'll need to check more carefully

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Emacs (was stack and the Atom editor)

Gracjan Polak
Rustom Mody <rustompmody <at> gmail.com> writes:
> Changing the melpa url from http to https seems to make it work -- thanks!
>
> [Instructions here https://github.com/haskell/haskell-mode give http]
>
> I'll need to check more carefully

Plain http works for me.

--
Gracjan


_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Emacs (was stack and the Atom editor)

Gracjan Polak
In reply to this post by Rustom Mody
Rustom Mody <rustompmody <at> gmail.com> writes:

> The old comint interface and new λ one -- when does which kick in

There are quite some people out there using inf-haskell (comint) and larger
number of interactive-haskell-mode users.

Note that haskell-mode project is a bin for many projects that used to be
unrelated, hence there is quite some functionality duplication. We are
working on solving most annoying sources of confusion.

> Basic setups -- is it called haskell-mode/haskell-emacs or what?

haskell-mode or even Haskell Mode these days.

haskell-emacs is something completly unrelated (write Emacs extensions in
Haskell).

> I dont quite know when things stopped working/being comfortable/familiar
but I remember it as having nothing to do with haskell -- updating org mode
or some such

I never had issues with org-mode so can't help you there.

>
> Just that I am supposed to be (at least out here!!) an emacs and haskell
expert and while showing others how to get started I am often finding my own
setups embarrassingly brokenAny tips for an old emacs-geezer?

What do you mean? You install and it works. Even configuration step is
optional as we try to provide sane defaults and sane keybindings.

--
Gracjan
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Emacs (was stack and the Atom editor)

Rustom Mody


On Sun, Apr 10, 2016 at 7:33 PM, Gracjan Polak <[hidden email]> wrote:
Rustom Mody <rustompmody <at> gmail.com> writes:

> The old comint interface and new λ one -- when does which kick in

There are quite some people out there using inf-haskell (comint) and larger
number of interactive-haskell-mode users.

1. Start in a foo.hs file
2. Load file
3. I get the lambda interface

Instead
M-x run-haskell
I get old interface


How do I get one uniform interface?

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Emacs (was stack and the Atom editor)

Ivan Lazar Miljenovic
On 11 April 2016 at 15:03, Rustom Mody <[hidden email]> wrote:

>
>
> On Sun, Apr 10, 2016 at 7:33 PM, Gracjan Polak <[hidden email]>
> wrote:
>>
>> Rustom Mody <rustompmody <at> gmail.com> writes:
>>
>> > The old comint interface and new λ one -- when does which kick in
>>
>> There are quite some people out there using inf-haskell (comint) and
>> larger
>> number of interactive-haskell-mode users.
>
>
> 1. Start in a foo.hs file
> 2. Load file
> 3. I get the lambda interface
>
> Instead
> M-x run-haskell
> I get old interface
>
>
> How do I get one uniform interface?

By not using run-haskell?

I load up a file in Emacs.  I use C-c C-l to load the file (which
starts a new project if need be), and C-c C-r to reload it if I've
changed it.

I do have various customisations enabled (e.g. using
structured-haskell-mode) but that's fundamentally how I interact with
a ghci process (though ebal is definitely handing for setting up
sandboxes and installing dependencies).

--
Ivan Lazar Miljenovic
[hidden email]
http://IvanMiljenovic.wordpress.com
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Emacs (was stack and the Atom editor)

Alexey Raga

For easy, quick and working configuration one can use Spacemacs project.
All that is needed is to switch on what they call required 'layers' and off we go.
The Haskell layer is quite good, it will automatically install haskell-mode and other goodness.


On Mon, 11 Apr 2016 21:50 Ivan Lazar Miljenovic <[hidden email]> wrote:
On 11 April 2016 at 15:03, Rustom Mody <[hidden email]> wrote:
>
>
> On Sun, Apr 10, 2016 at 7:33 PM, Gracjan Polak <[hidden email]>
> wrote:
>>
>> Rustom Mody <rustompmody <at> gmail.com> writes:
>>
>> > The old comint interface and new λ one -- when does which kick in
>>
>> There are quite some people out there using inf-haskell (comint) and
>> larger
>> number of interactive-haskell-mode users.
>
>
> 1. Start in a foo.hs file
> 2. Load file
> 3. I get the lambda interface
>
> Instead
> M-x run-haskell
> I get old interface
>
>
> How do I get one uniform interface?

By not using run-haskell?

I load up a file in Emacs.  I use C-c C-l to load the file (which
starts a new project if need be), and C-c C-r to reload it if I've
changed it.

I do have various customisations enabled (e.g. using
structured-haskell-mode) but that's fundamentally how I interact with
a ghci process (though ebal is definitely handing for setting up
sandboxes and installing dependencies).

--
Ivan Lazar Miljenovic
[hidden email]
http://IvanMiljenovic.wordpress.com
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Emacs (was stack and the Atom editor)

Rustom Mody
In reply to this post by Ivan Lazar Miljenovic


On Mon, Apr 11, 2016 at 5:19 PM, Ivan Lazar Miljenovic <[hidden email]> wrote:
On 11 April 2016 at 15:03, Rustom Mody <[hidden email]> wrote:
>
>
> On Sun, Apr 10, 2016 at 7:33 PM, Gracjan Polak <[hidden email]>
> wrote:
>>
>> Rustom Mody <rustompmody <at> gmail.com> writes:
>>
>> > The old comint interface and new λ one -- when does which kick in
>>
>> There are quite some people out there using inf-haskell (comint) and
>> larger
>> number of interactive-haskell-mode users.
>
>
> 1. Start in a foo.hs file
> 2. Load file
> 3. I get the lambda interface
>
> Instead
> M-x run-haskell
> I get old interface
>
>
> How do I get one uniform interface?

By not using run-haskell?

:-)

I figured that much out; viz that even if I dont need a file immediately I need to create a dummy hs file and load it.

 
I load up a file in Emacs.  I use C-c C-l to load the file (which
starts a new project if need be), and C-c C-r to reload it if I've
changed it.

I do have various customisations enabled (e.g. using
structured-haskell-mode) but that's fundamentally how I interact with
a ghci process (though ebal is definitely handing for setting up
sandboxes and installing dependencies).

Sorry couldn't quite parse last sentence


_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Emacs (was stack and the Atom editor)

Ivan Lazar Miljenovic
On 12 April 2016 at 21:41, Rustom Mody <[hidden email]> wrote:

>
>
> On Mon, Apr 11, 2016 at 5:19 PM, Ivan Lazar Miljenovic
> <[hidden email]> wrote:
>>
>> On 11 April 2016 at 15:03, Rustom Mody <[hidden email]> wrote:
>> >
>> >
>> > On Sun, Apr 10, 2016 at 7:33 PM, Gracjan Polak <[hidden email]>
>> > wrote:
>> >>
>> >> Rustom Mody <rustompmody <at> gmail.com> writes:
>> >>
>> >> > The old comint interface and new λ one -- when does which kick in
>> >>
>> >> There are quite some people out there using inf-haskell (comint) and
>> >> larger
>> >> number of interactive-haskell-mode users.
>> >
>> >
>> > 1. Start in a foo.hs file
>> > 2. Load file
>> > 3. I get the lambda interface
>> >
>> > Instead
>> > M-x run-haskell
>> > I get old interface
>> >
>> >
>> > How do I get one uniform interface?
>>
>> By not using run-haskell?
>
>
> :-)
>
> I figured that much out; viz that even if I dont need a file immediately I
> need to create a dummy hs file and load it.
>
>
>>
>> I load up a file in Emacs.  I use C-c C-l to load the file (which
>> starts a new project if need be), and C-c C-r to reload it if I've
>> changed it.
>>
>> I do have various customisations enabled (e.g. using
>> structured-haskell-mode) but that's fundamentally how I interact with
>> a ghci process (though ebal is definitely handing for setting up
>> sandboxes and installing dependencies).
>
>
> Sorry couldn't quite parse last sentence

structured-haskell-mode aims to provide node-based editing support for
Haskell code (ala paredit for Lisps); ebal is another mode that helps
running cabal-install or stack.

Most of the rest of my customisations is more about keybindings (and
various failed experiments like code folding that I tried but no
longer use); haskell-mode is fairly usable out-of-the-box.



--
Ivan Lazar Miljenovic
[hidden email]
http://IvanMiljenovic.wordpress.com
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Emacs (was stack and the Atom editor)

Johannes Waldmann-2
In reply to this post by Rustom Mody
> ... failed experiments like code folding

So, what *is* the recommended method for folding (in emacs)?

Yes, ideally we don't need this, because we do not write
deeply nested code. But then we have a lot of top-level
declarations, which I still want to fold. Yes, if there
are too many declarations in one module, then this should be
split. But still, that whole mess of declarations needs to be
navigated, no matter how it's mapped to files (modules).
The question is how it's mapped to the screen real estate.

- J.W.
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Emacs (was stack and the Atom editor)

Rustom Mody
In reply to this post by Rustom Mody
Replying to myself for anyone else who finds this


On Tue, Apr 12, 2016 at 5:11 PM, Rustom Mody <[hidden email]> wrote:


On Mon, Apr 11, 2016 at 5:19 PM, Ivan Lazar Miljenovic <[hidden email]> wrote:
On 11 April 2016 at 15:03, Rustom Mody <[hidden email]> wrote:
>
>
> On Sun, Apr 10, 2016 at 7:33 PM, Gracjan Polak <[hidden email]>
> wrote:
>>
>> Rustom Mody <rustompmody <at> gmail.com> writes:
>>
>> > The old comint interface and new λ one -- when does which kick in
>>
>> There are quite some people out there using inf-haskell (comint) and
>> larger
>> number of interactive-haskell-mode users.
>
>
> 1. Start in a foo.hs file
> 2. Load file
> 3. I get the lambda interface
>
> Instead
> M-x run-haskell
> I get old interface
>
>
> How do I get one uniform interface?

By not using run-haskell?

:-)

I figured that much out; viz that even if I dont need a file immediately I need to create a dummy hs file and load it.
 
Started with the minimum setup recommended in the Readme:

(add-to-list 'load-path "~/lib/emacs/haskell-mode/")
(require 'haskell-mode-autoloads)
(add-to-list 'Info-default-directory-list "~/lib/emacs/haskell-mode/")

Now from a haskell file doing C-c C-l
does nothing but tell me to study haskell-mode for more instructions  -- O well

So look up haskell mode that has:
    For more information see also Info node `(haskell-mode)Getting Started'.
However the Getting started is a broken link -- "No such node or anchor"
It is (info "(haskell-mode)Interactive Haskell")
which has the key bindings needed to get it working

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Emacs (was stack and the Atom editor)

Gracjan Polak
Rustom Mody <rustompmody <at> gmail.com> writes:
> Now from a haskell file doing C-c C-l
>
> does nothing but tell me to study haskell-mode for more instructions  -- O
well
>
> So look up haskell mode that has:    For more information see also Info
node `(haskell-mode)Getting Started'.
>
> However the Getting started is a broken link -- "No such node or anchor"
>
> It is (info "(haskell-mode)Interactive Haskell")
>
> which has the key bindings needed to get it working

We accept patches for documentation, if you can help it would be appreciated.

Note also our ticket: https://github.com/haskell/haskell-mode/issues/706

--
Gracjan
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe