all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>, Andrea Corallo <akrl@sdf.org>
Cc: 40099@debbugs.gnu.org
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	[thread overview]
Message-ID: <87lfnxd5fd.fsf@localhost> (raw)
In-Reply-To: <jwvr1xpoib9.fsf-monnier+emacs@gnu.org>

> 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 <monnier@iro.umontreal.ca> 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





  reply	other threads:[~2020-03-18 15:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-17  6:30 bug#40099: 28.0.50; [feature/native-comp] Different working dir of .eln files is not expected by pdf-tools Ihor Radchenko
2020-03-18 11:05 ` Andrea Corallo
2020-03-18 12:37   ` Ihor Radchenko
2020-03-18 12:59     ` Andrea Corallo
2020-03-18 14:27       ` Stefan Monnier
2020-03-18 15:54         ` Ihor Radchenko [this message]
2020-03-18 16:57         ` Andrea Corallo
2020-04-08 15:48         ` Ihor Radchenko
2020-04-08 18:22           ` Andrea Corallo
2020-04-08 18:54             ` Ihor Radchenko
2020-04-13  9:58               ` Andrea Corallo
2020-04-14  0:58                 ` Ihor Radchenko
2020-04-14  7:28                   ` Andrea Corallo

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=87lfnxd5fd.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=40099@debbugs.gnu.org \
    --cc=akrl@sdf.org \
    --cc=monnier@iro.umontreal.ca \
    /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.