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: Tue, 24 Dec 2013 19:30:33 +0200 Message-ID: <83bo066ts6.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1387906399 26895 80.91.229.3 (24 Dec 2013 17:33:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 24 Dec 2013 17:33:19 +0000 (UTC) To: 16243@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Dec 24 18:33:25 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 1VvVrA-00020N-IS for geb-bug-gnu-emacs@m.gmane.org; Tue, 24 Dec 2013 18:33:24 +0100 Original-Received: from localhost ([::1]:39896 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VvVrA-0007za-5A for geb-bug-gnu-emacs@m.gmane.org; Tue, 24 Dec 2013 12:33:24 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55241) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VvVqy-0007yN-E2 for bug-gnu-emacs@gnu.org; Tue, 24 Dec 2013 12:33:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VvVqp-0004je-0T for bug-gnu-emacs@gnu.org; Tue, 24 Dec 2013 12:33:12 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53616) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VvVqo-0004jX-Sy for bug-gnu-emacs@gnu.org; Tue, 24 Dec 2013 12:33:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VvVqo-0007C1-Bp for bug-gnu-emacs@gnu.org; Tue, 24 Dec 2013 12:33: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: Tue, 24 Dec 2013 17:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 16243 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.138790634327571 (code B ref -1); Tue, 24 Dec 2013 17:33:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 24 Dec 2013 17:32:23 +0000 Original-Received: from localhost ([127.0.0.1]:39402 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VvVqB-0007Ad-5j for submit@debbugs.gnu.org; Tue, 24 Dec 2013 12:32:23 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:53261) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VvVq9-0007AV-3Y for submit@debbugs.gnu.org; Tue, 24 Dec 2013 12:32:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VvVpz-0004BM-J3 for submit@debbugs.gnu.org; Tue, 24 Dec 2013 12:32:20 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:33804) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VvVpz-0004B4-GV for submit@debbugs.gnu.org; Tue, 24 Dec 2013 12:32:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54934) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VvVps-0007mI-2b for bug-gnu-emacs@gnu.org; Tue, 24 Dec 2013 12:32:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VvVpk-00045U-Jq for bug-gnu-emacs@gnu.org; Tue, 24 Dec 2013 12:32:03 -0500 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:51752) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VvVpk-00045L-B6 for bug-gnu-emacs@gnu.org; Tue, 24 Dec 2013 12:31:56 -0500 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MYB00I00MLUKZ00@a-mtaout22.012.net.il> for bug-gnu-emacs@gnu.org; Tue, 24 Dec 2013 19:30:37 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MYB00IATNB0KB40@a-mtaout22.012.net.il> for bug-gnu-emacs@gnu.org; Tue, 24 Dec 2013 19:30:37 +0200 (IST) X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). 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:82534 Archived-At: To reproduce: emacs -Q M-x load-library RET shr RET M-x shr-visit-file RET /some/file.html RET M-: default-directory RET You will see that the default-directory of the buffer where the file is rendered is not the directory of that file. Why is this a problem? Because shr.el binds keys to commands that expect the buffer's directory to be set correctly. For example, RET is bound to shr-browse-url, which (at least on Windows) needs to expand the linked file name relative to the directory of the file that is displayed in the buffer. So: any reasons not to set default-directory in shr-visit-file? Thanks. In GNU Emacs 24.3.50.181 (i686-pc-mingw32) of 2013-12-24 on HOME-C4E4A596F7 Bzr revision: 115731 eliz@gnu.org-20131224172106-220c4vpxm3ysr12m Windowing system distributor `Microsoft Corp.', version 5.1.2600 Configured using: `configure --prefix=/d/usr --enable-checking=yes,glyphs 'CFLAGS=-O0 -gdwarf-2 -g3'' Important settings: value of $LANG: ENU locale-coding-system: cp1255 Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: M-x r e p o r t - e m a c s - b u g Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr mail-utils time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp w32-common-fns disp-table w32-win w32-vars tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process w32notify w32 multi-tty emacs)