Closed stevengj closed 11 years ago
commit 2bfcc92a5499a736d5a434ab9616bdf32a8d5950 by @sje30 changed the Julia emacs mode to use
prog-mode
. Unfortunately, prog-mode was introduced in emacs 24, meaning that the Julia mode is broken for older emacsen.
Thanks; if you change "prog-mode" to nil does that work for you on Emacs 22,23? (define-derived-mode julia-mode prog-mode "Julia"
i.e. (define-derived-mode julia-mode nil "Julia"
If so, I can send a refined change. Stephen
It loads, but then I get another error as soon as I try to tab-indent something: Symbol's function definition is void: ignore-errors
.
You probably need to install emacs 22 on your machine and test it with that.
Ok, thanks. Can you revert the patch for now, as it sounds like I've not helped anyone yet with these updates!
In general, what is the expectation for the oldest Emacs that you'd like julia-mode to work on? 22.1?
MacOS 10.7 has emacs 22.1; I'm not sure if older emacsen are common. @ViralBShah?
22.1 is the minimum we should target for now, due to OS X 10.7. I guess we will find out if people are using linux distros with even older emacsen, once the patches land.
I think developing the Emacs mode against a newer version of Emacs (23 or even 24) is the right choice. Version 22.1 is 6 years old! There have been lots of improvements since then (including a package system to distribute modes). Apple has apparently decided not to ship any GPL V3 software so I guess they will never update their shipped version of Emacs. Plus, its a terminal only version (i.e., less friendly for beginners). They would do everyone a service if they just stopped shipping Emacs altogether.
Luckily, installing a newer version of Emacs on OS X is VERY easy. Macports works great and has several variants. I assume Homebrew does as well but I never tried. In addition, there are several binary versions that can be downloaded. These pages are useful:
http://wikemacs.org/index.php/Installing_Emacs_on_OS_X http://www.emacswiki.org/emacs/EmacsForMacOS
I do not think it is right to ask people to install a new version of emacs on mac to use julia. I myself use the system provided one in the terminal. I do agree that we may be better off if they stop shipping emacs altogether.
Can't we have some ifdefs
to maintain compatibility with the older emacs?
I do not think it is right to ask people to install a new version of emacs on mac to use julia. I myself use the system provided one in the terminal. I do agree that we may be better off if they stop shipping emacs altogether.
I am glad that someone else (thanks Bob) chimed in to support the idea of sticking to a more modern Emacs. I can see that Emacs 22.1 is a special case as it is installed by Mac OS X, but my intentions with julia emacs support were to keep the version in contrib fairly minimal (e.g. editing support), but to put most energy into the ESS version.
(I'm hoping to resend my patch to clean up the contrib/julia-mode.el but it might not happen now til after the vacation.)
In particular, as Bob mentioned, modern Emacs comes with a package manager which makes installing packages much easier.
Can't we have some
ifdefs
to maintain compatibility with the older emacs?
That can be done, but you end up doing a lot of reinventing of the wheel!
Emacs in a terminal is fine, but on my mac laptop, you get a nice modern Emacs e.g. from brew, using:
brew install emacs --with-cocoa
Stephen
I think it is perfectly ok to continue future development on a newer emacs. This may even convince me to get a newer emacs. :-)
Perhaps we can have an old and separate julia-mode-22.el for emacs 22.1 for Mac users to use by default (often a lot of people are just trying out julia for the first time, and just want something that works), and have new development focussed on a more modern emacs and ESS.
I think it is perfectly ok to continue future development on a newer emacs. This may even convince me to get a newer emacs. :-)
Great! Why not take a look at the following page, to tempt you:
https://github.com/emacs-ess/ESS/wiki/Julia
This is all Vitalie Spinu's (@vitoshka) hard work by the way.
Perhaps we can have an old and separate julia-mode-22.el for emacs 22.1 for Mac users to use by default (often a lot of people are just trying out julia for the first time, and just want something that works), and have new development focussed on a more modern emacs and ESS.
well, as the contrib/julia-mode.el works for 22.1, another solution is just to leave that. I'll monitor that file, and if I see any changes, I can see how to fold them into ESS. My hope would be that gradually keen Emacs/julia users would migrate to trying ESS.
Stephen
ESS doesn't support Emacs 22. Keeping stuff compatible was too much of a pain. Too many things were missing.
For best experience with ess-julia.el you will need Emacs > 24.1. Otherwise some features, like tab completion, will not work.
I like Viral's idea of moving forward with a Emacs 24+ version while keeping the old one around, for that reason that some people are stuck in situations where they can't easily upgrade from 22 (e.g. me working on my university's lab machines).
Splitting things seems like a good idea to me as well.
With such a simple project there is no much point in splitting it. It is easy to add the compatibility layer. For instance:
(unless (fboundp 'ignore-errors)
(defmacro ignore-errors (&rest body)
"Execute BODY; if an error occurs, return nil.
Otherwise, return result of last form in BODY.
See also `with-demoted-errors' that does something similar
without silencing all errors."
(declare (debug t) (indent 0))
`(condition-case nil (progn ,@body) (error nil)))
)
John Myles White notifications@github.com on Mon, 19 Aug 2013 09:30:18 -0700 wrote:
Splitting things seems like a good idea to me as well.
Reply to this email directly or view it on GitHub: https://github.com/JuliaLang/julia/issues/4010#issuecomment-22884802
If this is possible, that would be super. Not being an elisp expert, I could not quite tell what it would take.
commit 2bfcc92a5499a736d5a434ab9616bdf32a8d5950 by @sje30 changed the Julia emacs mode to use
prog-mode
. Unfortunately,prog-mode
was apparently introduced in emacs 24, meaning that the Julia mode is broken for older emacsen (e.g. MacOS X 10.7 ships with emacs 22).