From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.devel Subject: Re: Default share/ and lisp/ directories? Date: Tue, 20 Feb 2018 16:06:54 -0500 Message-ID: References: <31b4fa70-3cbf-4d75-8d62-4f27c8272d49@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1519160800 6079 195.159.176.226 (20 Feb 2018 21:06:40 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 20 Feb 2018 21:06:40 +0000 (UTC) Cc: Drew Adams , Emacs developers To: Kaushal Modi Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 20 22:06:36 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eoF7S-0001Cs-0J for ged-emacs-devel@m.gmane.org; Tue, 20 Feb 2018 22:06:34 +0100 Original-Received: from localhost ([::1]:57779 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eoF9U-0003jW-8B for ged-emacs-devel@m.gmane.org; Tue, 20 Feb 2018 16:08:40 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40529) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eoF7p-0002Vn-5e for emacs-devel@gnu.org; Tue, 20 Feb 2018 16:06:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eoF7o-0004JU-6S for emacs-devel@gnu.org; Tue, 20 Feb 2018 16:06:57 -0500 Original-Received: from mail-wr0-x236.google.com ([2a00:1450:400c:c0c::236]:35323) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eoF7o-0004I9-09 for emacs-devel@gnu.org; Tue, 20 Feb 2018 16:06:56 -0500 Original-Received: by mail-wr0-x236.google.com with SMTP id l43so18306134wrc.2 for ; Tue, 20 Feb 2018 13:06:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=T/FElIdydXuXOU+zkM6eXz0gUWYUAf0k8pT+DLmLbaY=; b=Zv3DKqXYwYAKZHPU7/fWlgmkpiC834PjWfoYLZQFjR/5N0mhcSewDeEue/KQmnPADc aaG2QghSpkupQzWLS8Oqg+l5pUUZ/PlSho017piFvKkHYfPJbVOiDNqo13grmvM1k8+t StDUVkXpFNgxNUEtfDjx5b8HfM3fzKBRtqMfNVTGu+QhjhV5EZiRTb91UOVVjh+yQ8cW RLBL6hKYAhXqk9C+RAykvbh2ZGL+qQudRvPcAnSFOSBZ9eXEFWk0OjcCLJ2pvqZUhHSc +ugZVAmynylNseDsR9JXVisiYdAwSssD4Skkf4qiqD9Nv2KKLExm8LKcLEZDMQWpra38 aSXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=T/FElIdydXuXOU+zkM6eXz0gUWYUAf0k8pT+DLmLbaY=; b=tFO2FbxF8f3TAOX9uuazyZPD9mOmEPS+r49zLLEwV4To7d5z3V0C/h9YEURnC9d055 5PgDEDE5zlLbgnQ1uRGS7j/7n6hIe/Z7rAv53A768D2pDqbY/VzXR46ocQvSbdQ4ZRQj ZxzBCjRF4uSBmYqmEX98wt85zCdnUGH6KC/jfZ+dXaJb7+ih4bdoJNG7kRzwsAPhjAAv kKJ57CBPWB1t1HqZBkoSUBQLsXVKv8lw9WLxQg1cQ/ATvmlbfBnOh017JYBCdT7LSGlN GvQBByaynZreeUQTI4aFwKlfd0TmsWRCVq6k6WbqS2S5odBEdsEOYi+HlUwK99OtdBRa B6Dg== X-Gm-Message-State: APf1xPBTUNqcL45JkMUv9MN3wkkKDXV16rcot3l6HVdfcqZbZRGRZVCX iRGvmvKJ7Inj4V61rSnVHjexthtP8hZPwLW9C5s= X-Google-Smtp-Source: AH8x227xusw6h5/VFfPQO1T1PobbD+p1pbxlHC5TvYXo8+3lV2E2MhdSdEDBs4vjmSIJX4yJwXOCQkOMxH7VgeOk8pI= X-Received: by 10.223.160.100 with SMTP id l33mr842181wrl.51.1519160814561; Tue, 20 Feb 2018 13:06:54 -0800 (PST) Original-Received: by 10.223.182.69 with HTTP; Tue, 20 Feb 2018 13:06:54 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::236 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:222949 Archived-At: On Tue, Feb 20, 2018 at 3:27 PM, Kaushal Modi 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))