Recent activity

Re: [PATCH v4] lua: add a plugin to implement the `gf` command 5 hours ago

From Matěj Cepl to ~martanne/devel

On Fri Sep 15, 2023 at 11:25 PM CEST, Silvan Jegen wrote:
> This plugin implements the "gf" command of vim as a lua plugin, which
> tries to open a file having the same name as the string currently under
> the primary cursor. It recognises the filenames in the following cases.

Hi, Randy,

could we get some final decision on this patch? Yea or Nay?
If you reject it, we can make a plugin out of it.

Best,

Matěj
--

Re: Crash in event handlers (setting options new way?) 9 days ago

From Matěj Cepl to ~martanne/devel

On Sat Sep 23, 2023 at 5:42 PM CEST, Randy Palamar wrote:
> I am unable to recreate. I tried both vis master and your devel
> branch. I suspect it is an issue with a plugin. I also use
> vis-spellcheck so I don't think it is that one. Assuming both vis-lspc
> and vis-spellcheck are unmodified from upstream then it is quite
> possible that the vis-lspc `WIN_HIGHLIGHT` event was never being
> executed prior to [0] and that it has a bug in it.

My current theory is that it is really plugin [0] and
specifically this code:

    local function file_exists(path)
        local f = io.open(path)
        if f ~= nil then

Crash in event handlers (setting options new way?) 10 days ago

From Matěj Cepl to ~martanne/devel

