EDITOR variable imprperly used

Bug #787487 reported by Łukasz Stelmach
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Expired
Low
Unassigned

Bug Description

By convention EDITOR variable contains pathname of an editor used to open text files. Also by convention it should be editor capable of running without X11. In Gentoo for example its default value is "/bin/nano" so it is available even when the system is not fully operational. KiCad should either:

+ lauch `xterm -e $EDITOR'
+ allow for configuration of editor command
+ (imho the best option) use some file-type+application association system, eg. xdg-open command.

Revision history for this message
Martin Errenst (imp-d) wrote :

Running r4711 (and lower I assume), one can configure the text that should be used, so you second option is implemented.

Changed in kicad:
status: New → In Progress
Revision history for this message
Martin Errenst (imp-d) wrote :

If not changed by the user, KiCad keeps nano (Gentoo user here too :D) set. But it'll be unable to determine if it's a CLI or GUI program it should launch - so the first option would give the user an extra terminal (iff xterm is installed!). So this option is IMHO out of question.
Dunno about the third one.

Revision history for this message
Blair Bonnett (bcb) wrote :

Is there still a problem here, or can we close this report?

Changed in kicad:
status: In Progress → Incomplete
Revision history for this message
Łukasz Stelmach (steelman) wrote :

It appears (because I haven't built and ran the code) that Jerry Jacobs has improved the situation slightly by introducing "open" and "xdg-open" in his commit from 2011-05-12 (or 2011-04-12). That's good and increases a chance to launch a sensible editor if the EDITOR variable is not set.

However, the EDITOR variable, if set, is still used improperly as I have described above. For example in eeschema/dialogs/dialog_bom.cpp file in OnEditPlugin() method the value from the environment variable (GetEditorName()) goes straight to ExecuteFile where combined with a list of hopefully proper directories is passed to wxExecute(). This still makes kicad fail to do what a user who has set EDITOR expects, unless the editor pointed by the variable is an X11 app. Most editors which end up in users' EDITOR variable like nano or pico or vi aren't X11 apps but require a terminal (e.g. xterm) to work under X11.

Changed in kicad:
importance: Undecided → Low
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for KiCad because there has been no activity for 60 days.]

Changed in kicad:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.