[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#44272: guix edit doesn't work when $EDITOR is set to "kate"
From: |
zimoun |
Subject: |
bug#44272: guix edit doesn't work when $EDITOR is set to "kate" |
Date: |
Wed, 28 Oct 2020 15:52:18 +0100 |
Dear Nathan,
> Easy solution, set $EDITOR to "gedit" ;)
Or Emacs. ;-)
> The reason why kate "doesn't work" when opening files as specified by
> `guix edit`, is that kate apparently can't handle the "$EDITOR +$N
> $FILE" syntax, where $N is the number of lines to skip. It instead
> opens two files, one of which will likely always be empty. This should
> probably be reported as bug to kate unless that works upstream and
> somehow guix messes up this feature.
Instead ’kate’ use ’--line/-l’ and not ’+N’. You could wrap, something
along these lines:
--8<---------------cut here---------------start------------->8---
#!/bin/sh
kate -l $(echo "$*" | tr "+" " ")
--8<---------------cut here---------------end--------------->8---
then:
export EDITOR=/path/to/kate-wrapper.sh
guix edit emacs
works (with ’/path/to/kate-wrapper.sh’ executable). Well, the wrapper
could be better, obviously. :-)
As Leo said, it does not seem a bug on the Guix side. Well, what could
be done on the Guix side? What do you suggest?
All the best,
simon