unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Andreas Politz <politza@fh-trier.de>
To: bug-gnu-emacs@gnu.org
Subject: bug#5049: 23.1.50; ido-use-filename-at-point fails for files in default-directory
Date: Thu, 26 Nov 2009 18:29:23 +0100	[thread overview]
Message-ID: <878wdtp53g.fsf@fh-trier.de> (raw)


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 <return> C-x C-f C-g M-x C-g C-. C-h 
V i d o - <tab> f f <tab> <backspace> i n d <tab> - 
f <tab> M-h C-k i d o <tab> <tab> SPC C-x o C-x o C-s 
f <backspace> p o i n t C-s <return> <return> C-x o 
C-M-SPC M-w M-: ( s e t q SPC C-y SPC t ) <return> 
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 <backspace> ' g u e s s <return> 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 <tab> <return> i d o - f i n 
d - f i l e - i <tab> <M-backspace> <M-backspace> <M-backspace> 
<M-backspace> <tab> f i n <tab> d - f i l e <return> 
C-s i d o C-g M-x i m e n u <return> i d o - f i l 
e - i <tab> <return> 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 <backspace> 
<backspace> n a m e SPC M-f ) C-M-x C-x b p <return> 
C-x C-f C-g C-x b <return> C-x v = y M-x r e p o r 
t - e m <tab> <return> i d o - f i l e - a t - p o 
i n t <backspace> <backspace> <backspace> M-/ M-h C-k 
C-g C-x b h e <return> C-c C-b C-x ESC ESC C-r a t 
- p o i n C-r C-r <return> <return> C-M-SPC M-w M-x 
r e p o M-p <return>

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)






             reply	other threads:[~2009-11-26 17:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <krvdgqcbym.fsf@fencepost.gnu.org>
2009-11-26 17:29 ` Andreas Politz [this message]
2009-12-02  3:15   ` bug#5049: marked as done (23.1.50; ido-use-filename-at-point fails for files in default-directory) Emacs bug Tracking System

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=878wdtp53g.fsf@fh-trier.de \
    --to=politza@fh-trier.de \
    --cc=5049@emacsbugs.donarmstrong.com \
    --cc=bug-gnu-emacs@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).