With the latest build from the top of the current master (with my
additional patches in https://git.sr.ht/~mcepl/vis devel branch)
I get completely regularly in one file this crash:

(gdb) bt
#0  0x00007ffff7c791d8 in _IO_new_fclose (fp=0x0) at iofclose.c:48
#1  0x00007ffff7ec7c6d in io_fclose (L=0x5555555f54c8) at /usr/src/debug/lua-5.4.6/src/liolib.c:248
#2  0x00007ffff7eb466b in precallC (f=0x7ffff7ec7b40 <io_close>, nresults=0, func=0x555555890630, L=0x5555555f54c8) at /usr/src/debug/lua-5.4.6/src/ldo.c:529
#3  luaD_precall (L=L@entry=0x5555555f54c8, func=<optimized out>, nresults=nresults@entry=0) at /usr/src/debug/lua-5.4.6/src/ldo.c:595
#4  0x00007ffff7eb6be2 in ccall (inc=65537, nResults=0, func=<optimized out>, L=0x5555555f54c8) at /usr/src/debug/lua-5.4.6/src/ldo.c:635
#5  luaD_callnoyield (nResults=0, func=<optimized out>, L=0x5555555f54c8) at /usr/src/debug/lua-5.4.6/src/ldo.c:655
#6  dothecall (L=L@entry=0x5555555f54c8, ud=ud@entry=0x0) at /usr/src/debug/lua-5.4.6/src/lgc.c:901
#7  0x00007ffff7eafc2b in luaD_rawrunprotected (L=0x5555555f54c8, f=0x7ffff7eb6bb0 <dothecall>, ud=0x0) at /usr/src/debug/lua-5.4.6/src/ldo.c:144
#8  0x00007ffff7ed20b0 in luaD_pcall.constprop.0 (L=L@entry=0x5555555f54c8, func=func@entry=0x7ffff7eb6bb0 <dothecall>, u=u@entry=0x0, old_top=1584, ef=ef@entry=0)

Re: [PATCH] vis-single: respect TMPDIR 12 days ago

From Matěj Cepl to ~martanne/devel

Tested-By: "Matěj Cepl" <mcepl@cepl.eu>

(well, tested, I have build the program with this patch and
nothing horrible happened, I am on standard Linux with properly
defined and existing /tmp).

-- 
https://matej.ceplovi.cz/blog/, Jabber: mcepl@ceplovi.cz
GPG Finger: 3C76 A027 CA45 AD70 98B5  BC1D 7920 5802 880B C9D8
 
“I have read St. Paul’s epistle on charity,” he said, “and, after
long reflection, I am persuaded that there exists a greater thing
than charity—a thing of more value to the human family. Like
charity, it rejoiceth not in iniquity, but it does not bear all

Concerning https://man.sr.ht/lists.sr.ht/code-review.md 17 days ago

From Matěj Cepl to ~sircmpwn/sr.ht-discuss

Hi,

it seems to me that the easiest fix
for this page would be just to reedit
https://drewdevault.com/2022/07/25/Code-review-with-aerc.html
into the manual-like style of the page.

Do you insist on copyright and would you do it yourself or will
you accept me submitting such page?

Best,

Matěj

[PATCH vis v3] lua: add a plugin to implement the `gf` command 18 days ago

From Matěj Cepl to ~martanne/devel

From: Silvan Jegen <s.jegen@gmail.com>

This plugin implements the "gf" command of vim as a lua plugin, which
tries to open a file having the same name as the string currently under
the primary cursor. It recognises the filenames in the following cases.

vis.c
vis.c:222 (opens file at specific line offset)
vis.c:/goto (opens file at first match of search pattern after '/')

This patch is a rework of the following Github PR and supersedes it.

https://github.com/martanne/vis/pull/558
---
[message trimmed]

Re: [PATCH v2] lua: add a plugin to implement the `gf` command 20 days ago

From Matěj Cepl to ~martanne/devel

On Tue Sep 12, 2023 at 10:23 PM CEST, Silvan Jegen wrote:
> * Using "gf" on the output of "grep -n pattern file.txt" to open files
>   with matches. Unfortunately the line-number that the "-n" option to
>   grep is adding is currently not correctly handled in this plugin. I
>   will fix it if we decide that we add this plugin.

This is a good example and useful for everybody. Randy is
obviously correct, that better plugin (understanding syntax)
would be even better, but I think it should be developed more as
part of vis-lspci (or its successor). I would still prefer
this simple version be part of the vis itself, both for
vim-compatibility (whatever is your experience, Randy, I believe
that huge majority of our users are and will be converts from
vim/neovim) and as an example of what’s possible.

Re: [PATCH v2] lua: add a plugin to implement the `gf` command 21 days ago

From Matěj Cepl to ~martanne/devel

On Tue Sep 12, 2023 at 4:29 AM CEST, Randy Palamar wrote:
> Overall though I'm not sure if this is something to include in vis or
> not. The uses seem a little limited as is. Perhaps it's better suited
> for some more intelligent plugin that has knowledge of the files
> language. For example you place the cursor over a header in C and it
> opens the header.

From my side there are two reasons why to put this plugin into
lua/plugins/:

1. It is really tiny, so it falls quite well among the small
   plugins which are already there.
2. This is an equivalent of the core vim technology (without any
   plugins), so it makes potential converts from vim happy.

Re: [PATCH aerc v3] compose: add option for LF-only editors 21 days ago

From Matěj Cepl to ~rjarry/aerc-devel

On Sun Sep 10, 2023 at 2:39 PM CEST, Moritz Poldrack wrote:
> Hey Matěj,
>
> did you have a chance to give this patch a spin again?

+1

-- 
https://matej.ceplovi.cz/blog/, Jabber: mcepl@ceplovi.cz
GPG Finger: 3C76 A027 CA45 AD70 98B5  BC1D 7920 5802 880B C9D8
 
Faithful love is what people look for in a person; …
   -- Proverbs 19:22 (NJB)

Re: [PATCH v2] lua: add a plugin to implement the `gf` command 21 days ago

From Matěj Cepl to ~martanne/devel

On Mon Sep 11, 2023 at 8:28 PM CEST, Silvan Jegen wrote:
> This plugin implements the "gf" command of vim as a lua plugin, which
> tries to open a file having the same name as the string currently under
> the primary cursor. It recognises the filenames in the following cases.

+1

Matěj
-- 
https://matej.ceplovi.cz/blog/, @mcepl@floss.social
GPG Finger: 3C76 A027 CA45 AD70 98B5  BC1D 7920 5802 880B C9D8
 
At the day of judgement it shall not be asked of us what we have
read, but what we have done: nor how well we have said, but how