[kmail2] [Bug 327982] New: external editor is too hard to configure
Éric Brunet
eric.brunet at lps.ens.fr
Sat Nov 23 16:59:51 GMT 2013
https://bugs.kde.org/show_bug.cgi?id=327982
Bug ID: 327982
Summary: external editor is too hard to configure
Classification: Unclassified
Product: kmail2
Version: 4.11.3
Platform: Fedora RPMs
OS: Linux
Status: UNCONFIRMED
Severity: normal
Priority: NOR
Component: config dialog
Assignee: kdepim-bugs at kde.org
Reporter: eric.brunet at lps.ens.fr
I am trying to configure an external editor for kmail, but the way the command
line is parsed makes things overly difficult. What I found out, by trials and
errors:
I one enters
xterm -fa 'Liberation Mono' ...
it will not work because the program runs with argv[1]="-fa";
argv[2]="'Liberation"; argv[3]="Mono'"
One should use xterm -fa "Liberation Mono" instead. Not intuitive.
I didn't find a way to specify a line number for the vim family of editors. The
command line argument is
vim +42 foobar
the following will also work in a shell
vim "+ 42" foobar; vim '+ 42' foobar; vim +\ 42 foobar
There is no way to make kmail generate one of those:
vim +%l %f fails because some space is put between variable interpolations and
one finally gets
argv[1]="+" argv[2]="42".
vim '+%l' %f fails because it gives argv[1]="'+" and argv[2]="42'".
vim "+%l" %f fails because variables are not interpolated between double
quotes: it gives argv[1]="+%l".
This is really annoying and contradictory to what one might expect. Am I
supposed to write a shell wrapper to send an external editor ? At some point,
kmail should stop trying to parse the string too much. It should just replace
%l %f and %w by their values, whereever they appear, and then simply call
system() to interpolate the arguments, interpret the quotes, etc. It would be
much less unexpected!
(By the way, why not add a %c to specify a column number ?)
Reproducible: Always
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Kdepim-bugs
mailing list