From: Lennart Borgman <lennart.borgman@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 6299@debbugs.gnu.org
Subject: bug#6299: In read-file-name: (args-out-of-range "c:" 0 3)
Date: Sun, 30 May 2010 00:07:16 +0200 [thread overview]
Message-ID: <AANLkTin_aQZLp765rthYzZaq_rb25ogck_UzZ3JO4UJs@mail.gmail.com> (raw)
In-Reply-To: <AANLkTingd8k1OQ0_wajUnsYYnpht7UAETfJm3rDd5VPz@mail.gmail.com>
On Sat, May 29, 2010 at 11:24 PM, Lennart Borgman
<lennart.borgman@gmail.com> wrote:
> On Sat, May 29, 2010 at 11:18 PM, Stefan Monnier
> <monnier@iro.umontreal.ca> wrote:
>>> Debugger entered--Lisp error: (args-out-of-range "c:" 0 3)
>>> signal(args-out-of-range ("c:" 0 3))
>>> completion--some(#[(style) " \236A@\n \f
>>> $\207" [style completion-styles-alist string table pred point] 5]
>>> (basic partial-completion emacs22))
>>
>> First thing: edit completion--some o as to replace condition-case with
>> condition-case-no-debug. This way the error won't be delayed and you'll
>> get a more precise backtrace.
eval-buffer in minibuffer.el made it more understandable. Here it is
(but I do not know the cause of it):
* I added a little trace here
(defun completion-pcm--find-all-completions (string table pred point
&optional filter)
"Find all completions for STRING at POINT in TABLE, satisfying PRED.
POINT is a position inside STRING.
FILTER is a function applied to the return value, that can be used, e.g. to
filter out additional entries (because TABLE migth not obey PRED)."
(unless filter (setq filter 'identity))
(message "FIND: filter=%S" filter)
(let* ((beforepoint (substring string 0 point))
(afterpoint (substring string point))
(bounds (completion-boundaries beforepoint table pred afterpoint))
(dummy (message "FIND: string=%S bounds=%S, beforepoint=%S
afterpoint=%S" string bounds beforepoint afterpoint))
(prefix (substring beforepoint 0 (car bounds)))
(suffix (substring afterpoint (cdr bounds)))
firsterror)
and in
(defun completion-boundaries (string table pred suffix)
"Return the boundaries of the completions returned by TABLE for STRING.
STRING is the string on which completion will be performed.
SUFFIX is the string after point.
The result is of the form (START . END) where START is the position
in STRING of the beginning of the completion field and END is the position
in SUFFIX of the end of the completion field.
E.g. for simple completion tables, the result is always (0 . (length SUFFIX))
and for file names the result is the positions delimited by
the closest directory separators."
(message "BOUNDARIES string=%S table=%s pred=%s suffix=%S" string
table pred suffix)
(let ((boundaries (if (functionp table)
(funcall table string pred (cons 'boundaries suffix)))))
(message "BOUNDARIES boundaries=%S" boundaries)
(if (not (eq (car-safe boundaries) 'boundaries))
(setq boundaries nil))
(cons (or (cadr boundaries) 0)
(or (cddr boundaries) (length suffix)))))
and got
BOUNDARIES string="c:/ema" table=read-file-name-internal
pred=file-exists-p suffix=""
BOUNDARIES boundaries=(boundaries 3)
FIND: filter=completion-pcm--filename-try-filter
BOUNDARIES string="c:/ema" table=read-file-name-internal
pred=file-exists-p suffix=""
BOUNDARIES boundaries=(boundaries 3)
FIND: string="c:/ema" bounds=(3 . 0), beforepoint="c:/ema" afterpoint=""
FIND: prefix="c:/"
FIND: substring="c:"
FIND: filter=completion-pcm--filename-try-filter
BOUNDARIES string="c:" table=read-file-name-internal
pred=file-exists-p suffix=""
BOUNDARIES boundaries=(boundaries 3)
FIND: string="c:" bounds=(3 . 0), beforepoint="c:" afterpoint=""
Entering debugger...
It looks like perhaps read-file-name-internal gives the wrong information.
PS: There is an advice on read-file-name is
Around-advice `viper-suffix-advice':
Tell `exit-minibuffer' to run `viper-file-add-suffix' as a hook.
which does not seem to be involved (I unadvised read-file-name).
next prev parent reply other threads:[~2010-05-29 22:07 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-29 1:35 bug#6299: In read-file-name: (args-out-of-range "c:" 0 3) Lennart Borgman
2010-05-29 16:12 ` Eli Zaretskii
2010-05-29 21:18 ` Stefan Monnier
2010-05-29 21:24 ` Lennart Borgman
2010-05-29 22:07 ` Lennart Borgman [this message]
2010-05-29 23:29 ` Stefan Monnier
2010-05-30 0:10 ` Lennart Borgman
2010-05-30 3:34 ` Stefan Monnier
2010-05-30 4:27 ` Juanma Barranquero
2010-05-30 10:11 ` Lennart Borgman
2010-05-30 14:18 ` Stefan Monnier
2010-05-30 17:40 ` Lennart Borgman
2010-05-30 21:18 ` Stefan Monnier
2010-05-30 13:39 ` Lennart Borgman
2010-05-30 14:05 ` Stefan Monnier
2010-05-30 17:39 ` Lennart Borgman
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=AANLkTin_aQZLp765rthYzZaq_rb25ogck_UzZ3JO4UJs@mail.gmail.com \
--to=lennart.borgman@gmail.com \
--cc=6299@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
/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).