From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 29 02:45:38 2013 Received: (at submit) by debbugs.gnu.org; 29 Apr 2013 06:45:38 +0000 Received: from localhost ([127.0.0.1]:49394 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UWhqB-00085r-Fa for submit@debbugs.gnu.org; Mon, 29 Apr 2013 02:45:37 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39963) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UWhq7-00085e-Um for submit@debbugs.gnu.org; Mon, 29 Apr 2013 02:45:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UWhpp-00042e-U3 for submit@debbugs.gnu.org; Mon, 29 Apr 2013 02:45:15 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-102.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,T_DKIM_INVALID,USER_IN_WHITELIST autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:51822) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UWhpp-00042M-Qc for submit@debbugs.gnu.org; Mon, 29 Apr 2013 02:45:13 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50495) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UWhk9-0000UC-HA for bug-gnu-emacs@gnu.org; Mon, 29 Apr 2013 02:39:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UWhk8-0002L4-K3 for bug-gnu-emacs@gnu.org; Mon, 29 Apr 2013 02:39:21 -0400 Received: from mail-pa0-f41.google.com ([209.85.220.41]:58780) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UWhk8-0002Kz-EG for bug-gnu-emacs@gnu.org; Mon, 29 Apr 2013 02:39:20 -0400 Received: by mail-pa0-f41.google.com with SMTP id kq12so2760605pab.28 for ; Sun, 28 Apr 2013 23:39:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:subject:x-debbugs-cc:date:message-id :mime-version:content-type; bh=5zuZ5z3mA4mAWhJU6/lTaqAJlL/YdIHTvytECbTlmk4=; b=XeOGLJ/vx+FMu0hg0zk13MqE2jqaGOCPldaz9l+Ff/14Xb1SV0Uf6FELBzk7m8xu9R oTxT2gItiOb9T2r3MJwomxvn9Skd7shrZsqpXYYqP1hR6fJu93bpjjp5cTdBA3XbOBVr q/siT89xsXaBtuSUN7bZfmM42bWyr6+NuQQorV/6e9A2SKecOAp0aw78vNgaiNF3HDZI wJM8dFcvzh17ZMiQxQZ1JoHKDhSZpzOha9mazWNJ6R3dy2R7RRnpnfEqD1x9U1CaneZX ScftHfefK5MJkJJRaI87BXaYEpytjnwBj3jEVvvsS6GXxaUg+Fg0vx41ZtZI5+twmWhw f+Jw== X-Received: by 10.66.119.5 with SMTP id kq5mr44721748pab.193.1367217559140; Sun, 28 Apr 2013 23:39:19 -0700 (PDT) Received: from localhost (li511-224.members.linode.com. [66.175.216.224]) by mx.google.com with ESMTPSA id qr7sm22783686pbc.16.2013.04.28.23.39.15 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 28 Apr 2013 23:39:18 -0700 (PDT) From: Leo Liu To: bug-gnu-emacs@gnu.org Subject: 24.3; comint-dynamic-complete-functions breaks X-Debbugs-CC: Date: Mon, 29 Apr 2013 14:39:10 +0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) This looks like a regression to me. The semantics of comint-dynamic-complete-functions has changed between emacs-24 and previous releases. Previously entries are tried one after another to perform completion i.e. actually perform the completion. With the new semantics it only does the first one because it will always (99% cases) succeed (getting the completion-table nearly always succeeds). This is unfortunate because a lot of modes rely on the previous behaviour to provide rich completions for comint based modes. I noticed this bug because file completion no longer works in octave-mode. Leo From debbugs-submit-bounces@debbugs.gnu.org Sat May 04 16:09:32 2013 Received: (at 14300) by debbugs.gnu.org; 4 May 2013 20:09:32 +0000 Received: from localhost ([127.0.0.1]:58211 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UYilw-0001LZ-6u for submit@debbugs.gnu.org; Sat, 04 May 2013 16:09:32 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]:52377) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UYilu-0001LQ-2H for 14300@debbugs.gnu.org; Sat, 04 May 2013 16:09:30 -0400 Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id r44K8epa020650; Sat, 4 May 2013 16:08:41 -0400 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id B5BB6AE1B2; Sat, 4 May 2013 16:08:40 -0400 (EDT) From: Stefan Monnier To: Leo Liu Subject: Re: bug#14300: 24.3; comint-dynamic-complete-functions breaks Message-ID: References: Date: Sat, 04 May 2013 16:08:40 -0400 In-Reply-To: (Leo Liu's message of "Mon, 29 Apr 2013 14:39:10 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4569=0 X-NAI-Spam-Version: 2.3.0.9362 : core <4569> : streams <954044> : uri <1411566> X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: 14300 Cc: 14300@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.0 (------) > The semantics of comint-dynamic-complete-functions has changed between > emacs-24 and previous releases. Indeed. > With the new semantics it only does the first one because it will always > (99% cases) succeed (getting the completion-table nearly always > succeeds). Then the code needs to be fixed not to succeed when point is somewhere where that completion doesn't apply. > This is unfortunate because a lot of modes rely on the previous > behaviour to provide rich completions for comint based modes. But that ad-hoc way to combine completions had many downsides (e.g. you can't tell when to hide the *Completions* buffer, you can't provide completion-help-at-point, and it interacts poorly with sophisticated completion-styles). > I noticed this bug because file completion no longer works in > octave-mode. Let's try to focus on this, then. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat May 04 21:56:36 2013 Received: (at 14300) by debbugs.gnu.org; 5 May 2013 01:56:36 +0000 Received: from localhost ([127.0.0.1]:58277 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UYoBo-0007vS-0C for submit@debbugs.gnu.org; Sat, 04 May 2013 21:56:36 -0400 Received: from mail-pb0-f50.google.com ([209.85.160.50]:60426) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UYoBl-0007vH-F6 for 14300@debbugs.gnu.org; Sat, 04 May 2013 21:56:34 -0400 Received: by mail-pb0-f50.google.com with SMTP id um15so1437595pbc.23 for <14300@debbugs.gnu.org>; Sat, 04 May 2013 18:55:43 -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=U+DF85x3vVP+mpW4VwwOEVxpPH2TUFu3/PiMSdViK/A=; b=LQesg5dXFdVmo2UBzV+KWguZP4MUOnGTo9lcAimcDJQ457igXHpNxo+9c7GN5+BkKA yykMZWzT0GsTgYHKb2wwMUmRApTYV/TgsqfcQU1vV4vxU0IavAnSvbvhHMs6P8Gwy2iU +yKVISnS+OtFv1wrYwaxPQ+uwIaq8OOZmwpQzHAvauFqQgb5tPibfXXwPCeHuHZyZuLH kIiM0H7PDnKzEVdPZ50bkfbCx9Yj++xOAMqEfHl0UadkxUJVvnIMHhazPODrF5KgvJrD Q4AWssSPYHLzLAl8upvj6Byinm7rPvAqmMBzGnv2wk9QI8Pp354i788Nr16r5q9MLR9M lYmg== X-Received: by 10.68.25.233 with SMTP id f9mr20253695pbg.118.1367718943373; Sat, 04 May 2013 18:55:43 -0700 (PDT) Received: from Zeuss-MacBook.local ([119.161.133.157]) by mx.google.com with ESMTPSA id to7sm19297365pab.0.2013.05.04.18.55.39 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 04 May 2013 18:55:42 -0700 (PDT) From: Leo Liu To: Stefan Monnier Subject: Re: bug#14300: 24.3; comint-dynamic-complete-functions breaks References: Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoAgMAAADxkFD+AAAADFBMVEUvT09qWs3/pQD///+J kUVcAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9cBBwMLOd3veKQA AACuSURBVBjTldE9CgIxEAXgB+lEyFUC2wo5ikdZ8DSypxhMY7H9VuIVwlqkGRgnm59VsHGafIQ3 CZlAtmKIRaHETgYa12lqvEsPYKf8wXHsPGfqPaUM0g9aJPKFXkmNQmSDqwzz4Fpgpz+6WAPY2z5o uPJJpu0uypcl4nyCibMLQ8lCiVjayLoQvw5LsVKQuHPRR958HZbOcVsKeepcLxpByjycGvnKmY+c MBvrtyjfe0vmuLvdq/kAAAAASUVORK5CYII= Date: Sun, 05 May 2013 09:55:41 +0800 In-Reply-To: (Stefan Monnier's message of "Sat, 04 May 2013 16:08:40 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (OS X 10.8.3) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 14300 Cc: 14300@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On 2013-05-05 04:08 +0800, Stefan Monnier wrote: >> I noticed this bug because file completion no longer works in >> octave-mode. > > Let's try to focus on this, then. Let's see if we can fix this just for octave. How can I differentiate between an octave function completion from a file completion if they don't have different delimiters? Leo From debbugs-submit-bounces@debbugs.gnu.org Sun May 05 02:39:59 2013 Received: (at 14300) by debbugs.gnu.org; 5 May 2013 06:39:59 +0000 Received: from localhost ([127.0.0.1]:58421 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UYsc2-0001sX-Pk for submit@debbugs.gnu.org; Sun, 05 May 2013 02:39:59 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:6407) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UYsbx-0001sA-Je for 14300@debbugs.gnu.org; Sun, 05 May 2013 02:39:53 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFMCqRF/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDpHqBXoMT X-IPAS-Result: Av4EABK/CFFMCqRF/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDpHqBXoMT X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="11067350" Received: from 76-10-164-69.dsl.teksavvy.com (HELO pastel.home) ([76.10.164.69]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 05 May 2013 02:38:58 -0400 Received: by pastel.home (Postfix, from userid 20848) id A220667917; Sun, 5 May 2013 02:39:02 -0400 (EDT) From: Stefan Monnier To: Leo Liu Subject: Re: bug#14300: 24.3; comint-dynamic-complete-functions breaks Message-ID: References: Date: Sun, 05 May 2013 02:39:02 -0400 In-Reply-To: (Leo Liu's message of "Sun, 05 May 2013 09:55:41 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 14300 Cc: 14300@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > How can I differentiate between an octave function completion from a > file completion if they don't have different delimiters? Good question. Can file names really occur at the same places as function names in Octave? Stefan From debbugs-submit-bounces@debbugs.gnu.org Sun May 05 03:04:00 2013 Received: (at submit) by debbugs.gnu.org; 5 May 2013 07:04:00 +0000 Received: from localhost ([127.0.0.1]:58427 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UYszI-0003EY-73 for submit@debbugs.gnu.org; Sun, 05 May 2013 03:04:00 -0400 Received: from eggs.gnu.org ([208.118.235.92]:46714) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UYszD-0003EG-FT for submit@debbugs.gnu.org; Sun, 05 May 2013 03:03:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UYsyO-0005HD-NX for submit@debbugs.gnu.org; Sun, 05 May 2013 03:03:05 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-101.2 required=5.0 tests=BAYES_40,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, USER_IN_WHITELIST autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:45439) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYsyO-0005Gx-K7 for submit@debbugs.gnu.org; Sun, 05 May 2013 03:03:04 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58074) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYsyN-0000np-NH for bug-gnu-emacs@gnu.org; Sun, 05 May 2013 03:03:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UYsyM-0005G4-UL for bug-gnu-emacs@gnu.org; Sun, 05 May 2013 03:03:03 -0400 Received: from plane.gmane.org ([80.91.229.3]:52750) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYsyM-0005Fs-JD for bug-gnu-emacs@gnu.org; Sun, 05 May 2013 03:03:02 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UYsyK-0005ec-D5 for bug-gnu-emacs@gnu.org; Sun, 05 May 2013 09:03:00 +0200 Received: from li511-224.members.linode.com ([66.175.216.224]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 05 May 2013 09:03:00 +0200 Received: from sdl.web by li511-224.members.linode.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 05 May 2013 09:03:00 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Leo Liu Subject: Re: bug#14300: 24.3; comint-dynamic-complete-functions breaks Date: Sun, 05 May 2013 15:02:49 +0800 Lines: 12 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: li511-224.members.linode.com Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAAGFBMVEUKDAg1NjRWV1V9fnyg op/DxcLk5uP8/voi63ReAAAACXBIWXMAAAWJAAAFiQFtaJ36AAAAB3RJTUUH1goZAgAz00bgXgAA AeVJREFUKM9lk0Fz2jAQhQXJD3CCO70CmcC1YMtcWyTZ14Bl69xats4N9r6/3zWQBlodNKNPu/s0 b1cCQFuZGpfVVh3vAvBJolIXRkapSuoRUtIdFyo1Y5xSdlAj7OtvD1XnXxmWRi+eWgcxyCed1lVV B1CrKyujMoi+eLA5kU1SsjoHlW+nQjTtFxk4MXgrOxvIqzoTZR8XgPaLl419zgsMaSGFPiUOZCIh thsx5Xy9NsK8Kwf/JoQgMxcVJ301HKkcSWaT0O7FY056J4U9xcYfnmVXG4801lW6lqwu2nKFZoHC HuzvaTVndZ+LaRQgZdthXw1cpynEkLEwyFHXk/aIxNQ6QeooJuzPMB+wn+D7JJNsiCcVA13/A3h/ xE9J+WidpAwoYNmRFwyvSRhNVtsdaAewzZZP5uw82QL9+tyNfocyP0McAzICUr5Mk9RdIjWasUNx aIIt6NK4ZtXIMdfMQt3nuMAyWbLI4DqZ4xPq/ag8jPond4XU/cLuOgw6XCFX/YCUfcDAMMH58fD4 G9kDchwfqVefkBwup2uZM+Q4WhJt5jN3AxXCsaS2yXEDuWgS8VOzW0gFjhEPmLyFMKBFaLb1HRwc DiaKwx0EeTMRYnYPQRW3PP4HApvlMv0PttX5v/D6Aws3IOSEwzmLAAAAAElFTkSuQmCC User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (OS X 10.8.3) Cancel-Lock: sha1:ZvKPVifS0JXmlJknUC4pLb3bl4Y= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) On 2013-05-05 14:39 +0800, Stefan Monnier wrote: > Good question. Can file names really occur at the same places as > function names in Octave? F("arg1", "arg2", ...) can be written as F arg1 arg2 ... in octave. For example 'help sin' and 'cd /usr'. So there is no clear way to detect whether a position is file-completion or function-completion given the fact that user can define a function that does do both in the same position. Leo From debbugs-submit-bounces@debbugs.gnu.org Sun May 05 22:39:32 2013 Received: (at 14300) by debbugs.gnu.org; 6 May 2013 02:39:32 +0000 Received: from localhost ([127.0.0.1]:59252 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UZBKt-0004fY-Us for submit@debbugs.gnu.org; Sun, 05 May 2013 22:39:32 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:15401) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UZBKs-0004fM-7n for 14300@debbugs.gnu.org; Sun, 05 May 2013 22:39:30 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFMCqRF/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDpHqBXoMT X-IPAS-Result: Av4EABK/CFFMCqRF/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDpHqBXoMT X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="11133004" Received: from 76-10-164-69.dsl.teksavvy.com (HELO pastel.home) ([76.10.164.69]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 05 May 2013 22:38:30 -0400 Received: by pastel.home (Postfix, from userid 20848) id 6C5D067A30; Sun, 5 May 2013 22:38:34 -0400 (EDT) From: Stefan Monnier To: Leo Liu Subject: Re: bug#14300: 24.3; comint-dynamic-complete-functions breaks Message-ID: References: Date: Sun, 05 May 2013 22:38:34 -0400 In-Reply-To: (Leo Liu's message of "Sun, 05 May 2013 15:02:49 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 14300 Cc: 14300@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) >> Good question. Can file names really occur at the same places as >> function names in Octave? > F("arg1", "arg2", ...) can be written as F arg1 arg2 ... in octave. For > example 'help sin' and 'cd /usr'. > So there is no clear way to detect whether a position is file-completion > or function-completion given the fact that user can define a function > that does do both in the same position. While there are cases where there is ambiguity, there are many where the ambiguity can be lifted: You could prevent function completion within a string, so file name completion still won't work after 'cd /u' but it will after 'cd "/u'. Similarly you might disable function completion if the "current function name" includes a / (assuming real functions don't include a slash in their name). In the worst case, you might want to use ":exclusive t", tho it means that function completion won't be able to benefit from fancier completion styles. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sun May 05 23:41:43 2013 Received: (at 14300) by debbugs.gnu.org; 6 May 2013 03:41:43 +0000 Received: from localhost ([127.0.0.1]:59289 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UZCJ4-0000QV-An for submit@debbugs.gnu.org; Sun, 05 May 2013 23:41:43 -0400 Received: from mail-pa0-f42.google.com ([209.85.220.42]:63677) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UZCJ1-0000Q3-DU for 14300@debbugs.gnu.org; Sun, 05 May 2013 23:41:40 -0400 Received: by mail-pa0-f42.google.com with SMTP id bj3so1797004pad.29 for <14300@debbugs.gnu.org>; Sun, 05 May 2013 20:40:44 -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=kYIljeZj5W1Bte4glQhgS4N1kTrEEwF0lqh1KK06p2U=; b=OP41OrzLn5p2LY/9XRizwsfTECyHQBAP0okZx2cbjoaTcrUaSXeuTuDF5LKwifWRQb Mwq9X0DZAgygBYgnrQHG/FCQR1KWUMnSSbaG/Ne/0KL8LcsbmJ7v6vVzm8Pg+IZCcsX/ LdYjdxSCXcPd6nn43NGOkL61b2/3OtPDkOP9UCIs4hlEHewXi9/Mj6wt3GTs+PPIXiA3 vZe/z83cznUnvwfVG6fsJMxGCkYDWbxyGnJnmucMPxG9QWeSUFu+srXnal1Zm9VEUNFE 74EqtCFdycRStpfKxHik+ssYdb4s15dgb3Pcx+QSaVntnM2uZCByhsOZLP5ILzXE/f4r tNUg== X-Received: by 10.68.221.200 with SMTP id qg8mr23862138pbc.58.1367811643797; Sun, 05 May 2013 20:40:43 -0700 (PDT) Received: from Zeuss-MacBook.local (li511-224.members.linode.com. [66.175.216.224]) by mx.google.com with ESMTPSA id l4sm22029048pbo.6.2013.05.05.20.40.41 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 05 May 2013 20:40:43 -0700 (PDT) From: Leo Liu To: Stefan Monnier Subject: Re: bug#14300: 24.3; comint-dynamic-complete-functions breaks References: Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAAGFBMVEUzRVhbQj4eZqO6SjnT eWpxnMetm5b6/PmidmqrAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1F B9cBBwMLBfKABCMAAAFoSURBVCjPtZI9a8MwEIaFoc7aYDdelQMna0Em3tsSr0XUeE2Q6a22a+v+ fk8fSSBkbDUI6dHpfe9OEvRgiD+ApqKPJgJeB6iUUXWESjUe/ig38AJrhqqvaU2nTIXbNvOQ40fe qdry4kyGoVWsfCQalXpHnJGM01wjWdYbMlXNFdsZDO69m9aqNqxEJqTEgbM5OF7wlEfIoll1Ked4 LbM5X2EdILLokEdmI8z7g5cKED0cuTC930TYhy7ZDekkXVGw/L60TguJePPxcJF48lpsSUWEA/Ju jGFNgJOXc4Hz7TmAdBeu5Ve4AEjOi2/2jfd3cAJZ+IbNrvdjgBZY01b+HTuG3cLws6BJZqVOj/pp T0OqVwx3rFq+QmJwx3loK5JSLEhDIt62+mtC2C+SrAUxEbV6C6v2BRbd6pILBKFpepKZJHgGgrKF sptSUUoczpwg2pQ7ZH1tgs0ou/917mzz6Cs2//C978cv5l07L02orIEAAAAASUVORK5CYII= Date: Mon, 06 May 2013 11:40:35 +0800 In-Reply-To: (Stefan Monnier's message of "Sun, 05 May 2013 22:38:34 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (OS X 10.8.3) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 14300 Cc: 14300@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On 2013-05-06 10:38 +0800, Stefan Monnier wrote: > While there are cases where there is ambiguity, there are many where the > ambiguity can be lifted: > > You could prevent function completion within a string, so file name > completion still won't work after 'cd /u' but it will after 'cd "/u'. > Similarly you might disable function completion if the "current function > name" includes a / (assuming real functions don't include a slash in > their name). > > In the worst case, you might want to use ":exclusive t", tho it means that > function completion won't be able to benefit from fancier completion styles. It would be nice if there is a way I can provide completion-at-point with two tables and it will just try them one after another if the preceding table has no match. In most cases path starts with no leading / and function completion needs to work well in strings too due to its inline functions: f = inline("sin(x)^2 + 2"); Octave's syntax is eccentric. A 80% solution might be to special-case 'cd', 'rmdir', 'source', 'unlink' etc. Leo From debbugs-submit-bounces@debbugs.gnu.org Mon May 06 09:34:29 2013 Received: (at 14300) by debbugs.gnu.org; 6 May 2013 13:34:30 +0000 Received: from localhost ([127.0.0.1]:59603 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UZLYj-0004h4-H6 for submit@debbugs.gnu.org; Mon, 06 May 2013 09:34:29 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:54070) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UZLYi-0004gt-2e for 14300@debbugs.gnu.org; Mon, 06 May 2013 09:34:28 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFMCqRF/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDpHqBXoMT X-IPAS-Result: Av4EABK/CFFMCqRF/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDpHqBXoMT X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="11203200" Received: from 76-10-164-69.dsl.teksavvy.com (HELO pastel.home) ([76.10.164.69]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 06 May 2013 09:33:23 -0400 Received: by pastel.home (Postfix, from userid 20848) id DC9206A668; Mon, 6 May 2013 09:32:59 -0400 (EDT) From: Stefan Monnier To: Leo Liu Subject: Re: bug#14300: 24.3; comint-dynamic-complete-functions breaks Message-ID: References: Date: Mon, 06 May 2013 09:32:59 -0400 In-Reply-To: (Leo Liu's message of "Mon, 06 May 2013 11:40:35 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 14300 Cc: 14300@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > It would be nice if there is a way I can provide completion-at-point > with two tables and it will just try them one after another if the > preceding table has no match. 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. Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue May 07 04:19:29 2013 Received: (at 14300) by debbugs.gnu.org; 7 May 2013 08:19:29 +0000 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 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 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) 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) From: Leo Liu To: Stefan Monnier Subject: Re: bug#14300: 24.3; comint-dynamic-complete-functions breaks References: 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= Date: Tue, 07 May 2013 16:18:15 +0800 In-Reply-To: (Stefan Monnier's message of "Mon, 06 May 2013 09:32:59 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (OS X 10.8.3) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 14300 Cc: 14300@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) 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") From debbugs-submit-bounces@debbugs.gnu.org Thu May 09 21:21:46 2013 Received: (at 14300-done) by debbugs.gnu.org; 10 May 2013 01:21:46 +0000 Received: from localhost ([127.0.0.1]:35147 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Uac1q-0004Zl-BJ for submit@debbugs.gnu.org; Thu, 09 May 2013 21:21:46 -0400 Received: from mail-pb0-f54.google.com ([209.85.160.54]:59069) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Uac1k-0004ZT-1h for 14300-done@debbugs.gnu.org; Thu, 09 May 2013 21:21:44 -0400 Received: by mail-pb0-f54.google.com with SMTP id rr4so2369083pbb.27 for <14300-done@debbugs.gnu.org>; Thu, 09 May 2013 18:21:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:subject:references:face:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=7dpAg1v3sCX6brzYIO1nwVSmZCNEerY9zAk4B/ylFBM=; b=OL6vGwmkNKU9ufv9ioCpMtTOOYnxC3E3EhEGj5WvIO2Z9AXu2YvKRqPmcyjh7iJ0UX ehhQYS/QEtocgLlOpj3P3oxBmAqCLi6uV/sUQkzB55rTGG6w50wruMF5Xa9cTLHjRCZK nPFyRS+KcWDABwAPcFVAElYiu4ueKuFxj1OMDkXWaKibwqb6NABVWjZh1R6+h4/a0pEm 6lX4IokT8DqjBJRsaxdiji5RkGtvxh7Pm3LS9fwtteYXUY7iG0KkhnqPr1eeQH00O4CJ bEsA3CsyniKdC/LH/LQfcNIxkiGTKFE7Rx5zMgGK4tARCiUPLto8jJqtvgS7pYjOR0Gd ak+g== X-Received: by 10.66.120.164 with SMTP id ld4mr15465288pab.187.1368148891395; Thu, 09 May 2013 18:21:31 -0700 (PDT) Received: from Zeuss-MacBook.local (li511-224.members.linode.com. [66.175.216.224]) by mx.google.com with ESMTPSA id cp1sm416465pbc.42.2013.05.09.18.21.29 for <14300-done@debbugs.gnu.org> (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 09 May 2013 18:21:30 -0700 (PDT) From: Leo Liu To: 14300-done@debbugs.gnu.org Subject: Re: bug#14300: 24.3; comint-dynamic-complete-functions breaks References: Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoAgMAAADxkFD+AAAADFBMVEUvT09qWs3/pQD///+J kUVcAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9cBBwMLOd3veKQA AACuSURBVBjTldE9CgIxEAXgB+lEyFUC2wo5ikdZ8DSypxhMY7H9VuIVwlqkGRgnm59VsHGafIQ3 CZlAtmKIRaHETgYa12lqvEsPYKf8wXHsPGfqPaUM0g9aJPKFXkmNQmSDqwzz4Fpgpz+6WAPY2z5o uPJJpu0uypcl4nyCibMLQ8lCiVjayLoQvw5LsVKQuHPRR958HZbOcVsKeepcLxpByjycGvnKmY+c MBvrtyjfe0vmuLvdq/kAAAAASUVORK5CYII= Date: Fri, 10 May 2013 09:21:21 +0800 In-Reply-To: (Leo Liu's message of "Tue, 07 May 2013 16:18:15 +0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (OS X 10.8.3) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 14300-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Fix in trunk for octave mode instead. From unknown Mon Jun 23 20:19:38 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 07 Jun 2013 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator