How can I install an X11 version of Emacs on MacOS Catalina? - macos

I'd like to install an X11 version of Emacs on Catalina, but haven't found anything online that tells me how I might accomplish this.
The following worked for some previous versions of MacOS, including, I believe Mojave.
$ brew tap d12frosted/homebrew-emacs-plus
$ brew install /emacs-plus --with-x11
Unfortunately, at the moment, if you do this, you get only the "app" version of Emacs, not the X11 version.
The default Emacs recipe that comes with Homebrew does not currently support the "--with-x11" or "--with-x" option.
Is there another Emacs cask somewhere that supports X11?
P.S. I know that I could try to build Emacs directly from the Emacs sources myself, but from past experience, I am afraid that there be dragons along this path.
P.P.S. I seem to have gotten a working version of an X11 emacs installed by rsyncing the directory /usr/local/Cellar/emacs over from a Mac that is running Mojave. But clearly this is less than ideal, so I'm still looking for how I might accomplish this the "right" way.

I maintain my own brew formula for X11 emacs that you may be able to use. I wrote about this in a blog entry here.

This isn't really a programming question -- probably better for serverfault.com or unix.stackexchange.com, but I'll post this reply here anyway.
My last attempts to try to use homebrew to install X11 capable apps, especially Emacs, failed. Once upon a time I had edited the homebrew recipe to make it compile a local version with X11 support, but I was giving up on maintaining that against the quickly moving target of homebrew and the mass migration of homebrew away from supporting X11.
So, really your best option is to build Emacs from source and install it.
(I've moved entirely away from homebrew as a result -- I only use pkgsrc now, and that gives one an easy way to reliably build Emacs with X11 support and manage all the dependencies, etc.)

Related

Brew installs not appearing in /usr/local/bin

I've installed a package using brew to a new Mac, imagemagick, and carried over a number of utilities that look for convert, a part of imagemagick in /usr/local/bin. These utilities can't find convert, using which, it's in /opt/homebrew/bin/convert.
In addition, I'm trying to get vscode to work from a command line. It's set up but running code gives the error ./MacOS/Electron: No such file or directory. Electron has been installed using brew but can only be found, again, in /opt/homebrew/bin/convert.
Any thoughts?
Since Homebrew v3.0.0, the default prefix is different depending on the chip architecture. The defaults are the following:
/opt/homebrew on Apple silicon
/usr/local on Intel
The main reason for this change was for Rosetta 2 compatibility.
It appears that you're trying to transition from an Intel machine to an Apple Silicon one. The simplest way to do this might be to reinstall all the formulae again via brew bundle. This shouldn't take very long thanks to the use of pre-built binaries.
Alternatively, you can always manually add /opt/homebrew/bin to your PATH (/usr/local is already in path).

Can I install emacs 24.5 on OS X El Capitan without deleting the native OS X emacs?

I want to install the latest version of emacs, but if I do this will it be in conflict with the version that comes pre-packaged with os x? Do I need to delete the native emacs? Also, it seems emacsforosx.com is a popular option, but I lot of people swear by homebrew... why would I go with one option over the other?
There is no reason to remove the system-supplied Emacs; any well-behaved, properly packaged third-party version will install fine alongside, not over, the system binaries and libraries.
Installing a current version of emacs is normal practice because the OSX provided version is outdated. You have a number of options, but I've found using the 'homebrew' method the easiest.
Due to changes in OSX 10.11, you need to take some additional steps when installing homebrew. If you already have homebrew installed, you will probably need to 'fix' the permissions on /usr/local. If you don't have homebrew installed, then there are some additional steps you will need to take to create the /usr/local path. This is documented on the hombrew site at El Capitan and Homebrew

How do you install the Haskell Platform over a previous install?

I've been working with Haskell lately, and installed gtk2hs (a gtk library for Haskell) a few days ago using MacPorts. For some reason, MacPorts saw fit to install GHC 6.10 over my previous GHC 6.12 install, but I didn't really care.
Now I find myself desiring the improved parallelism support of the latest Haskell Platform, so I installed it today, and it installed successfully - except that when I type in "ghc -v" in Terminal, I am informed that I have GHC 6.10 still.
I have tried using uninstall-hs, and it informs me that I have three Haskells on my system: versions 6.12, 6.12.3, and 7.04. I'm not sure how that 6.12.3 showed up, and what happened to the 6.10? Most importantly, how can I start running version 7.04? Thanks in advance for your help!
You should completely purge your MacPorts install of GHC and your current Platform installation and install the Haskell Platform directly with the OS X installer. After that, future versions of the Haskell Platform can be upgraded to cleanly simply by installing them.
The following command should remove your MacPorts GHC:
$ sudo port uninstall --follow-dependents ghc
You might want to execute something like find /usr /opt/local -name '*ghc*' after uninstalling everything to check that there's no remaining traces.
To really clear out the old install, you've got to go in and delete things by hand.
This will be very useful: Everywhere that GHC/Haskell Platform installs
Might want to look here also: http://www.vex.net/~trebla/haskell/sicp.xhtml

How to configure MacPort to pick already installed packages

I have recently shifted to OSX environment, so don't know much about MacPorts.
Is there a way to tell MacPorts to pick already installed packages. For instance to install
sudo port install meld
its requiring hell lot of packages, including python2.6. But I already have python2.6 installed.
No there isnt. If you want to link against system installations then use Homebrew or compile manually yourself. Personally i prefer Macports because its completely isolated. Ive got plenty of disk so having duplicates doesnt bother me.

confused about macports

I am using MacBook Pro Mac OS 10.5 with related version of XCode. I am new to this development environment. I am learning macports, and I read information about macports from http://www.macports.org/. But I am still confused what macports is after reading information from this site.
I am previous working on Windows and Linux, could anyone let me know what macports is (in easy words) and what is the similar item on Windows/Linux?
thanks in avdance,
George
macports is a way of getting executables and other compiled code installed on your computer without having to work out the details of compiling/linking each apllication.
It is equivalent to a package manager under Linux and other Unicies. There is no direct equivalent under Windows.
It is just a convenient way to install a lot of *nix soft on your mac book. They are installed separately (not overwriting) from binaries/daemons/libs already installed on your mac (by default in folder /opl/local). Also they are much fresher than those installed on your mac.
For example 10.6 ships with bash 3.2, but after running sudo port install bash, you will get version 4.x (to make it your default shell add /opt/local/bin/bash to file /private/etc/shells, run chsh -s /opt/local/bin/bash and reopen terminal).
Note other os x package managers: fink and homebrew (superuser question)

Resources