From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.bugs Subject: bug#40099: 28.0.50; [feature/native-comp] Different working dir of .eln files is not expected by pdf-tools Date: Wed, 18 Mar 2020 23:54:46 +0800 Message-ID: <87lfnxd5fd.fsf@localhost> References: <87imj3wl0t.fsf@localhost> <871rppx2i1.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="96297"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 40099@debbugs.gnu.org To: Stefan Monnier , Andrea Corallo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Mar 18 16:59:14 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jEb68-000OtX-Mw for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 18 Mar 2020 16:59:12 +0100 Original-Received: from localhost ([::1]:52688 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jEb67-0000zx-PI for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 18 Mar 2020 11:59:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49410) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jEb5z-0000zE-1R for bug-gnu-emacs@gnu.org; Wed, 18 Mar 2020 11:59:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jEb5x-0003ft-Si for bug-gnu-emacs@gnu.org; Wed, 18 Mar 2020 11:59:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35093) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jEb5x-0003do-MQ for bug-gnu-emacs@gnu.org; Wed, 18 Mar 2020 11:59:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jEb5x-0005aF-L7 for bug-gnu-emacs@gnu.org; Wed, 18 Mar 2020 11:59:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 Mar 2020 15:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40099 X-GNU-PR-Package: emacs Original-Received: via spool by 40099-submit@debbugs.gnu.org id=B40099.158454709321410 (code B ref 40099); Wed, 18 Mar 2020 15:59:01 +0000 Original-Received: (at 40099) by debbugs.gnu.org; 18 Mar 2020 15:58:13 +0000 Original-Received: from localhost ([127.0.0.1]:41066 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jEb5B-0005ZF-8V for submit@debbugs.gnu.org; Wed, 18 Mar 2020 11:58:13 -0400 Original-Received: from mail-pj1-f52.google.com ([209.85.216.52]:39487) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jEb58-0005Z2-7k for 40099@debbugs.gnu.org; Wed, 18 Mar 2020 11:58:11 -0400 Original-Received: by mail-pj1-f52.google.com with SMTP id ck23so1384266pjb.4 for <40099@debbugs.gnu.org>; Wed, 18 Mar 2020 08:58:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=gMS5rUK0Zt4akdJaDXItHIrw83bAvJTiJ5v+L6hpd/g=; b=pdroPIQ/5uru7Mthi66D889lyAcQiFXHTEQEWKQlEUaLt2TzEW8ULjs7gm6hNt5zcI WuCXk5mWw8+8nHBi9T2HQxJLmC/J6gzP999Vaw/DzpKzq3UtLUvFt/BygxAE1i7OA0FQ N+NJwW7MJt/AN7hVvJ/62r+XEDSdSRbwmL8KSuO4jxnUsGGCfwoNkgMLdUdrcluQXFV+ ktbvv+3igSrSUBI6HfhkGlIn/4On1EFIpzB27N4onrth5Fr2b3nq8iCSU7mgzdG5VzHu EkDsxyR4UiuJGmNALjIhINQKxV3XWglxwKrEXhQhirix49prFmmGpWJJa35avVqYWPkb tPpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=gMS5rUK0Zt4akdJaDXItHIrw83bAvJTiJ5v+L6hpd/g=; b=PKFyQY59Ol2EBa4pL1QZ8ebMhEr+PcpTASUsLAIjHG+DAVQELoGiKBSp2XIXUB2Qou B5HkiF4n1/c9+z31p/h9mhhZ7nH80kcEsgbLSCTigAdqdKfpOhrph5GztQySEOnI2j2A SGH4ZJhUqhVBh0Z2VUVJvPZ1PZ/OIAvRLP33i6cLgCjSxtrxO8ZzUC1WCU/16pwJfOC+ JGKBVOL+UaDOJ++tFfbVeMv0NIjoeSZikv37xMofs6KF8Cei0/GNOA4yDbKvEQB87vKi N3Mu7Wb1cZpr83sAOD6D+FKmGhQ6ZChk/a6XVWoIUe1RuWd5WnZNPR6XBPLSGaBGyVso hviw== X-Gm-Message-State: ANhLgQ0XlaS5/NdZd/JRxWO4EeHCXpRQRWqu7E8ASed9+JZa4LkWeTcH yH0gUBa8i2xchJcCh33mj6E= X-Google-Smtp-Source: ADFU+vuxwL6p0paXkWe5KtZOOujROkr58lOTLSlzeaBd8eOG42x2Od5tmxH05iEcJLb2muk+NCNOAQ== X-Received: by 2002:a17:902:222:: with SMTP id 31mr4637211plc.108.1584547084204; Wed, 18 Mar 2020 08:58:04 -0700 (PDT) Original-Received: from localhost ([104.250.131.79]) by smtp.gmail.com with ESMTPSA id b10sm6796571pfo.215.2020.03.18.08.58.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Mar 2020 08:58:03 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:177504 Archived-At: > Good point, indeed. This problem already exists in theory in some > systems (such as Debian in the past) where byte-compiled files were > placed in a different directory (for the case where several major > versions of Emacs are used, with packages re-compiled separately for > each major version). > > But yes, this will bite much more often. Just found another example from treemacs package: (defconst treemacs-dir ;; locally we're in src/elisp, installed from melpa we're at the package root (-let [dir (-> (if load-file-name (file-name-directory load-file-name) default-directory) (expand-file-name))] (if (s-ends-with? "src/elisp/" dir) (-> dir (f-parent) (f-parent)) dir)) "The directory treemacs.el is stored in.") Dired icons (via treemacs-icons-dired) fail to load because of wrong directory from treemacs. Regards, Ihor Stefan Monnier writes: >> Great I think the problem is clear, pdf-tools is using `load-file-name' >> as a way to obtain `pdf-tools-directory' but this is false assumption >> for the eln folder directory we have arranged. > > Good point, indeed. This problem already exists in theory in some > systems (such as Debian in the past) where byte-compiled files were > placed in a different directory (for the case where several major > versions of Emacs are used, with packages re-compiled separately for > each major version). > > But yes, this will bite much more often. > > We could lie (set `load-file-name` to point to the source file, for > example) or introduce some function to go from the `load-file-name` to > the "intended" origin (something like the name of the source file) and > update all packages to use that function? > >> Adding Stephane in cc to get an optinion on this. > > I assume that was a typo, I didn't see nay Stephane in the Cc. > > > Stefan > -- Ihor Radchenko, PhD, Center for Advancing Materials Performance from the Nanoscale (CAMP-nano) State Key Laboratory for Mechanical Behavior of Materials, Xi'an Jiaotong University, Xi'an, China Email: yantar92@gmail.com, ihor_radchenko@alumni.sutd.edu.sg