installing packages in cygwin without compiling from source - emacs

I have recently installed cygwin as I want to use (and learn) emacs and make it my regular text editor (as I use Notepad++ now).
The motivation for this comes from some sites like this:
http://batsov.com/articles/2011/08/19/a-peek-at-emacs24/
Also, I want to learn the internals of linux. I tried vi but its too CUIish for my taste. So I installed cygwin (with it's default emacs 23.3). But I wanted to try emacs 24 too so I want to install it side by side with cygwin's emacs 23.3. This can be done in a linux distro by installing emacs in /opt and making symlinks. But how do I install emacs binaries in cygwin?
From where do I get such binaries.
Currently I am using 'Emacs for Windows' seperately from cygwin, but it is hard to get it in a portable format. If I manage to install it in cygwin then my whole cygwin environment can be portable.
I generally try to install softwares so that they are portable as far as possible.

You can use the setup.exe that you used to install cygwin, to install Emacs as well.

Related

How to get Emacs on MINGW64 (Windows 10)

I currently use MINGW64 (Git Bash) as my terminal on my Windows 10 machine. It works great, I like it, but it only has Vim installed as an editor and I prefer Emacs. I'm unfortunately having a really awful time getting it to work in my terminal.
What's weirder still is that I have Emacs working in Cygwin64; but I don't like using that as my terminal. The most logical fix is simply that it Emacs to my Path ENV, however that doesn't seem to help (perhaps I'm doing that wrong?). I just get bash: emacs: command not found. I found a command to install it, using Pacman, however the Pacman command cannot be found either (which is weird because I thought that was installed by default with MINGW64.
Would love any and all help on this.
A couple of options:
Use Cygwin and the Cygwin emacs. Consider your Cygwin environment completely separate from Windows, so set your PATH from within the .bashrc, not within Windows. Launch emacs from the bash command-line.
Use the Emacs Windows binary distribution, but point to the utilities within Cygwin (there's an emacs package to help with this). Again, launch from the bash command line to inherit the bash environment within emacs.
Use the Windows Subsystem for Linux, with a Linux installation, and stick with emacs from there. You get the best of the Linux world, and access to the Windows directories and files as well.
My goto choice for MANY years was the Emacs Windows binary in conjunction with Cygwin. Once I started using the WSL, however, it just worked a lot better, in a clean Linux environment, and I could get terminal and GUI emacs (and other apps) running using the VcXsrv X Server. WSL has a version that directly supports X Windows, but I don't care for the windowing environment it uses, so I stick with VcXsrv.

Emacs: where is better have the executable file?

After many changes on my Debian Jessie, when I launch the command emacs I receive an error libgnutls.so.26 : cannot open shared object file: No such file or directory.
If I launch instead the command emacs24 everything is allright.
I have emacs in /usr/local/bin
I have emacs24 in /usr/bin.
So, for now I created an alias to launch emacs24 as emacs, but i don't like and, for example, i have to change the git setting to open the default ide cause emacs is not availlable yet.
The question is where is the correct position of the command ? I have to change my PATH ?
Consider that libgnutls.so.26 is not installable from apt.
Thanks for any suggest or advice.
This is very strange, because a simple sudo dnf install emacs should suffice (I use fedora, so you probably use apt-get instead of dnf). Maybe it is best to just reinstall emacs (backup your .emacs to be safe) using apt-get? Anyhow, in fedora the emacs executable is located at /usr/bin/emacs (which is also the one used in the terminal when you use the emacs command).

How to install Git for Cygwin?

I see some tutorials online but they only show how to install git onto Cygwin AS you are installing Cygwin. I already have cygwin installed and customized so I'd prefer not to repeat that step. How do I install the git framework so I can use it for github?
Thank you.
In the world of Cygwin, there is really no such thing as only installing a package AS you are installing Cygwin. Cygwin was inherently designed with a setup.exe to be run multiple times when necessary.
There are thousands of packages available in the Cygwin repo mirrors. From what you are saying, it sounds as if you had a single go-round with the setup file and then planned to never install any additional available packages or upgrade them in the future. This is what the Cygwin setup file is specifically used for.
If you don't currently have Git installed in your particular Cygwin environment, just run setup.exe again and select the package. It should automatically detect your current installation directory and package directory and previously-selected mirror. When you mark the Git package for installation, it will automatically download all dependencies, just like apt-get or any other *NIX package manager.
There is also an abandoned project called apt-cyg that I still use religiously, especially on remote systems over SSH in order to avoid the GUI setup.exe. apt-cyg is basically a shell script that will install your package directly from the command line, apt-get-style. It requires wget and subversion, but after the 30 seconds it takes to setup, you'd just run apt-cyg install git. It also installs dependencies, just like the GUI setup.exe.
There is also a similar alternative if you install Cygwin via Chocolatey package manager -- you can also install cyg-get (I believe it's called). The syntax is a bit different -- something like cyg-get git. I don't really like this method, because it differs from apt-cyg in the fact that it actually uses the setup.exe and just automates the process so that you don't have to click anything. I don't use this method, because the last I checked, Chocolatey only supported 32-bit Cygwin installs, which is also what the cyg-get package looks for.
apt-cyg may be abandoned, but it has yet to disappoint, and if I know what I'm looking for, I always prefer it over running the setup.exe for package installation.
It looks like the project has been picked back up and is under active development again: https://github.com/transcode-open/apt-cyg
It appears this version requires lynx to install. I don't know. I still just use the original version on Google Code that worked just fine the last I checked: https://code.google.com/p/apt-cyg/
Edit: There has been a new Cygwin package manager out for awhile called cyg-get that can be installed via Chocolatey.
I'm not sure if it only works for Chocolatey-installed Cygwin installations or not, as Chocolatey doesn't install Cygwin in the normal locations anymore by default. Feel free to comment, but cyg-get is now my Cygwin package manager of choice unless I'm running an older installation of Cygwin that was not installed by Chocolatey. I avoided it for a while because they only supported 32-bit installations, but I can confirm that Chocolatey now supports 64-bit installations of Cygwin, and the cyg-get package manager works perfectly with it. I have a function sourced from my ~/.bashrc where I can use either apt or apt-get (with or without the install parameter, and it will just call cyg-get.bat with the programs I have specified to install.
http://redmine.jamoma.org/projects/1/wiki/Installing_and_setting_up_GIT
By following the steps mentioned in the link for windows you can install git using cygwin

How do I put emacs menubar into Window title bar in Ubuntu 14.04?

While using Ubuntu 14.04, Menus are shown in window title bar. However if emacs is opened, menus are in the menubar as in older versions of Ubuntu or windows. Can I menus in window title bar.
This isn't a setting that you can flip in Emacs; it's something that is defined by the version of GTK against which Emacs is compiled (if any), likely some compile-time settings, and your Ubuntu settings. You could compile your own Emacs to enable this, but using a Personal Package Archive to install a pre-built version is much easier.
This PPA provides an emacs-snapshot package that works the way you want. This package is a bleeding-edge build of Emacs, updated frequently, and with some differences from the official Ubuntu emacs package. Most notably:
Little/no support for installing debian packages of elisp modules. Much of that support exists only in the form of a distropatch, which is not included here. So for example if you were to apt-get install yaml-mode, you would have to include "(require 'yaml-mode)" in your init, but you wouldn't be able to autoload yaml-mode like you may be accustomed to with the stable series. I am working on enabling this, but be warned that it is currently broken.
On the plus side, package.el works excellently and most of the packages you might want to install should be available either from MELPA or Marmalade or similar. In general, if you are using these snapshots you will want to M-x package-install foo rather than apt-get install foo.
If you want to use it, you can do something like this:
sudo add-apt-repository ppa:ubuntu-elisp/ppa
sudo apt-get update
sudo apt-get install emacs-snapshot
You should be able to have both versions installed concurrently. The one that launches by default when you run emacs will depend on your alternatives. You will also have commands named for each version in case you want to switch back and forth, e.g. emacs-24.4.50.
And if you want to just run the snapshot, that works well too. It's generally pretty stable.

Vim plugin does not recognize existing Perl support

I've been using the CoqIDE plugin for Vim on Linux machines for editing Coq files. Now I'm trying to install it on Windows 8. But when I try to source the plugin, I get
Your vim doesn't support Perl. Install it before using CoqIDE mode.
which is strange, because with :version I clearly see +perl/dyn included. Is this different from the +perl that I need?
I heard somewhere that you need to have Perl installed before Vim to get a Perl-enabled Vim, so I tried that as well. I uninstalled Vim, installed Strawberry Perl 5.18.2.2 (64bit), and reinstalled Vim. Still the same problem.
If the solution involves manually compiling binaries, I would really appreciate detailed instructions as I don't have any experience with it.
+perl/dyn just specifies that Vim has been compiled with dynamic Perl support; it doesn't yet check that the Perl library can be loaded successfully. To do that, try executing a Perl command, e.g.:
:perl VIM::Msg("Hello")
This probably yields on your system:
E370: Could not load library perl510.dll
Sorry, this command is disabled: the Perl library could not be loaded.
Next, you'd then have to investigate whether a proper Perl version has been installed and the DLL is accessible (though the PATH).
Download DWIMPerl for windows. I'm running win7 64 and gvim 7.4.2. Using strawberryperl and activeperl resulted in :echo has('perl') to yield 0. By switching to DWIMPerl (and ensuring my PATH env variables are proper) :echo has('perl') now yields 1 using the standard gvim distribution. This is important for vim extensions like dbext which require proper support for perl interfaces.