From: Ioannis Kappas <ioannis.kappas@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 49786@debbugs.gnu.org, dick <dick.r.chiang@gmail.com>
Subject: bug#49786: 28.0.50; [PATCH] package-install shouldn't change default-directory
Date: Fri, 30 Jul 2021 21:50:13 +0100 [thread overview]
Message-ID: <CAMRHuGBd4zC-iuiYmZP=w8U54208ZkpO+S6SEQcMJrq2JwBs1w@mail.gmail.com> (raw)
In-Reply-To: <83zgu3poh1.fsf@gnu.org>
Hi
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
`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
next prev parent reply other threads:[~2021-07-30 20:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-30 19:12 bug#49786: 28.0.50; [PATCH] package-install shouldn't change default-directory dick
2021-07-30 19:54 ` Eli Zaretskii
2021-07-30 20:41 ` dick
2021-07-31 6:09 ` Eli Zaretskii
2021-07-30 20:50 ` Ioannis Kappas [this message]
2021-07-31 1:27 ` dick
2021-07-31 6:19 ` Eli Zaretskii
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAMRHuGBd4zC-iuiYmZP=w8U54208ZkpO+S6SEQcMJrq2JwBs1w@mail.gmail.com' \
--to=ioannis.kappas@gmail.com \
--cc=49786@debbugs.gnu.org \
--cc=dick.r.chiang@gmail.com \
--cc=eliz@gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).