From unknown Sun Jun 22 04:17:14 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#5049: 23.1.50; ido-use-filename-at-point fails for files in default-directory Reply-To: Andreas Politz , 5049@debbugs.gnu.org Resent-From: Andreas Politz Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Thu, 26 Nov 2009 17:35:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: report 5049 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.125925659614359 (code B ref -1); Thu, 26 Nov 2009 17:35:04 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 26 Nov 2009 17:29:56 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.1 required=4.0 tests=FOURLA,MURPHY_DRUGS_REL8 autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nAQHTsmP014356 for ; Thu, 26 Nov 2009 09:29:56 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NDiAE-0002eN-8r for bug-gnu-emacs@gnu.org; Thu, 26 Nov 2009 12:29:54 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NDiAA-0002YU-6c for bug-gnu-emacs@gnu.org; Thu, 26 Nov 2009 12:29:53 -0500 Received: from [199.232.76.173] (port=49266 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NDiA9-0002YI-LH for bug-gnu-emacs@gnu.org; Thu, 26 Nov 2009 12:29:49 -0500 Received: from gateway-a.fh-trier.de ([143.93.54.181]:59757) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NDiA9-0005dF-7m for bug-gnu-emacs@gnu.org; Thu, 26 Nov 2009 12:29:49 -0500 Received: from raven (dslb-088-068-200-062.pools.arcor-ip.net [88.68.200.62]) (Authenticated sender: politza) by gateway-a.fh-trier.de (Postfix) with ESMTP id 95A00170F2CB for ; Thu, 26 Nov 2009 18:29:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha1; c=simple/simple; d=fh-trier.de; s=default; t=1259256564; bh=vmcuWYR3dKuq4SvWe/kDWoulDRc=; h=From:To:Subject: Date:Message-ID:MIME-Version:Content-Type; b=q6M9PgI6H6frvJMF1jB4c 2/qU8bO9kLY8KUGvlh9yvKHCnIKAfnaul8wiBLUJo+nUT+ptn7A8iDE2EIkyFEpklZN nWIa53d7zYpbNpouWmx5tP1+rDcuN/bf5MdnLjmdEhKe1pNwRtKvUMUABj44dDE7LHj eB720nIVuefMqKk4= From: Andreas Politz To: bug-gnu-emacs@gnu.org Date: Thu, 26 Nov 2009 18:29:23 +0100 Message-ID: <878wdtp53g.fsf@fh-trier.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by Amavisd-new + McAfee uvscan + ClamAV [Rechenzentrum FH-Trier (r/ft)] X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Please write in English if possible, because the Emacs maintainers usually do not have translators to read other languages for them. Your bug report will be posted to the emacs-pretest-bug@gnu.org mailing list. Please describe exactly what actions triggered the bug and the precise symptoms of the bug. If you can, give a recipe starting from `emacs -Q': Setting ido-use-filename-at-point to 'guess and trying to, for example, find a included header-file w/o a directory component (#include "foo.h") fails, because ido thinks that the file is invalid, due to file-name-directory returning nil. I think the following patch fixes this. diff --git a/lisp/ido.el b/lisp/ido.el index 7317540..ded7cbb 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -2288,7 +2288,7 @@ If cursor is not at the end of the user input, move to end of input." (ffap-guesser) (ffap-string-at-point)))) (not (string-match "^http:/" fn)) - (setq d (file-name-directory fn)) + (setq d (file-name-directory (expand-file-name fn))) (file-directory-p d)) (setq ido-current-directory d) (setq initial (file-name-nondirectory fn)))))) If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. For information about debugging Emacs, please read the file /home/politza/src/emacs23/etc/DEBUG. In GNU Emacs 23.1.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.18.3) of 2009-11-26 on raven Windowing system distributor `The X.Org Foundation', version 11.0.10605000 Important settings: value of $LC_ALL: C value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.UTF-8 value of $XMODIFIERS: nil locale-coding-system: nil default enable-multibyte-characters: t Major mode: Help Minor modes in effect: diff-auto-refine-mode: t shell-dirtrack-mode: t tooltip-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 global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t view-mode: t Recent input: i d o - m o d e C-x C-f C-g M-x C-g C-. C-h V i d o - f f i n d - f M-h C-k i d o SPC C-x o C-x o C-s f p o i n t C-s C-x o C-M-SPC M-w M-: ( s e t q SPC C-y SPC t ) C-x 0 C-x C-g C-p C-p C-p C-p C-p C-x C-f C-g M-: M-p C-e C-b C-h C-g ' g u e s s C-x C-f C-g C-n C-n C-n C-n C-n C-x C-f C-g C-. g C-/ C-h g M-x f i n d - f u n i d o - f i n d - f i l e - i f i n d - f i l e C-s i d o C-g M-x i m e n u i d o - f i l e - i C-M-l C-s h t t p C-n M-f C-l C-f ( e x p a n d - f i l e - a n C-h C-h C-g n a m e SPC M-f ) C-M-x C-x b p C-x C-f C-g C-x b C-x v = y M-x r e p o r t - e m i d o - f i l e - a t - p o i n t M-/ M-h C-k C-g C-x b h e C-c C-b C-x ESC ESC C-r a t - p o i n C-r C-r C-M-SPC M-w M-x r e p o M-p Recent messages: Buffer ido.el modified; save it? (y or n) Saving file /home/politza/src/emacs23/lisp/ido.el... Wrote /home/politza/src/emacs23/lisp/ido.el Finding changes in /home/politza/src/emacs23/lisp/ido.el...done Scanning for dabbrevs...100% dabbrev-expand: No dynamic expansion for `ido-file-at-po' found Quit help-go-back: No previous help buffer Type "q" to restore this window. Mark set Load-path shadows: None found. Features: (shadow mail-extr dabbrev emacsbug diff-mode easy-mmode vc reposition imenu find-func goto-addr thingatpt vc-git ffap pp help-mode view tramp-imap epa derived epg epg-config imap-hash imap message sendmail ecomplete rfc822 mml mml-sec mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader mm-util mail-prsvr gmm-utils wid-edit mailheader canlock sha1 hex-util hashcash mail-utils assoc tramp-gw tramp-fish tramp-smb tramp-cache tramp-ftp tramp-cmds tramp auth-source gnus-util netrc time-date advice help-fns advice-preload shell comint ring password-cache format-spec tramp-compat trampver ido multi-isearch vc-dispatcher vc-svn cc-mode cc-fonts easymenu cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs regexp-opt tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd font-setting tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mldrag 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 loaddefs button minibuffer faces cus-face text-properties overlay md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind font-render-setting gtk x-toolkit x multi-tty emacs) From unknown Sun Jun 22 04:17:14 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: owner@emacsbugs.donarmstrong.com From: help-debbugs@gnu.org (Emacs bug Tracking System) To: Andreas Politz Subject: bug#5049 closed by Glenn Morris (Re: bug#5049: 23.1.50; ido-use-filename-at-point fails for files in default-directory) Message-ID: References: <878wdtp53g.fsf@fh-trier.de> X-Emacs-PR-Message: they-closed 5049 X-Emacs-PR-Package: emacs Reply-To: 5049@debbugs.gnu.org Date: Wed, 02 Dec 2009 03:15:17 +0000 Content-Type: multipart/mixed; boundary="----------=_1259723717-8958-1" This is a multi-part message in MIME format... ------------=_1259723717-8958-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This is an automatic notification regarding your bug report which was filed against the emacs package: #5049: 23.1.50; ido-use-filename-at-point fails for files in default-direct= ory It has been closed by Glenn Morris . Their explanation is attached below along with your original report. If this explanation is unsatisfactory and you have not received a better one in a separate message then please contact Glenn Morris by replying to this email. --=20 5049: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D5049 Emacs Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1259723717-8958-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 5049-done) by emacsbugs.donarmstrong.com; 2 Dec 2009 03:05:23 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-7.2 required=4.0 tests=AWL,HAS_BUG_NUMBER, X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nB235LXw008247 for <5049-done@emacsbugs.donarmstrong.com>; Tue, 1 Dec 2009 19:05:23 -0800 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1NFfWr-0006WF-8G; Tue, 01 Dec 2009 22:05:21 -0500 From: Glenn Morris To: 5049-done@debbugs.gnu.org Subject: Re: bug#5049: 23.1.50; ido-use-filename-at-point fails for files in default-directory References: <878wdtp53g.fsf@fh-trier.de> X-Spook: BRLO benelux morse CBNRC ISEC encryption tempest Venezuela X-Ran: $)ZKj>nkqX;07e:\d/w}En#RCPOBJMD#nIlKcFu[%vl:B|pn2G_2-*Q=q*Nv+Us[\&t`o' X-Hue: blue X-Debbugs-No-Ack: yes X-Attribution: GM Date: Tue, 01 Dec 2009 22:05:21 -0500 Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Thanks; applied. ------------=_1259723717-8958-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by emacsbugs.donarmstrong.com; 26 Nov 2009 17:29:56 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.1 required=4.0 tests=FOURLA,MURPHY_DRUGS_REL8 autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nAQHTsmP014356 for ; Thu, 26 Nov 2009 09:29:56 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NDiAE-0002eN-8r for bug-gnu-emacs@gnu.org; Thu, 26 Nov 2009 12:29:54 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NDiAA-0002YU-6c for bug-gnu-emacs@gnu.org; Thu, 26 Nov 2009 12:29:53 -0500 Received: from [199.232.76.173] (port=49266 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NDiA9-0002YI-LH for bug-gnu-emacs@gnu.org; Thu, 26 Nov 2009 12:29:49 -0500 Received: from gateway-a.fh-trier.de ([143.93.54.181]:59757) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NDiA9-0005dF-7m for bug-gnu-emacs@gnu.org; Thu, 26 Nov 2009 12:29:49 -0500 Received: from raven (dslb-088-068-200-062.pools.arcor-ip.net [88.68.200.62]) (Authenticated sender: politza) by gateway-a.fh-trier.de (Postfix) with ESMTP id 95A00170F2CB for ; Thu, 26 Nov 2009 18:29:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha1; c=simple/simple; d=fh-trier.de; s=default; t=1259256564; bh=vmcuWYR3dKuq4SvWe/kDWoulDRc=; h=From:To:Subject: Date:Message-ID:MIME-Version:Content-Type; b=q6M9PgI6H6frvJMF1jB4c 2/qU8bO9kLY8KUGvlh9yvKHCnIKAfnaul8wiBLUJo+nUT+ptn7A8iDE2EIkyFEpklZN nWIa53d7zYpbNpouWmx5tP1+rDcuN/bf5MdnLjmdEhKe1pNwRtKvUMUABj44dDE7LHj eB720nIVuefMqKk4= From: Andreas Politz To: bug-gnu-emacs@gnu.org Subject: 23.1.50; ido-use-filename-at-point fails for files in default-directory Date: Thu, 26 Nov 2009 18:29:23 +0100 Message-ID: <878wdtp53g.fsf@fh-trier.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by Amavisd-new + McAfee uvscan + ClamAV [Rechenzentrum FH-Trier (r/ft)] X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Please write in English if possible, because the Emacs maintainers usually do not have translators to read other languages for them. Your bug report will be posted to the emacs-pretest-bug@gnu.org mailing list. Please describe exactly what actions triggered the bug and the precise symptoms of the bug. If you can, give a recipe starting from `emacs -Q': Setting ido-use-filename-at-point to 'guess and trying to, for example, find a included header-file w/o a directory component (#include "foo.h") fails, because ido thinks that the file is invalid, due to file-name-directory returning nil. I think the following patch fixes this. diff --git a/lisp/ido.el b/lisp/ido.el index 7317540..ded7cbb 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -2288,7 +2288,7 @@ If cursor is not at the end of the user input, move to end of input." (ffap-guesser) (ffap-string-at-point)))) (not (string-match "^http:/" fn)) - (setq d (file-name-directory fn)) + (setq d (file-name-directory (expand-file-name fn))) (file-directory-p d)) (setq ido-current-directory d) (setq initial (file-name-nondirectory fn)))))) If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. For information about debugging Emacs, please read the file /home/politza/src/emacs23/etc/DEBUG. In GNU Emacs 23.1.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.18.3) of 2009-11-26 on raven Windowing system distributor `The X.Org Foundation', version 11.0.10605000 Important settings: value of $LC_ALL: C value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.UTF-8 value of $XMODIFIERS: nil locale-coding-system: nil default enable-multibyte-characters: t Major mode: Help Minor modes in effect: diff-auto-refine-mode: t shell-dirtrack-mode: t tooltip-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 global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t view-mode: t Recent input: i d o - m o d e C-x C-f C-g M-x C-g C-. C-h V i d o - f f i n d - f M-h C-k i d o SPC C-x o C-x o C-s f p o i n t C-s C-x o C-M-SPC M-w M-: ( s e t q SPC C-y SPC t ) C-x 0 C-x C-g C-p C-p C-p C-p C-p C-x C-f C-g M-: M-p C-e C-b C-h C-g ' g u e s s C-x C-f C-g C-n C-n C-n C-n C-n C-x C-f C-g C-. g C-/ C-h g M-x f i n d - f u n i d o - f i n d - f i l e - i f i n d - f i l e C-s i d o C-g M-x i m e n u i d o - f i l e - i C-M-l C-s h t t p C-n M-f C-l C-f ( e x p a n d - f i l e - a n C-h C-h C-g n a m e SPC M-f ) C-M-x C-x b p C-x C-f C-g C-x b C-x v = y M-x r e p o r t - e m i d o - f i l e - a t - p o i n t M-/ M-h C-k C-g C-x b h e C-c C-b C-x ESC ESC C-r a t - p o i n C-r C-r C-M-SPC M-w M-x r e p o M-p Recent messages: Buffer ido.el modified; save it? (y or n) Saving file /home/politza/src/emacs23/lisp/ido.el... Wrote /home/politza/src/emacs23/lisp/ido.el Finding changes in /home/politza/src/emacs23/lisp/ido.el...done Scanning for dabbrevs...100% dabbrev-expand: No dynamic expansion for `ido-file-at-po' found Quit help-go-back: No previous help buffer Type "q" to restore this window. Mark set Load-path shadows: None found. Features: (shadow mail-extr dabbrev emacsbug diff-mode easy-mmode vc reposition imenu find-func goto-addr thingatpt vc-git ffap pp help-mode view tramp-imap epa derived epg epg-config imap-hash imap message sendmail ecomplete rfc822 mml mml-sec mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader mm-util mail-prsvr gmm-utils wid-edit mailheader canlock sha1 hex-util hashcash mail-utils assoc tramp-gw tramp-fish tramp-smb tramp-cache tramp-ftp tramp-cmds tramp auth-source gnus-util netrc time-date advice help-fns advice-preload shell comint ring password-cache format-spec tramp-compat trampver ido multi-isearch vc-dispatcher vc-svn cc-mode cc-fonts easymenu cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs regexp-opt tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd font-setting tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mldrag 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 loaddefs button minibuffer faces cus-face text-properties overlay md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind font-render-setting gtk x-toolkit x multi-tty emacs) ------------=_1259723717-8958-1--