Paul van der Walt | 7 Mar 15:33 2012
Picon

Creating a new mode

Dear all,

For a few hours now, I've been playing around trying to make a new
mode for Yi. The problem is, it breaks when I try to load a Unicode
file with certain characters. For example, I've made a mode which
basically only consists of the following:

myModeGen _myBinding =
  fundamentalMode {
  , modeApplies = anyExtension ["ext1"]
  }

myModeVim :: Mode ()
myModeVim = myModeGen (\ch -> [char '\\', char ch])

When loading the file into fundamental mode, all's well (by changing
the extention ≠ ext1), but when loading a file containing the
following, it breaks with the error shown below.

The file:

∷

(that's right, a single unicode character and a newline)

The error:

yi-linux-x86_64: lexical error around 7_; [])
op
yi-linux-x86_64: thread blocked indefinitely in an MVar operation
(Continue reading)

Jean-Philippe Bernardy | 7 Mar 16:21 2012
Picon
Picon

Re: Creating a new mode

I'd say it's very likely that you are actually not using the mode
"myModeGen" but something else.

Certainly the code that you show cannot explain the error you describe.
It's puzzling that you have an unused argument in myModeGen, making me
guess you have other versions of this code lying around.

Cheers,
JP.

On Wed, Mar 7, 2012 at 3:33 PM, Paul van der Walt <paulvdw@...> wrote:
> Dear all,
>
> For a few hours now, I've been playing around trying to make a new
> mode for Yi. The problem is, it breaks when I try to load a Unicode
> file with certain characters. For example, I've made a mode which
> basically only consists of the following:
>
> myModeGen _myBinding =
>  fundamentalMode {
>  , modeApplies = anyExtension ["ext1"]
>  }
>
> myModeVim :: Mode ()
> myModeVim = myModeGen (\ch -> [char '\\', char ch])
>
> When loading the file into fundamental mode, all's well (by changing
> the extention ≠ ext1), but when loading a file containing the
> following, it breaks with the error shown below.
>
(Continue reading)

Paul van der Walt | 7 Mar 17:05 2012
Picon

Re: Creating a new mode

On Wed, Mar 07, 2012 at 16:21:32 +0100, quoth Jean-Philippe Bernardy:
> I'd say it's very likely that you are actually not using the mode
> "myModeGen" but something else.

Oh geez, that was it. Somehow, even though I was running
./dist/build/yi/yi it was grabbing an old version of myModeGen.

It seems like a way around this is running `cabal install` each
time, but this brings me to another question: I can't get `make`
to work. I've made a HackerMain.hs, but it says it can't find
it. Also, these warnings are emitted before GHCi is started:

