From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Leo Liu Newsgroups: gmane.emacs.bugs Subject: bug#14300: 24.3; comint-dynamic-complete-functions breaks Date: Tue, 07 May 2013 16:18:15 +0800 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1367914753 20940 80.91.229.3 (7 May 2013 08:19:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 7 May 2013 08:19:13 +0000 (UTC) Cc: 14300@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue May 07 10:19:12 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 1UZd78-0002Hc-U6 for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 May 2013 10:19:11 +0200 Original-Received: from localhost ([::1]:40983 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZd78-0006hS-2M for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 May 2013 04:19:10 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:37546) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZd70-0006hI-1z for bug-gnu-emacs@gnu.org; Tue, 07 May 2013 04:19:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UZd6y-0002Ep-J9 for bug-gnu-emacs@gnu.org; Tue, 07 May 2013 04:19:01 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56458) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZd6y-0002El-F7 for bug-gnu-emacs@gnu.org; Tue, 07 May 2013 04:19:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UZd7x-0004Ge-Lh for bug-gnu-emacs@gnu.org; Tue, 07 May 2013 04:20:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Leo Liu Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 May 2013 08:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14300 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 14300-submit@debbugs.gnu.org id=B14300.136791476916222 (code B ref 14300); Tue, 07 May 2013 08:20:01 +0000 Original-Received: (at 14300) by debbugs.gnu.org; 7 May 2013 08:19:29 +0000 Original-Received: from localhost ([127.0.0.1]:60567 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UZd7Q-0004DW-7M for submit@debbugs.gnu.org; Tue, 07 May 2013 04:19:29 -0400 Original-Received: from mail-pa0-f49.google.com ([209.85.220.49]:38635) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UZd7N-0004DD-MQ for 14300@debbugs.gnu.org; Tue, 07 May 2013 04:19:26 -0400 Original-Received: by mail-pa0-f49.google.com with SMTP id bi5so321078pad.36 for <14300@debbugs.gnu.org>; Tue, 07 May 2013 01:18:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:references:face:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=buT7T4sGLpPTnrtJZzGP2ZlsLsubM6ul/8OsS4pikzo=; b=Uf8i/GGMasP/xhOZ/7h/+CD06tx+14LGfkL5CHVU8Q/vn9EymSYnCax86pNQc7CIeh CA4YXSsXrhhLl9PWszQ0PeLxPmsOnYFQVQ06eT1buNT1WEqbc6sZaQkXhi1+yGj276RB QAXmc3lG8koRo8a6rgsovMaRvQ+JVL8t5Gk4aipcyg2rN0/1+YcS+qcaeWvRv82eCN1F NB2qevjFjiQwut6gOtpoFciS+/G040AN7gziuuwcjIBtOayf5/oiPWX5WzHPMgOphahu Bt+0IZKTpCI0FkwaR21/Vg4oEqoCqXXwzj+yd+1zPaYJRgmCEf05reZ2+hB+Of3YdFI5 +q4w== X-Received: by 10.68.223.10 with SMTP id qq10mr1201766pbc.57.1367914702845; Tue, 07 May 2013 01:18:22 -0700 (PDT) Original-Received: from Zeuss-MacBook.local ([119.161.133.157]) by mx.google.com with ESMTPSA id fm2sm29395739pab.13.2013.05.07.01.18.20 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 07 May 2013 01:18:22 -0700 (PDT) Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAAG1BMVEUAAAA9Cgm3Hx1WWFWA gn+WmJWsrqv4+vcCAwCRl2MkAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAYoA AAGKATOXMFgAAAAHdElNRQfXAQwDNR+ZJmElAAABIklEQVQoz22SPW+DQAyGWUq65qasd9PNUSX4 AZHK2C1rJy5jpDS4IwRVup9dn7GNafpKIPPgzztXFSujqq1eM2n8h22oMkvxI/i9C97kRfMRUN55 dS3BrsAwBXUtMLAO4lryh8kTjOxKpQNniNxAgZOEe4bZwsDTFhKdqZRLNII4OQNHhEuq/RMkm6Cj TnnEA/fk0BorcYn5qA3oaeAxbaBOLrX+9G48NZ2Fzc2tzDM8Q+tMypEOqYHh8mAWaaK3U/cDMOT5 aMZMABgPXc7zPMs1A8DXO756GFJ/4fMEq47hTsAdn5avoxZ4ywl0c2w4Flu2Ybeyb3S+EqxX2DYA H8veJGEDTnHnrXvRaPyt+2kSfK6rfBZ2tUtfP/mR+pR6sX8BUZ/cDV7tvkoAAAAASUVORK5CYII= In-Reply-To: (Stefan Monnier's message of "Mon, 06 May 2013 09:32:59 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (OS X 10.8.3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.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:74043 Archived-At: On 2013-05-06 21:32 +0800, Stefan Monnier wrote: > That's what ":exclusive t" does. Of course "no match" is tricky to > define: if you use a fancy completion style that tries really hard to > find a match (ido-flex style, maybe even with "typo-correction"), then > only trying the second table when "there's no match" for the first one > might end up meaning that it never tries the second one. I got a solution that seems good enough. Do you see any room for improvement? Thanks. diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el index 138c1948..3118f49e 100644 --- a/lisp/progmodes/octave.el +++ b/lisp/progmodes/octave.el @@ -741,13 +741,19 @@ (defun inferior-octave-completion-table () (defun inferior-octave-completion-at-point () "Return the data to complete the Octave symbol at point." - (let* ((end (point)) + ;; http://debbugs.gnu.org/14300 + (let* ((filecomp (string-match-p + "/" (or (comint--match-partial-filename) ""))) + (end (point)) (start - (save-excursion - (skip-syntax-backward "w_" (comint-line-beginning-position)) - (point)))) - (when (> end start) - (list start end (inferior-octave-completion-table))))) + (unless filecomp + (save-excursion + (skip-syntax-backward "w_" (comint-line-beginning-position)) + (point))))) + (when (and start (> end start)) + (list start end (completion-table-in-turn + (inferior-octave-completion-table) + 'comint-completion-file-name-table))))) (define-obsolete-function-alias 'inferior-octave-complete 'completion-at-point "24.1")