~m15a

Hokkaido, Japan

https://github.com/m15a/

WIP

#Recent activities

Nix is a great tool to build package and environment in purely functional way, and I enjoy using it.

#Fennel projects

  • bump.fnl: a small CLI utility that bumps version string and/or auto updates headings including version and URLs in Markdown changelog.
  • fnldoc: a fork of Fenneldoc, which was sadly archived, with some bug fixes and new features. I'd like to express my huge appreciation to the original creator andreyorst.
  • vim-fennel-symtax: a fork of fennel.vim, which is inactive now. Again, I'd like to express my huge appreciation to the initiator of the original bakpakin and contributors.

#PureScript projects

  • purescript-choku: a Chalk binding library for decorating terminal texts easily. This is my first PureScript stuff.

Trackers

~m15a/fnldoc

Last active 3 months ago

~m15a/bump.fnl

Last active 3 months ago

#206 Update Vim plugin hash in nixpkgs 2 months ago

Comment by ~m15a on ~soywod/pimalaya

On 15/05/2024 09:21, ~soywod wrote:

Something must be wrong in the nixpkgs definition of the Vim plugin.

The overridden hash seems out of date:

diff --git a/pkgs/applications/editors/vim/plugins/overrides.nix b/pkgs/applications/editors/vim/plugins/overrides.nix
index c3711bd412fe..9db34c5e0403 100644
--- a/pkgs/applications/editors/vim/plugins/overrides.nix
+++ b/pkgs/applications/editors/vim/plugins/overrides.nix
@@ -711,7 +711,7 @@
       owner = "~soywod";
       repo = "himalaya-vim";
       rev = "v${himalaya.version}";
-      sha256 = "W+91hnNeS6WkDiR9r1s7xPTK9JlCWiVkI/nXVYbepY0=";
+      sha256 = "lqXHIntg3MKqFQbY9eJHFP10hPIR71d78e0p2IfZaic=";
     };
   };

I think the above hash should be updated manually, since their bot updates only pkgs/applications/editors/vim/plugins/generated.nix and the bot tracks himalaya-vim's master branch.

-- NACAMURA Mitsuhiro

#204 Error when listing E-Mails on vim 2 months ago

on ~soywod/pimalaya

2024-05-12T07:37:24Z "~m15a" outgoing@sr.ht:

This fixes the problem for me:

diff --git a/autoload/himalaya/domain/email.vim b/autoload/himalaya/domain/email.vim
index 25a2fa6..9fcc70f 100644
--- a/autoload/himalaya/domain/email.vim
+++ b/autoload/himalaya/domain/email.vim
@@ -16,7 +16,7 @@ endfunction

 function! himalaya#domain#email#list_with(account, folder, page) abort
   call himalaya#request#plain({
-  \ 'cmd': 'envelope list --account %s --max-width %d --page-size %d --page %d %s',
+  \ 'cmd': 'envelope list --account %s --max-width %d --page-size %d --page %d --folder %s',
   \ 'args': [shellescape(a:account), s:bufwidth(), winheight(0) - 1, a:page, shellescape(a:folder)],
   \ 'msg': printf('Fetching %s envelopes', a:folder),
   \ 'on_data': {data -> s:list_with(a:folder, a:page, data)}

Indeed this seems to fix the listing of E-Mails. However, I still get some other errors on some actions. E.g.:

When changing folders with 'gm' or trying to move or copy a message with 'gM' and 'gC':

Listing folders…
error: unrecognized subcommand 'list'
Usage: himalaya [OPTIONS] [COMMAND]
For more information, try '--help'.
Error detected while processing function <lambda>26[1]..<SNR>37_on_close[6].
.function <lambda>26[1]..<SNR>37_on_close:
line    6:
E605: Exception not caught: CLI error, see :messages for more information

Also when replying to an E-Mail with 'gr', the message window is opened as expected (not as a tile as I would expect, but full screen), but when I save and close the file, I don't get prompted to send cancel or anything as when I'm writing a new mail (which works properly and opens as a tile too).