find: `src/Yi': No such file or directory
find: `src/Shim': No such file or directory
find: `src/Data': No such file or directory

Which is strange, since in the working directory (~/yi/yi where
~/yi is the git clone root) there is a folder src but it
contains {executable, library, parsertest, tests}. Does the
Makefile need updating? What's the usual development cycle for
you guys?

Cheers and thanks,

Paul

--
Yi development mailing list
yi-devel-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
http://groups.google.com/group/yi-devel
Jean-Philippe Bernardy | 12 Mar 14:02 2012
Picon
Picon

Re: Creating a new mode

> ~/yi is the git clone root) there is a folder src but it
> contains {executable, library, parsertest, tests}. Does the
> Makefile need updating? What's the usual development cycle for
> you guys?

I used to use the HackerMain, but not any more. I just "cabal install"
every time. I think the next step is to change the cabal file so that
the Main uses the library instead of compiling everything twice.

Cheers,
JP.

--

-- 
Yi development mailing list
yi-devel@...
http://groups.google.com/group/yi-devel

Jeremy Wall | 12 Mar 17:04 2012
Picon

Re: Creating a new mode

Has anyone tried using cabal-dev with yi yet? It's on my list of
things to try here soon.

On Mon, Mar 12, 2012 at 8:02 AM, Jean-Philippe Bernardy
<bernardy@...> wrote:
>> ~/yi is the git clone root) there is a folder src but it
>> contains {executable, library, parsertest, tests}. Does the
>> Makefile need updating? What's the usual development cycle for
>> you guys?
>
> I used to use the HackerMain, but not any more. I just "cabal install"
> every time. I think the next step is to change the cabal file so that
> the Main uses the library instead of compiling everything twice.
>
> Cheers,
> JP.
>
> --
> Yi development mailing list
> yi-devel@...
> http://groups.google.com/group/yi-devel

--

-- 
Yi development mailing list
yi-devel@...
http://groups.google.com/group/yi-devel

GitHub | 20 Mar 07:02 2012

[yi-editor/yi] 7649f7: Add Mark Wright to AUTHORS

  Branch: refs/heads/master
  Home:   https://github.com/yi-editor/yi
  Commit: 7649f75fef4ade77dd4375b5bb3e2290016555eb
      https://github.com/yi-editor/yi/commit/7649f75fef4ade77dd4375b5bb3e2290016555eb
  Author: Corey O'Connor <corey@...>
  Date:   2012-03-19 (Mon, 19 Mar 2012)

  Changed paths:
    M AUTHORS

  Log Message:
  -----------
  Add Mark Wright to AUTHORS

--

-- 
Yi development mailing list
yi-devel@...
http://groups.google.com/group/yi-devel

GitHub | 20 Mar 07:18 2012

[yi-editor/yi] 0bb55a: GHC 7.4.1 support

  Branch: refs/heads/ghc-7.4.1-feature
  Home:   https://github.com/yi-editor/yi
  Commit: 0bb55a25884095fcda6cb7543e3d2af2c68e09ef
      https://github.com/yi-editor/yi/commit/0bb55a25884095fcda6cb7543e3d2af2c68e09ef
  Author: Corey O'Connor <corey@...>
  Date:   2012-03-19 (Mon, 19 Mar 2012)

  Changed paths:
    M yi-contrib/yi-contrib.cabal
  M yi/src/library/Yi/Prelude.hs
  M yi/src/library/Yi/Syntax/Latex.hs
  M yi/src/library/Yi/Syntax/OnlineTree.hs
  M yi/src/library/Yi/Syntax/Paren.hs
  M yi/src/library/Yi/Syntax/Strokes/Haskell.hs
  M yi/src/library/Yi/Syntax/Tree.hs
  M yi/yi.cabal

  Log Message:
  -----------
  GHC 7.4.1 support
Merged from Mark Wright and Corey O'Connor pull requests.

--

-- 
Yi development mailing list
yi-devel@...
http://groups.google.com/group/yi-devel

GitHub | 20 Mar 07:37 2012

[yi-editor/yi] 035129: Default modeline now displays hex char code.

  Branch: refs/heads/per-mode-modeline-feature
  Home:   https://github.com/yi-editor/yi
  Commit: 035129135468ad69ef0308e19b876c42a5b971bb
      https://github.com/yi-editor/yi/commit/035129135468ad69ef0308e19b876c42a5b971bb
  Author: Michał J. Gajda <mjgajda@...>
  Date:   2012-03-19 (Mon, 19 Mar 2012)

  Changed paths:
    M yi/src/library/Yi/Buffer/Misc.hs

  Log Message:
  -----------
  Default modeline now displays hex char code.

  Commit: ab2aefdf4ba9c37c8d3ab4511398e744a445c101
      https://github.com/yi-editor/yi/commit/ab2aefdf4ba9c37c8d3ab4511398e744a445c101
  Author: Michał J. Gajda <mjgajda@...>
  Date:   2012-03-19 (Mon, 19 Mar 2012)

  Changed paths:
    M yi/src/library/Yi/Buffer/Misc.hs

  Log Message:
  -----------
  Modelines may be now customized per-mode.

Compare: https://github.com/yi-editor/yi/compare/0351291^...ab2aefd

--

-- 
Yi development mailing list
yi-devel@...
http://groups.google.com/group/yi-devel

Corey O'Connor | 20 Mar 18:11 2012
Picon

Regarding the current pull requests...

Howdy!
I've merged the current pull requests into individual branches. Please
review the commits in these branches ASAP. In the interest of building
momentum I'm going to start pushing commits to master.

Once the current pull requests are resolved I'm going to look into
doing a new release of Yi onto hackage.

-Corey O'Connor
coreyoconnor@...
http://corebotllc.com/

--

-- 
Yi development mailing list
yi-devel@...
http://groups.google.com/group/yi-devel

GitHub | 21 Mar 01:18 2012

[yi-editor/yi] b948ac: fix warning by adding modeModeLineA accessor expor...

  Branch: refs/heads/per-mode-modeline-feature
  Home:   https://github.com/yi-editor/yi
  Commit: b948ac7ae4a157a433c68c7ccd12be61cb7001c0
      https://github.com/yi-editor/yi/commit/b948ac7ae4a157a433c68c7ccd12be61cb7001c0
  Author: Corey O'Connor <corey@...>
  Date:   2012-03-20 (Tue, 20 Mar 2012)

  Changed paths:
    M yi/src/library/Yi/Buffer/Misc.hs

  Log Message:
  -----------
  fix warning by adding modeModeLineA accessor export

--

-- 
Yi development mailing list
yi-devel@...
http://groups.google.com/group/yi-devel


Gmane