unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Nick Roberts <nickrob@snap.net.nz>
Cc: rms@gnu.org, emacs-devel@gnu.org
Subject: Re: [bojohan+mail@dd.chalmers.se: Partial completion]
Date: Sun, 25 Feb 2007 10:31:48 +0100	[thread overview]
Message-ID: <45E15784.8050603@gmx.at> (raw)
In-Reply-To: <17889.3956.99614.392821@kahikatea.snap.net.nz>

 > I don't use partial completion (complete.el) so the OP will have to test it.
 > However the above function is not equivalent to the old try-completion e.g
 >
 > old (try-completion "" '((""))) returns t
 >
 > (try-completion-old "" '((""))) returns ""

Right.  But complete.el has the following stretch of code:

	    ...
	    (if (and (not (eq mode 'help))
		     (setq prefix (try-completion (PC-chunk-after basestr skip)
                                                   poss)))
		(let ((first t) i)
		  ;; Retain capitalization of user input even if
		  ;; completion-ignore-case is set.
		  (if (eq mode 'word)
		      (setq prefix (PC-chop-word prefix basestr)))
		      ...

where `PC-chop-word' is defined as

(defun PC-chop-word (new old)
   (let ((i -1)
	(j -1))
     (while (and (setq i (string-match PC-delim-regex old (1+ i)))
		(setq j (string-match PC-delim-regex new (1+ j)))))
     (if (and j
	     (or (not PC-word-failed-flag)
		 (setq j (string-match PC-delim-regex new (1+ j)))))
	(substring new 0 (1+ j))
       new)))

which, in my opinion, could choke on t with the old `try-completion' as
well.  I don't use partial completion either and hardly anyone else does
(at least for completing Lisp symbols).  Otherwise, the other bug where
entire buffer contents could get erased would have been noticed earlier.
In any case, people using PC mode for filename completion would have to
test whether the `dirlength' change breaks anything for them.  If it
does, I'd opt for removing `PC-lisp-complete-symbol' altogether.

  reply	other threads:[~2007-02-25  9:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-24  8:28 [bojohan+mail@dd.chalmers.se: Partial completion] Richard Stallman
2007-02-24 11:57 ` Nick Roberts
2007-02-24 13:46   ` martin rudalics
2007-02-24 19:52   ` martin rudalics
2007-02-25  4:24     ` Nick Roberts
2007-02-25  9:31       ` martin rudalics [this message]
2007-02-25 19:30       ` Richard Stallman
2007-02-26 20:28         ` Nick Roberts
2007-03-02  1:24     ` Johan Bockgård
2007-03-08 20:44     ` Chong Yidong
2007-03-08 22:34       ` martin rudalics
2007-03-08 23:01         ` Chong Yidong
2007-03-09 16:20       ` Richard Stallman

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=45E15784.8050603@gmx.at \
    --to=rudalics@gmx.at \
    --cc=emacs-devel@gnu.org \
    --cc=nickrob@snap.net.nz \
    --cc=rms@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).