Is this only on Vim? Seems very buggy.

#204 Error when listing E-Mails on vim 2 months ago

Comment by ~m15a on ~soywod/pimalaya

This fixes the problem for me:

diff --git a/autoload/himalaya/domain/email.vim b/autoload/himalaya/domain/email.vim
index 25a2fa6..9fcc70f 100644
--- a/autoload/himalaya/domain/email.vim
+++ b/autoload/himalaya/domain/email.vim
@@ -16,7 +16,7 @@ endfunction

 function! himalaya#domain#email#list_with(account, folder, page) abort
   call himalaya#request#plain({
-  \ 'cmd': 'envelope list --account %s --max-width %d --page-size %d --page %d %s',
+  \ 'cmd': 'envelope list --account %s --max-width %d --page-size %d --page %d --folder %s',
   \ 'args': [shellescape(a:account), s:bufwidth(), winheight(0) - 1, a:page, shellescape(a:folder)],
   \ 'msg': printf('Fetching %s envelopes', a:folder),
   \ 'on_data': {data -> s:list_with(a:folder, a:page, data)}

#206 Update Vim plugin hash in nixpkgs 2 months ago

Comment by ~m15a on ~soywod/pimalaya

Aha okay I tried git revert 9a385c2 (commit message: adjust code for cli v1) on the plugin's master branch and then the above error was reproduced, meaning that Nixpkgs' plugin version is a bit old. Sorry for the disturbance!

#206 Update Vim plugin hash in nixpkgs 2 months ago

Comment by ~m15a on ~soywod/pimalaya

Also note that I installed himalaya 1.0.0-beta.4.

#206 Update Vim plugin hash in nixpkgs 2 months ago

Comment by ~m15a on ~soywod/pimalaya

I tried the following Neovim versions:

  • v0.10.0-dev-d3fa88b from Neovim repository,
  • v0.9.5 from recent nixpkgs-unstable channel, and
  • v0.9.4 from recent nixos-23.11 channel.

All the cases have the same error.

Since the error might be due to my configuration, I've also tried to install the vanilla Neovim from nixpkgs-unstable and directly installed himalaya-vim to ~/.local/share/nvim/site/pack/local/start. Then I experienced https://todo.sr.ht/~soywod/pimalaya/204

I'll investigate this more later, thanks!

#206 Update Vim plugin hash in nixpkgs 2 months ago

Ticket created by ~m15a on ~soywod/pimalaya

Hello!

I'm a Neovim user and interested in using himalaya CLI and Vim interface. I installed them (using Nix), set up my IMAP and SMTP, confirmed that CLI works, and ran :Himalaya in Neovim. Then I got

Fetching INBOX emails…
error: unexpected argument '--account' found
Usage: himalaya <--config <PATH>|--output <FORMAT>|--color <MODE>|--debug|--trace>
For more information, try '--help'.
Error detected while processing function <lambda>5[1]..<SNR>59_on_exit[6]..function <lambda>5[1]..<SNR>59_on_exit:
line    6:
E605: Exception not caught: CLI error, see :messages for more information

I confirmed the same error happens on Neovim v0.9.5 and v0.10.10-dev-d3fa88b.

Not sure but it seems --account is escaped like so:

$ himalaya folder list -- --account m15a
error: unexpected argument '--account' found

-- NACAMURA Mitsuhiro

#22 Cross-file, cross-module, or external link 3 months ago

feat added by ~m15a on ~m15a/fnldoc

#22 Cross-file, cross-module, or external link 3 months ago

Ticket created by ~m15a on ~m15a/fnldoc

It would be nice if inline reference can link to symbol outside the file. For example special forms in Fennel reference page.

#20 Unwanted documentation for non-module table 3 months ago

Comment by ~m15a on ~m15a/fnldoc

NACAMURA Mitsuhiro referenced this ticket in commit 1d46a57.

REPORTED RESOLVED IMPLEMENTED