GNU bug report logs -
#49786
28.0.50; [PATCH] package-install shouldn't change default-directory
Previous Next
Reported by: dick <dick.r.chiang <at> gmail.com>
Date: Fri, 30 Jul 2021 19:13:02 UTC
Severity: normal
Tags: notabug, patch
Found in version 28.0.50
Done: dick <dick.r.chiang <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Hi
On Fri, Jul 30, 2021 at 8:54 PM Eli Zaretskii <eliz <at> gnu.org> wrote:
>
> > From: dick <dick.r.chiang <at> 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
`find-operation-coding-system'.
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?
thanks
This bug report was last modified 3 years and 357 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.