0

My programming text editor of choice is jEdit on my Mac, but I'm having trouble with a new version I installed.

Cyberduck (mac desktop FTP client) used to be able to launch files for editing. This has stopped working. It downloads the file to a temporary directory just fine. I can open the file, and in fact the FTP syncing mechanism still works fine (cyberduck detects file changes and sends them back) but the file no longer opens automatically. The 'edit' button in cyberduck, does the download, triggers jEdit to get the window focus, but the file doesn't get opened.

How does the file launching mechanism of jEdit work? How might I debug this new issue with it?

I tried setting cyberduck to launch TextEdit instead, and this work fine, so it's a problem with how jEdit launches.

Harry Wood
  • 2,220
  • 2
  • 24
  • 46

2 Answers2

1

I imagine that Cyberduck is supplying file parameters after the jedit binary invocation:

/path/to/jedit foo.txt bar.txt

or

java -jar /path/to/jedit.jar foo.txt bar.txt

Perhaps Cyberduck isn't supplying the full path to the file or perhaps the "current directory" of jedit doesn't see the file since it is a relative path.

When jEdit pops up, is the buffer that is open named whatever the Cyberduck file name is? If so, then it is probably relative paths vs absolute paths.

Perhaps try adding the -noserver flag to the jedit invocation.

Ross Rogers
  • 23,523
  • 27
  • 108
  • 164
  • Yes. cyberduck doesn't seem to offer any view or config of what's happening at the command line. I simply pick which mac application I want to edit files with. So yeah I imagine it's just running the application binary `/path/to/jedit foo.txt`. No way of telling if it's a relative path issue from cyberduck's end (although it all works with other editors). But when jedit pops up it doesn't open any file (stays showing whichever buffer was showing before). I can't see it reporting 'not found' errors anywhere. – Harry Wood Nov 24 '15 at 11:25
  • In that case, you could [wrapper the jedit invocation](http://superuser.com/questions/360247/run-a-shell-script-on-os-x-without-having-a-terminal-window-appear) – Ross Rogers Nov 24 '15 at 14:40
  • I tried making an 'automator' application with a 'Run Shell Script' action (saved as jedit-launch.app) and setting that as the Cyberduck editor. It lets me do that, but then always fails with an error _"Check the actionʼs properties and try running the workflow again."_ even for the simplest shell script I can imagine (just `cat`). I can run the app separately, but I guess cyberduck doesn't play nicely with automator apps. – Harry Wood Mar 01 '16 at 18:00
  • Maybe it has a timeout on subprocesses. Instead of `cat`, which actaully will hang waiting for input, try `echo hi`. – Ross Rogers Mar 01 '16 at 18:07
  • Have you tried just using jEdit as your SFTP browser? [There is a plugin](http://plugins.jedit.org/plugins/?FTP) – Ross Rogers Mar 01 '16 at 18:10
  • Thanks for your suggestions Ross. I've solved this now simply by upgrading Cyberduck. As I was playing around with automator I noticed MacOs has a curious command 'open' for running applications with an option to pass files to them (I mean "Applications" as in things with .app extension) I imagine Cyberduck launches the editor application via that kind of mechanism rather than a more straightforward `/path/to/jedit foo.txt`. So... something awkward going wrong with that I guess. Anyway all working again with a newer Cyberduck – Harry Wood Mar 02 '16 at 10:38
1

Solution: Upgrade to a later version of Cyberduck.

Upgrading to Cyberduck 4.8.2 fixed this for me. It now launches jEdit with the file as expected.

I'm not sure if I tried that back when I originally hit this problem, because the problem was triggered by an upgrade of jEdit (to jEdit version 5.3.0) but I think actually this was something going wrong with the way Cyberduck launches applications

Harry Wood
  • 2,220
  • 2
  • 24
  • 46