~niklaseklund

~niklaseklund/detached.el

Last active a month ago

~niklaseklund/egerrit

Last active 5 months ago

~niklaseklund/zuul.el

Last active 1 year, 5 months ago

~niklaseklund/public-inbox

Last active 1 year, 9 months ago
View more

Recent activity

Re: [PATCH detached.el 0/1] Patch for OSX tail command line args 1 year, 4 months ago

From Niklas Eklund to ~niklaseklund/detached.el

~dpettersson <dpettersson@git.sr.ht> writes:

> Here is the patch for osx tail compatibility, have tested on linux as
> well so I don't believe this will break on linux.

Nice, thanks :). I tried out your patch and actually realized there was a
bug present already on the main branch related to your change.

,(concat "-n " detached-session-context-lines)

This wouldn't work since detached-session-context-lines is a number and
not a string.

Your patch looks good, one thing that I think we should change is that
[message trimmed]

Re: [PATCH detached.el 1/1] Add support for OSX tail 1 year, 4 months ago

From Niklas Eklund to ~niklaseklund/detached.el

Daniel Pettersson <daniel@dpettersson.net> writes:

> Hey as seen I am having som issues with sourcehuts Patch system :)
>
> Tried using sourcehuts web ui for sending but it for som reason it
> appends the following from an older conversation, so ignore the
> unnecessary repetition.

Hmm, that's a bit weird. I haven't used the interface myself so I am not
sure how to use it properly :P.

It's cool that sourcehut runs the build command automatically on the
patches you have sent! I need to look into it though because it seems
like its doing something wrong since it fails, and it works when I

Re: [PATCH detached.el 1/1] Reuse detached shell buffers with <NUMBER> suffix 1 year, 4 months ago

From Niklas Eklund to ~niklaseklund/detached.el

~dpettersson <dpettersson@git.sr.ht> writes:

thanks for the patch Daniel, it is a nice improvement to the way the
buffers are generated! I fixed a small spelling mistake in the
documentation before adding the patch. Otherwise I have pushed it
upstream now.

I was going to add your name in the list of code contributors, but I
realized I didn't if you have a website, gitlab/sourcehut or similar
that you would like me to link to your name in the list? This is what I
have added for the other contributors

https://git.sr.ht/~niklaseklund/detached.el/tree/master/README.md#L331

Re: Does not work with `direnv` 1 year, 4 months ago

From Niklas Eklund to ~niklaseklund/detached.el

Maximin Liebkne <ispinfx@gmail.com> writes:

> Hi, thanks for your work.
>
> I've tested it and it seems to work well on my local machine but not
> remote direnv. That could be sad since my main usage of `detached` is
> running commands on remote servers (possibly with different env), though
> I understand that `envrc-mode` does not support `tramp`.

It seems like https://github.com/astoff/buffer-env doesn't support that
either from what I could see. Looks like it will be difficult to
implement something that works reliably.

My suggestion is that you would need to make sure that the command you

Re: Does not work with `direnv` 1 year, 4 months ago

From Niklas Eklund to ~niklaseklund/detached.el

Niklas Eklund <niklas.eklund@posteo.net> writes:

> Maximin Liebkne <ispinfx@gmail.com> writes:
>
>>> Is this behavior reproduceable for you as well?
>>
>> Yes, you are right, I can reproduce this.
>
> I think I might have some ugly hack that could work. Seems to be working
> with detached-shell-command and detached-compile for me. Would be great
> if you could try it out. It is available on the branch called direnv.

I created a more polished implementation on the branch. Give it a try,
it should work out of the box for envrc now.

Re: Does not work with `direnv` 1 year, 4 months ago

From Niklas Eklund to ~niklaseklund/detached.el

Maximin Liebkne <ispinfx@gmail.com> writes:

>> Is this behavior reproduceable for you as well?
>
> Yes, you are right, I can reproduce this.

I think I might have some ugly hack that could work. Seems to be working
with detached-shell-command and detached-compile for me. Would be great
if you could try it out. It is available on the branch called direnv.

/Niklas

> On Tue, Sep 27, 2022 at 4:39 PM Niklas Eklund <niklas.eklund@posteo.net> wrote:
>>

Re: Does not work with `direnv` 1 year, 4 months ago

From Niklas Eklund to ~niklaseklund/detached.el

Maximin Liebkne <ispinfx@gmail.com> writes:

> Hi,
>
> I do use `envrc`
>
> (use-package envrc
>   :diminish envrc-mode
>   :hook (after-init . envrc-global-mode))

I thought I was doing that, but turned out I had set it to :disabled and
forgot about it :P

> and it works smoothly. The following script

Re: Does not work with `direnv` 1 year, 4 months ago

From Niklas Eklund to ~niklaseklund/detached.el

Maximin Liebkne <ispinfx@gmail.com> writes:

> Hi,

Hello,

> Currently `detached.el` does not seem to work with `direnv`. For
> example, rerunning a command run in a direnv fails since it can not
> resolve the env successfully.

In general detached processes doesn't capture the environment it runs in
so it might fail to reproduce the results when it's rerun. However using
direnv is something that would be good to support.

Re: detached-init slowing down emacs startup 1 year, 5 months ago

From Niklas Eklund to ~niklaseklund/detached.el

Osama Rebach <osamarebach@gmail.com> writes:

> Thanks, running the "init_speedup" branch resolved the issue.
>
> Now running (detached-init) with 250 sessions:
>   (0.17904190499999997 1 0.02780058099999999)

Nice! Then I will merge this into the main branch, thanks for the help :)

Re: detached-init slowing down emacs startup 1 year, 5 months ago

From Niklas Eklund to ~niklaseklund/detached.el

Osama Rebach <osamarebach@gmail.com> writes:

> Niklas Eklund <niklas.eklund@posteo.net> writes:
>
>> Great that you provide these steps and benchmark results. I don't manage
>> to reproduce it locally today. But I did notice some slower
>> initialization the other day, not sure why I didn't today.
>
> the slowdown happens for the first evaluation of (detached-init), after
> that running (detached-init) runs quickly. so to reproduce it you need to
> remove (detached-init) from the init file, and running it independently,
> and exiting emacs every time. and rerun it again

I was doing that but for some reason it was fast anyway. I don't have