GNU bug report logs - #44272
guix edit doesn't work when $EDITOR is set to "kate"

Previous Next

Package: guix;

Reported by: Nathan Dehnel <ncdehnel <at> gmail.com>

Date: Wed, 28 Oct 2020 06:14:01 UTC

Severity: normal

Done: zimoun <zimon.toutoune <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: zimoun <zimon.toutoune <at> gmail.com>
To: Leo Prikler <leo.prikler <at> student.tugraz.at>, ncdehnel <at> gmail.com
Cc: 44272 <at> debbugs.gnu.org
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




This bug report was last modified 1 year and 239 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.