all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Noam Postavsky <npostavs@gmail.com>
To: Kaushal Modi <kaushal.modi@gmail.com>
Cc: Drew Adams <drew.adams@oracle.com>,
	Emacs developers <emacs-devel@gnu.org>
Subject: Re: Default share/ and lisp/ directories?
Date: Tue, 20 Feb 2018 16:06:54 -0500	[thread overview]
Message-ID: <CAM-tV-_2g0SUw=AXZ73ePFUS7DP=X4vryAe1iiRzeBe0J+xkYQ@mail.gmail.com> (raw)
In-Reply-To: <CAFyQvY3qrMGNuXaZZr8VR+tBSvYN+33CJFsJ0CZ5TZVLFguF6w@mail.gmail.com>

On Tue, Feb 20, 2018 at 3:27 PM, Kaushal Modi <kaushal.modi@gmail.com> wrote:

>> Use (file-name-directory (directory-file-name (expand-file-name file)))

> Thank you. I was aware of that, but was just being plain lazy.. I didn't
> consider refactoring my whole config to fix that until now[1], so thanks :)

For those of us who are even lazier, what's wrong with

(defvar share-dir (expand-file-name "../share/" invocation-directory))
(defvar lisp-dir
  (expand-file-name
   (format "../share/emacs/%s/lisp/"
           (pcase (version-to-list emacs-version)
             (`(,major 0 ,micro . ,_) (format "%d.0.%d" major micro))
             (`(,major ,minor . ,_) (format "%d.%d" major minor))))
   invocation-directory))



      reply	other threads:[~2018-02-20 21:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-20 18:09 Default share/ and lisp/ directories? Kaushal Modi
2018-02-20 18:48 ` Drew Adams
2018-02-20 20:27   ` Kaushal Modi
2018-02-20 21:06     ` Noam Postavsky [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAM-tV-_2g0SUw=AXZ73ePFUS7DP=X4vryAe1iiRzeBe0J+xkYQ@mail.gmail.com' \
    --to=npostavs@gmail.com \
    --cc=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=kaushal.modi@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.