-
Notifications
You must be signed in to change notification settings - Fork 193
Conversation
Can you also update this to install the latest version of stable Org? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't agree with the choice of PPA here - I'd rather have a non-patched version from official repositories without the major version hardcoded into the package name. I do understand the motivation, since distro versions of Emacs typically lag behind the current Emacs version, but I see this causing more problems than it solves.
Other than that, this LGTM.
Dockerfile
Outdated
USER root | ||
RUN add-apt-repository ppa:kelleyk/emacs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a pretty non-standard version of Emacs - it's a third-party (AFAICT, neither the Ubuntu team nor the Emacs maintainers are involved at all), patched version that releases newer versions of Emacs than those available in official Ubuntu repos. If this PPA is ever abandoned, we'll need to find a different one. If Ubuntu updates to the latest version of Emacs, we'll likely want to switch to their version anyway. Using the distro versions off the bat sounds like a better idea to me, and v25.2 isn't all that different from v24.4 (which is, I believe, the current version in the official Ubuntu repos).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
v25.2 isn't all that different from v24.4
v25.2 has a lot of changes since 24.4. See NEWS.25
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a ubuntu user, I'm happy to hear any suggest on how to install emacs 25 on ubuntu officially.
AFAICT ubuntu 14 officially only provide emacs 24.3, but most moden emacs packages require at lease 24.4.
CMIIW i think kelleyk/emacs just provide deb pacakge, it's still build from official emacs source
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True - I meant changes that would affect using Emacs as a build tool, though that's admittedly hard to predict. If the 24->25 upgrade is really affecting build, would it be possible to use the emacs25
package used in newer Ubuntu versions (see https://packages.ubuntu.com/zesty/editors/emacs)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the 24->25 upgrade is really affecting build
sorry I'm not following, this is not an upgrade, the Ubuntu 14 docker don't have any emacs preinstalled, how it's gonna affect v24 build?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like orgmode should work just fine with v24.4:
http://orgmode.org/Changes.html
From now on, Org expects at least Emacs 24.3, although Emacs 24.4 or above is suggested.
I'd rather use the distro version if the library works the same. We don't need all the emacs features in this case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, v24.4 would work just fine, but distro version is 24.3, which is too old and useless, even some common package like scala-mode
or clojure-mode
(for code highlight in org export) will not work.
to get 24.4 or above IMO there're 3 options:
- ppa
- build from source code(there's already build-essentials installed, so I guess it would just work)
- change the base image from Ubuntu 14 to 16, which have emacs 24.5 included(but could be big impact to other packages in build-image)
what would you prefer? @calavera
Dockerfile
Outdated
USER root | ||
RUN add-apt-repository ppa:kelleyk/emacs | ||
RUN apt-get -y update | ||
RUN apt-get -y install emacs25-nox |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line will have to be updated when Emacs gets past 25 (though that's admittedly a ways out at the moment). IMO it'd be better not to use a package with the major version hardcoded. Also, does this install the binary as emacs
or emacs25
?
Also, this is the nox
version, which drops X dependencies. I'm not aware of any implications this would have on somebody using Emacs as a build tool, but this is not the most common build configuration. I think that's fine, since I can't imagine anybody needing graphical frames as part of an automated build, but I wanted to note that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want the nox
version here.
org is a package, should be installed as package by user in Cask file just like ruby or any other lang, you define packages in Gemfile, not when you install ruby |
@kaushalmodi while Cask files are not what I'd personally recommend (it's infrequently updated, written in Python instead of Elisp for no real reason, and I don't have a great experience working with it), Emacs also has built-in packaging utilities, which include the ability to upgrade to a newer version of org. I personally use use-package with quelpa and quelpa-use-package, but the packaging facilities built into Emacs are decent as well. I don't see a need to upgrade Org in the Dockerfile, particularly since people using the default version may see their scripts break. |
Do you know about EVM? Here is how to use it in travis: before_install:
- curl -fsSkL https://gist.github.com/rejeep/ebcd57c3af83b049833b/raw > x.sh && source ./x.sh
- evm install $EVM_EMACS --use --skip
- cask
env:
- EVM_EMACS=emacs-25.1-travis
- EVM_EMACS=emacs-25.2-travis
- EVM_EMACS=emacs-git-snapshot-travis |
@DamienCassou
distro version is 24.3, most modern emacs packages require at lease 24.4 @Benaiah configure it as the environment variable |
I'd love to see Emacs being available on Netlify even more now that I have a stable blogging flow of exporting Hugo posts directly from Org (https://ox-hugo.scripter.co). Any update on this please? |
@Benaiah It would be nice if a minimal emacs binary is available on Netlify as we won't need GUI frames, etc. .. just enough to run it in batch mode, and load/run other libraries like org-mode. Emacs is more than a text editor.. it's a lisp environment. |
@kaushalmodi to be clear - I'm totally in favor of having Emacs support (I've used it as an SSG myself in the past). The only major issue I originally had with this PR is that 24.4 (which is different from 24.3 in very significant ways) isn't available from the default Ubuntu repos for our version of Ubuntu, but I'm not comfortable building Emacs out of a random PPA. I suggested above (in the discussion on the review comments) that we see if we can get Emacs 25 by pulling it from the source of a newer Ubuntu version - that seems like the simplest option to me. Building from source (as the PR is currently doing) is also acceptable, but @calavera would have to chime in on how feasible that is within our infrastructure, as I'm not an expert on it. |
Dockerfile
Outdated
RUN apt-get -y update | ||
RUN apt-get -y install emacs25-nox | ||
|
||
RUN wget http://ftpmirror.gnu.org/emacs/emacs-25.2.tar.gz && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Benaiah Looks like PPA is no longer used in the updated PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll test it out this week with a bunch of other updates we have in the queue to production. |
Very cool! While you are testing it, can you change that URL to get Emacs 25.3 instead of 25.2? @jcouyang Can you update the PR? |
Thanks @calavera, looking forward to hearing good news from you soon. |
This seems to be working on my tests. I'm going to merge it, but we won't deploy it just yet. I'll leave another comment here when that happens. |
@calavera Looks like now |
As a Emacs user, I'm using orgmode to generate
my blog. And, I really like switch to netlify from github page
and circleci(emacs will compile orgmode files to html on the CI).
I've really like to have Emacs installed as part of netlify's build
tool(hugo can support partially orgmode parsing, but not native completely
support like emacs), and Cask as package management tool for Emacs.
So I can compile
Emacs orgmode files with command such as
cask exec emacs --batch -l my-emacs-config.el -f org-publish-all
on netlify build, just like any ruby commandbundle exec blah