conda-forge / emacs-feedstock

A conda-smithy repository for emacs.
BSD 3-Clause "New" or "Revised" License
6 stars 13 forks source link

No X emacs package? #33

Open peterjc opened 4 years ago

peterjc commented 4 years ago

Debian has apt-get install emacs for a full package with X, and and apt-get install emacs-nox for a version without any X support. Cross reference #11.

I would like to be able to do the same in conda, i.e. conda install emacs-nox and have a command line only emacs suitable for use on headless machines etc.

My personal use case is on macOS where strongly dislike the X windows emacs, and currently use the following as a workaround: alias emacs="emacs -nw" and export EDITOR="emacs -nw"

asmeurer commented 4 years ago

I also use emacs in -nw mode all the time (via an alias). I've used this package on headless machines before (docker containers) and it works just fine because it installs the xorg packages as dependencies (but it still actually loads in the terminal unless you have some kind of X forwarding enabled).

Is there an advantage to having a nox package that doesn't build the GUI at all, other than not having to use -nw all the time? And is there any conda-forge precedent on how the package should be named? Can conda be told that emacs-nox and emacs are mutually exclusive? I know there is features, but that seems to be out these days.

peterjc commented 4 years ago

I don’t know how this fits in the conda scheme - if there are no guidelines following the Debian naming made sense to me.

asmeurer commented 4 years ago

I didn't see anything in the conda-forge docs and I didn't see any packages with "nox". Maybe someone from @conda-forge/core can comment? I'm not even sure how to maintain such a thing? Is there a way to have two recipes in the same feedstock? Or do you have to use a separate branch?

isuruf commented 4 years ago

Is there a way to have two recipes in the same feedstock?

You can only have one recipe, but you can have variants. For example see https://github.com/conda-forge/blas-feedstock/blob/master/recipe/conda_build_config.yaml where we have 3 variants built from the same recipe. Values in that file are available as jinja variables in meta.yaml, so you could do,

package:
   name: emacs        # [with_x == "yes"]
   name: emacs-nox  # [with_x == "no"]

And then do the following for mutual exclusivity.

requirements:
  run_constrained:
    - emacs-nox 9999   # [with_x == "yes"]
    - emacs        9999   # [with_x == "no"]
asmeurer commented 4 years ago

I don't plan to work on this but you can go ahead and do it if you want @peterjc. You can also add yourself as a recipe maintainer if you want.