unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Nathan Dehnel <ncdehnel@gmail.com>
To: zimoun <zimon.toutoune@gmail.com>
Cc: Leo Prikler <leo.prikler@student.tugraz.at>, 44272@debbugs.gnu.org
Subject: bug#44272: guix edit doesn't work when $EDITOR is set to "kate"
Date: Wed, 28 Oct 2020 17:28:38 -0500	[thread overview]
Message-ID: <CAEEhgEtuNy85rVxyG6VDBFjAikXoqyS5NkOaUMHEqsPV6Zc0Jg@mail.gmail.com> (raw)
In-Reply-To: <868sbq2yjh.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1653 bytes --]

>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?

Well, guix could pass different flags if EDITOR is set to "kate". Somehow I
doubt kate would change their command line flags just because an extremely
obscure distro-specific tool treats it the same as other text editors.

But, whatever. The wrapper works well enough. Thanks.

On Wed, Oct 28, 2020 at 9:52 AM zimoun <zimon.toutoune@gmail.com> wrote:

> 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
>

[-- Attachment #2: Type: text/html, Size: 2225 bytes --]

  reply	other threads:[~2020-10-28 22:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-28  6:13 bug#44272: guix edit doesn't work when $EDITOR is set to "kate" Nathan Dehnel
2020-10-28 13:05 ` Leo Prikler
2020-10-28 14:52   ` zimoun
2020-10-28 22:28     ` Nathan Dehnel [this message]
2020-10-28 22:55       ` zimoun
2023-11-02  9:32     ` bug#44272: guix edit doesn't work when $EDITOR is set to VSCode Simon Tournier
2023-11-06 17:41       ` Simon Tournier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAEEhgEtuNy85rVxyG6VDBFjAikXoqyS5NkOaUMHEqsPV6Zc0Jg@mail.gmail.com \
    --to=ncdehnel@gmail.com \
    --cc=44272@debbugs.gnu.org \
    --cc=leo.prikler@student.tugraz.at \
    --cc=zimon.toutoune@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).