LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-04-2016, 05:51 AM   #1
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 20 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924
Problem using Kate as git editor


Being more used to Kate than Nano, the default git editor on my system, I issued:

Code:
sudo git config --system core.editor kate
Kate launches ok when I make a commit, but git doesn't hang around for Kate to return, immediately outputting an "Aborting commit due to empty commit message" error.

Perusing the web, I see that several other editors can be invoked with the -w flag to force git to wait for the external editor to close (or save?) before continuing. However I can't seem to find a way of doing this for Kate.

As a fall-back if it can't be done, what's the closest alternative to Kate out there?

Many thanks.
 
Old 06-04-2016, 06:58 AM   #2
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 6,082
Blog Entries: 3

Rep: Reputation: 3169Reputation: 3169Reputation: 3169Reputation: 3169Reputation: 3169Reputation: 3169Reputation: 3169Reputation: 3169Reputation: 3169Reputation: 3169Reputation: 3169
As you point out, kate seems to have no built in option. Just a wild guess at a work-around:

Code:
sudo git config --system core.editor "kate & wait"
 
Old 06-04-2016, 07:10 AM   #3
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 20 MATE
Posts: 8,048

Original Poster
Blog Entries: 5

Rep: Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924
Quote:
Originally Posted by Turbocapitalist View Post
As you point out, kate seems to have no built in option. Just a wild guess at a work-around:

Code:
sudo git config --system core.editor "kate & wait"
Thanks, TC. The above command launched a new instance of Kate, despite one already being open, but didn't populate it with the normal git commit text. On top of that, saving then closing this new instance didn't shake git out of its wait mode, neither did closing the original instance of Kate.

Using the command with no instances of Kate already running showed the same problem.

For info, errors/warnings generated on the command line were:

Code:
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
Bus::open: Can not get ibus-daemon's address. 
IBusInputContext::createInputContext: no connection to ibus-daemon
However, these are normally generated each time I run kate from the command line.

Last edited by hydrurga; 06-04-2016 at 07:14 AM.
 
Old 06-04-2016, 12:32 PM   #4
norobro
Member
 
Registered: Feb 2006
Distribution: Debian Sid
Posts: 792

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
No help, but FYI kate works as the git editor on my Debian Sid box.
Code:
$ git --version
git version 2.8.1
$ kate --version
kate 16.04.1
Does it work if you change the editor for the repository?
Code:
$ git config --local core.editor kate
FWIW I get different warnings when starting kate:
Code:
$ kate
QObject::connect: invalid null parameter
QObject::connect: invalid null parameter
QObject::connect: Cannot connect (null)::returnPressed() to KUrlRequester::returnPressed()
QObject::connect: Cannot connect (null)::returnPressed(QString) to KUrlRequester::returnPressed(QString)
 
1 members found this post helpful.
Old 06-04-2016, 01:16 PM   #5
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 6,082
Blog Entries: 3

Rep: Reputation: 3169Reputation: 3169Reputation: 3169Reputation: 3169Reputation: 3169Reputation: 3169Reputation: 3169Reputation: 3169Reputation: 3169Reputation: 3169Reputation: 3169
There is an ugly work around. If you wrap kate in a shell script and then tell git to use the shell script then everything works out.

Code:
#!/bin/sh

/usr/bin/kate $@
That will allow kate to edit the commit message and it can be verified with "git log"

norobro's question suggests to me that you should search for a bug report with git and kate and there isn't any for your versions to file one.
 
Old 06-04-2016, 05:25 PM   #6
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 20 MATE
Posts: 8,048

Original Poster
Blog Entries: 5

Rep: Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924
Quote:
Originally Posted by norobro View Post
Does it work if you change the editor for the repository?
Code:
$ git config --local core.editor kate
So, one of those quirky things that sometimes happens with software just happened.

I used
Code:
$ git config --local core.editor kate
as you suggested. It worked!

So, I then decided to test exactly what was going on and checked my --local, --global and --system core.editor settings - all were set to kate.

I removed the --local one to see if it would still work. It did. I removed the --global one to see if it would still work. It did.

So now I'm back at a situation that was ostensibly the one which gave me problems in the first place, but now works.

The only thing that I can think of is that the --local one was set to something strange before I changed it above. Anyway it works, so I'll mark the thread as solved, with thanks to all, but particularly to the little goblin who lives in my computer and sometimes sprinkles his magic dust around.
 
Old 06-04-2016, 05:27 PM   #7
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 20 MATE
Posts: 8,048

Original Poster
Blog Entries: 5

Rep: Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924
Quote:
Originally Posted by Turbocapitalist View Post
There is an ugly work around. If you wrap kate in a shell script and then tell git to use the shell script then everything works out.

Code:
#!/bin/sh

/usr/bin/kate $@
That will allow kate to edit the commit message and it can be verified with "git log"

norobro's question suggests to me that you should search for a bug report with git and kate and there isn't any for your versions to file one.
I didn't get round to this, but thanks for the suggestion!
 
Old 07-15-2016, 04:22 PM   #8
Spharx
LQ Newbie
 
Registered: Jul 2016
Posts: 1

Rep: Reputation: Disabled
For me ' ... core.editor "kate -b" ' works.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
kate editor settings. augustus_hill Linux - Software 1 02-11-2015 12:44 PM
LXer: Getting Started With the Kate Text Editor: Kate For Coders LXer Syndicated Linux News 0 04-02-2009 12:40 AM
Question about Kate or another Editor FredJones Linux - Newbie 2 05-19-2008 02:45 PM
Kate Is Not Working, Kate editor is not starting in Redhat 9 apur Linux - General 4 05-11-2004 10:52 AM
Kate (editor) is touching me up alex.e.c Linux - Software 0 09-05-2003 10:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration