Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
base: 904b2bde0e05
Choose a base ref
...
head repository: NixOS/nixpkgs
compare: 09e349206d4b
Choose a head ref
  • 3 commits
  • 3 files changed
  • 2 contributors

Commits on Dec 10, 2020

  1. emacsWithPackages: mutate EMACSLOADPATH correctly

    An empty entry in EMACSLOADPATH gets filled with the default value.
    This is presumably why the wrapper inserted a colon after the entry it
    added for the dependencies.  But this naive approach wasn't always
    correct.
    
    For example, if the user ran emacs with EMACSLOADPATH=foo, the wrapper
    would insert the default value (by adding the trailing `:') even
    though the user was trying to expressly opt out of it.
    
    To do this correctly, here I've replaced makeWrapper with a bespoke
    script that will actually parse the EMACSLOADPATH provided in the
    environment (if given), and insert the wrapper's load path just before
    the default value.  If EMACSLOADPATH is given but contains no default
    value, we respect that and don't add the wrapped dependencies at all.
    If no EMACSLOADPATH is given, we insert the wrapped dependencies
    before the default value, just like before.  In this way, the wrapped
    Emacs should now behave as if the wrapped dependencies were part of
    Emacs's default load-path value.
    alyssais committed Dec 10, 2020
    Copy the full SHA
    0127013 View commit details
    Browse the repository at this point in the history
  2. emacsWithPackages: don't tell sub-Emacs about pkgs

    If I'm running an Emacs executable from emacsWithPackages as my main
    programming environment, and I'm hacking on Emacs, or the Emacs
    packaging in Nixpkgs, or whatever, I don't want the Emacs packages
    from the wrapper to show up in the load path of that child Emacs.  It
    results in differing behaviour depending on whether the child Emacs is
    run from Emacs or from, for example, an external terminal emulator,
    which is very surprising.
    
    To avoid this, pass another environment variable containing the
    wrapper site-lisp path, and use that value to remove the corresponding
    entry in EMACSLOADPATH, so it won't be propagated to child Emacsen.
    alyssais committed Dec 10, 2020
    Copy the full SHA
    23d4bfb View commit details
    Browse the repository at this point in the history
  3. Merge pull request #106486 from alyssais/emacsWithPackages

    emacsWithPackages: EMACSLOADPATH correctness fixes
    adisbladis committed Dec 10, 2020
    Copy the full SHA
    09e3492 View commit details
    Browse the repository at this point in the history