From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#16243: 24.3.50; shr-visit-file doesn't set the buffer's default-directory Date: Wed, 25 Dec 2013 05:48:24 +0200 Message-ID: <83txdx616f.fsf@gnu.org> References: <83bo066ts6.fsf@gnu.org> <8761qeroot.fsf@building.gnus.org> <83wqiu55pa.fsf@gnu.org> <87lhzaq7wp.fsf@building.gnus.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1387943355 8091 80.91.229.3 (25 Dec 2013 03:49:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 25 Dec 2013 03:49:15 +0000 (UTC) Cc: 16243@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 25 04:49:20 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VvfTB-0002Wh-Gn for geb-bug-gnu-emacs@m.gmane.org; Wed, 25 Dec 2013 04:49:17 +0100 Original-Received: from localhost ([::1]:41094 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VvfTB-0006D4-6U for geb-bug-gnu-emacs@m.gmane.org; Tue, 24 Dec 2013 22:49:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43603) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VvfT2-0006Ch-NM for bug-gnu-emacs@gnu.org; Tue, 24 Dec 2013 22:49:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VvfSw-00042U-VC for bug-gnu-emacs@gnu.org; Tue, 24 Dec 2013 22:49:08 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54366) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VvfSw-00042Q-SG for bug-gnu-emacs@gnu.org; Tue, 24 Dec 2013 22:49:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VvfSw-0002Al-Ej for bug-gnu-emacs@gnu.org; Tue, 24 Dec 2013 22:49:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Dec 2013 03:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16243 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16243-submit@debbugs.gnu.org id=B16243.13879433248311 (code B ref 16243); Wed, 25 Dec 2013 03:49:02 +0000 Original-Received: (at 16243) by debbugs.gnu.org; 25 Dec 2013 03:48:44 +0000 Original-Received: from localhost ([127.0.0.1]:40152 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VvfSa-00029u-OX for submit@debbugs.gnu.org; Tue, 24 Dec 2013 22:48:44 -0500 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:40374) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VvfSU-00029V-Q3 for 16243@debbugs.gnu.org; Tue, 24 Dec 2013 22:48:38 -0500 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MYC00800FVCIA00@a-mtaout20.012.net.il> for 16243@debbugs.gnu.org; Wed, 25 Dec 2013 05:48:26 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MYC008P1FWQGU30@a-mtaout20.012.net.il>; Wed, 25 Dec 2013 05:48:26 +0200 (IST) In-reply-to: <87lhzaq7wp.fsf@building.gnus.org> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:82559 Archived-At: > From: Lars Ingebrigtsen > Cc: 16243@debbugs.gnu.org > Date: Tue, 24 Dec 2013 22:02:46 +0100 > > Eli Zaretskii writes: > > > Not really sure what you meant here. shr-visit-file is about local > > files, right? So what URL and which HTTP are relevant here, and why? > > To make relative URLs expand correctly, file://directory/file/is/in > should be passed in as the base directory. I'm not sure such a directory value will do what we want. The value should be a local file name. E.g., on Windows typing RET on a link will eventually call a function that needs to be able to produce an absolute file name by calling expand-file-name. Either that, or change the function invoked by RET to let-bind the buffer's directory to the right value. > > Which special mode buffers? I actually don't quite understand why > > buffer-file-name isn't set to the name of the file we visit. > > `shr-visit-file' doesn't really visit a file. It just does a rendering > based on it. If `buffer-file-name' is set to the file, and you save > what you see, you destroy the .html file you see a rendering of. Then don't allow to save.