[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#49786: 28.0.50; [PATCH] package-install shouldn't change default-dir

From: Ioannis Kappas
Subject: bug#49786: 28.0.50; [PATCH] package-install shouldn't change default-directory
Date: Fri, 30 Jul 2021 21:50:13 +0100


On Fri, Jul 30, 2021 at 8:54 PM Eli Zaretskii <eliz@gnu.org> wrote:
> > From: dick <dick.r.chiang@gmail.com>
> > Date: Fri, 30 Jul 2021 15:12:06 -0400
> >
> > Commit 606b783acb leverages a 2015 hack that extracts the
> > package version from the buffer file name, only he has to
> > explicitly `set-visited-file-name` to do it.
> >
> > `set-visited-file-name` has the adverse side effect of
> > changing the default-directory, and that causes me problems.
> Ioannis, could you please tell why you needed to call
> set-visited-file-name there?

We `set-visited-file-name' after we literally read the package into a buffer,
so that we can extract the original filename in `package-install-from-buffer'
with `buffer-file-name' and determine its original coding system with

Once we determine the coding system, we can then decode the literal buffer
and parse the package headers using the original encoding.

Could you please elaborate a bit more what issue does this cause?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]