jEdit launching from cyberduck FTP on mac - macos

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.

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.

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

Related

I'm having issues with my Terminal

I'm having some issues trying to open up Atom in my terminal. I know I can open it manually but I'm trying to figure out what exactly is the issue.
This is what I'm getting when I try to open Atom in my Terminal.
Cannot locate Atom.app, it is usually located in /Applications. Set the ATOM_PATH environment variable to the directory containing Atom.app.
Anyone have an idea as to what the issue is???
If your application is called "Atom 2" or something, try this:
Open /usr/local/bin/atom
Change the line ATOM_APP_NAME=Atom.app to something like ATOM_APP_NAME='Atom 2.app'
lets get this fixed for you.
The error you're getting is indicating Atom isn't located where it should be, which is the Applications folder. Open up Applications and confirm it isn't there. If it isn't, locate where Atom is on your computer and drag it into the Applications folder. If you have Atom and Terminal both open, restart them. Then try opening Atom from the Terminal.

How does a non-admin Windows 7 user associate file types with GNU Emacs?

I have GNU Emacs 23.4 installed (or, rather, unzipped) into C:\Program Files (x86)\emacs-23.4 on my Win7 64-bit system.
It works fine except that when logged in as a non-administrative user I cannot associate files with the GNU Emacs executeables (I've tried to associate a given file type with runemacs.exe and with emacsclientw.exe). I can browse to the file in the associate dialog, but when I hit "open" it's just ignored.
It works totally fine when I'm logged in as an admin user. (And it worked fine in XP.)
I have found the following: http://answers.microsoft.com/en-us/windows/forum/windows_7-windows_programs/in-windows-7-how-do-i-change-the-open-with/c4a2ad7e-125c-4526-be20-c8f24f18fbfc but I'd prefer to not have to fiddle with registry entries if there's another way to accomplish this.
Any ideas?
If you had a previous version of emacs installed then windows will have associated the name emacsclientw.exe and runemacs.exe with the older version path. To successfully use a new version of emacs you have to remove those associations from the registry with regedit.exe.
Remove the entries:
HKEY_CLASSES_ROOT\Applications\emacsclientw.exe
HKEY_CLASSES_ROOT\Applications\runemacs.exe
Please also see
http://answers.microsoft.com/en-us/windows/forum/windows_7-windows_programs/how-do-i-remove-programs-from-the-other-programs/73a34fc6-b968-429f-9e5e-a0873d67eed9?msgId=1946ffef-cf76-49c6-adb8-0850e1c8610d
I've had the same problem and I've found that the registry entry has to be
emacs-path\bin\emacsclientw -n "%1"
After many attempts to make the GNU Emacs Windows build work to my satisfaction, I always come back to the patched EmacsW32 build. Among other things, it provides an installer that adds file associations and other shell extensions. I've found that it always handles the "Open With" problem correctly. Unfortunately, the latest patched build is of Emacs 23.1.
Same problem trying to associate Allegro Free Physical Viewer rev 16.6 to .brd files.
It turns out that the registry key had the wrong path to the application. I ran regedit navigated to:
HKEY_CLASSES_ROOT > Applications > allegro_free_viewer > shell > open > command
copied out the path and tried that in a CMD window and got path not found (bad path).
I navigated a explore window to the path of the application and copied that path into the registry "command" value, closed regedit, and it worked.

How to open Terminal at last open directory?

Every time I open my Terminal application at work it starts from a clean slate (e.g. it opens from the ~/ directory). But at home on my laptop my Terminal always remembers the last directory I was in (and all the commands on the screen) and displays them to me.
I'm trying to get this to happen when I'm at work but I can't find any information on it (I've no idea why or how my laptop managed to set itself to work that way?).
The only thing I've found out is that I can change the preferences so the Terminal executes a particular command when the app is started up, but that's not quite what I want (simply because I'm not sure what command I would run to get the Terminal to go to the directory I was looking at when I had the Terminal open last).
Any ideas?
Thanks!
Since you're using Lion, it should do that automatically.
You might have disabled the Resume functionality systemwide or in Terminal.
Make sure it's enabled systemwide. You can also try to manually enable it for Terminal:
defaults write com.apple.Terminal NSQuitAlwaysKeepsWindows -bool true

How can I uninstall NetBeans on a mac?

I currently have NetBeans 6.5 installed on my mac running leopard.
I searched Google on how to uninstall it and the NetBeans website says to right click on it, select "Show Package Contents" and the uninstaller should be there, but it isn't.
How can I completely uninstall NetBeans in this situation?
Thanks!
Compiled List
Here is a list of the nooks and crannies where you need to find and delete files and folders. I compiled this list from the multiple sources listed on this page.
My list here was true for me in Mountain Lion 10.8.5 with NetBeans 8.0.2. Of course things may change in the future or past.
Some may not be necessary for some upgrades between versions of NetBeans. But if you want a truly fresh install, here you go.
You could write a shell script to do this deleting. But I just do it by hand as this Spring-cleaning is not a regular occurrence.
I suggest making a back-up copy of each of your projects before doing an upgrade of NetBeans.
Home folder
Some hidden folders may appear directly in your home folder. The . as first letter hides the file/folder by default. To permanently show such files/folders in the Finder, read this or this.
~/.netbeans-derby
In later versions of Mac OS X, the Library folder is hidden from your home folder. Also not displayed on the Go menu. To expose, hold down the Option key while choosing Go. A Library menu item appears, about in the middle of the menu.
~/Library/Application Support/NetBeans/
~/Library/Caches/NetBeans/7.4
Root folder
/Applications/NetBeans
/private/var/db/receipts/org.netbeans.*
Note that NetBeans leaves some hidden configuration directories in your home directory. You might want to delete those too:
.asadminpass and .asadmintruststore - directories that contain stuff for Glassfish (Java EE application server)
.netbeans and .netbeans-registration - NetBeans configuration directories
.nbprofiler - something from the NetBeans profiler
In a terminal window, you can list all files and directories (including hidden ones) with ls -la, and you can delete them with for example rm -rf .netbeans (BE CAREFUL with that last command, it deletes stuff so that you can't get it back).
The instructions on this page say that dragging the Netbeans application out of the Applications folder and into the Trash is sufficient.
Barry Brown's answer is correct; I would add how this is handled by NetBeans. If you look under the NetBeans installation directory, then under bin, you will see a shell script named "netbeans," which locates your JDK installation when NetBeans is started.
There are third party "Uninstaller" utilities for Mac, but dragging an application from "Applictions" to the trash bin is typically how application removal is done.
I think you can uninstall it the same way it is done on Ubuntu as explained in this sample post.
I'm not a Mac user myself, so I may be wrong but it's worth posting this here in case there are Linux users in the house.
Very helpful but if like me you get stuck with a blank 7.1 project because none of the settings ever import it could be that like me you are upgrading a mac osx from 7.0rc1 or 7.0rc2.
To fix this or just re-update your settings.
Open Telnet session.
cd /Users/{user}/. netbeans
ls
I had this...
my-MBP:.netbeans {my}$ ls
6.9 7.0rc2 7.1
my-MBP:.netbeans {my}$
I then removed the duff 7.1 settings and manually moved in the 7.0 settings with
rm -R 7.1
cp -rf 7.0rc2 7.1
When opening up NetBeans next time it will take 2-10 minutes to fully rescan & reindex all but works perfectly after this.
HTH
Simon.

Emacs in Windows

How do you run Emacs in Windows?
What is the best flavor of Emacs to use in Windows, and where can I download it? And where is the .emacs file located?
I use EmacsW32, it works great. EDIT: I now use regular GNU Emacs 24, see below.
See its EmacsWiki page for details.
To me, the biggest advantage is that:
it has a version of emacsclient that starts the Emacs server if no server is running (open all your files in the same Emacs window)
it includes several useful packages such as Nxml
it has a Windows installer or you can build it from sources
And concerning XEmacs, according to this post by Steve Yegge:
To summarize, I've argued that XEmacs has a much lower market share, poorer performance, more bugs, much lower stability, and at this point probably fewer features than GNU Emacs. When you add it all up, it's the weaker candidate by a large margin.
EDIT: I now use regular GNU Emacs 24. It also contains Nxml, can be installed or built from sources, and with this wrapper, the Emacs server starts if no server is running. Cheers!
Note that GNU Emacs for Windows comes with two executables to start Emacs: "emacs.exe" and "runemacs.exe". The former keeps a DOS-Prompt window in the background, while the latter does not, so when if you choose that distribution and want to create a shortcut, be sure to launch "runemacs.exe".
Carl
Easiest way to find where the user init file is:
C-h v user-init-file
Easiest way to open it is (in the scratch buffer):
(find-file user-init-file)
and hit C-j to eval
Well, I personally really like what I have been using since I started with Emacs, which is GNU Emacs. It looks like it is built for windows too. That link also answers your .emacs file question. Here is a place you can download it. You should probably get version 22.2 (the latest).
If this is your first time, I hope you enjoy it! I know I absolutely love emacs!
I run it under cygwin. That also gives me a Unix-ish environment for shelling out commands with meta-!
I use a vanilla version of emacs. In my experience, this is very stable, simple, does everything I need, and doesn't add a bunch of bloat that I don't need. The .emacs file can be placed in C:\Users\YourName if the HOME environment variable is set. This is a great way to handle it because it works on a user basis and mimics emacs behavior on Linux. You can download the zip from any gnu software repository mirror in the emacs/windows folder. You want the file that is named emacs-xx.x-bin-i686-pc-mingw32.zip.
There are some great instructions for configuring emacs for windows here. Basically, "installation" boils down to:
Download emacs from a gnu mirror at emacs/windows/emacs-version-bin-i686-pc-mingw32.zip, and extract the zip to an appropriate folder. Preferably C:\emacs to avoid spaces in the filename.
Set the HOME environment variable to C:\Users\username (or whatever you want). Make it a user-only variable (if it is username-specific). This is where your .emacs file goes.
If you want a start menu or desktop shortcut, create a shortcut to bin/runemacs.exe.
Add c:\emacs\emacs-xx.x\bin\ to your path (user or system), so that you can run it from the command line.
Also, you can consider emacs-w64 for 64bit windows systems:
emacs-w64: http://sourceforge.net/projects/emacsbinw64/
See http://www.gnu.org/software/emacs/windows/ntemacs.html. Section 2.1 describes where to get it, and section 3.5 describes where the .emacs file goes (by default, in your home directory, as specified by the HOME environment variable).
I've run both GNU emacs and Xemacs on windows. I used to use it as my primary editor, email client etc, but not it's "just" an editor.
When I recently reinstalled to Vista I installed the latest GNU version. It works fine. So does Xemacs, but it does look like GNU have got their sh*t together so Xemacs isn't as compelling anymore.
I suggest you to use development version of GNU Emacs 23, which is pretty stable and to be released relatively soon. You can get weekly binary builds from the link below.
Latest GNU Emacs as a zip archive
I have a portable version with .emacs configure ready, which setup org mode, I-do, etc. It also included org sample file. I think that is a better start point for new comers.
Basically run with runemacs.bat and everything is ready.
http://nd.edu/~gsong/portable_emacs.html
I've encountered this problem, and discovered the fault (at least in my case) to be the existence of c:\site-lisp\site-start.el, a file that was created when EmacsW32 was installed, and which was not removed when I uninstalled it. (Vanilla GNU Emacs for Windows has c:\site-lisp in its load-path, and will try to load this file, which somehow winds up triggering that error.)
Solution: removing that whole directory (c:\site-lisp) worked for me, but you should just be able to remove the site-start.el file.
The best place to start, to get an MS Windows binary for GNU Emacs is ... GNU Emacs:
http://www.gnu.org/software/emacs/
(Oh, and how did I find that URL? From the Emacs manual, node Distribution. If you have access to Emacs anywhere, that's the place to go for such information.)
On that page you will see everything you need to know about obtaining Emacs. In particular, you will find a section called Obtaining/Downloading GNU Emacs, which links to a nearby GNU mirror. Clicking that link takes you to a page of links that download all Emacs releases since release 21.
More imporantly here, on that page of links you will also see a directory link named windows. Click that to get a page of links to Emacs binaries (executables) for MS Windows. That is the page you want.
Knowing the above information can help when you need to find the page again, if you haven't bookmarked it. But here is the final URL, directly: http://mirror.anl.gov/pub/gnu/emacs/windows/
When forced to use Windows, I ...
Download "Emacs for windows", and save it in some directory (henceforth referred to as EMACS_SOMEWHERE)
Drop a .cmd file in "Startup" to map, "My Documents" to H: drive with subst, or if "My Documents" resides on a remote server, I use the "Map Network Drive" thing in Explorer to have "My Documents" named H:. Then I create an environment variable named HOME in Windows and give it the name of "H:\". Now I can drop my .emacs file in "My Documents" and it will be read by emacs when it launches.
Then I create the H:\bin directory. Then I add "H:\bin" to my Windows "Path" environment variable.
Then I create a H:\bin\emacs.cmd file. It contains one line:
#call drive:\EMACS_SOMEWHERE\emacs-23.2\bin\emacsclientw.exe --alternate-editor=c:\programs\emacs-23.2\bin\runemacs.exe -n -c %*
This is a fair bit of work, but it will enable me to run the one and same emacs from either a windows command prompt or from a cygwin command prompt, provided that /cygdrive/h/bin is added to my cygwin PATH variable. Haven't used this setup for a while but as I recall, when I call the emacs.cmd with a new file over and over, they all end up being buffers in the one and same emacs session.
There was https://bitbucket.org/Haroogan/emacs-for-windows with the latest Emacs 25, but the whole page has been removed.
The benefit of this build and the emacs-w64 above is that they come with jpg, png, tiff DLLs as well as lxml DLL, which is needed for the new eww web browser.
I prefer to run Windows 10 + VcXsrv + Emacs 25 client in WSL. Emacs is my shell.
To access the .emacs file for your profile the easiest way is to open up emacs. Then do C-x C-, type in ~USERNAME/.emacs (or you can use init.el or one of the other flavours). Type your stuff into the file and C-x C-s (I think) to save it.
The actual file is located (in Windows XP) in c:\Documents and Settings\USERNAME.emacs.d(whatever you named the file), or the equivalent spelling/location on your system.
You can download GNU Emacs NT from here direct. It works fine in windows, make sure you create a shortcut to the runemacs.exe file rather than the emacs.exe file so it doesn't show a command prompt before opening!
XEmacs is less stable than GNU Emacs, and a lot of extensions are specifically written for GNU. I would recommend GNU > X.
You can place the .emacs file in the root of the drive it's installed on. Not sure whether you can add it elsewhere too...
Im using emacs32, I only have one problem with it really:
https://stackoverflow.com/questions/3625738/comint-previous-matching-input-in-emacsw32-is-not-interactive
If You Mean Emacs as Latex Editor for Windows 7.
Emacs4LS (Emacs 4 Latex Support under Windows 7) for newcomer for Emacs.
http://chunqishi.github.io/emacs4ls/
Easy Steps to Install.
Plugins Built-In.

Resources