From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eric Ludlam Newsgroups: gmane.emacs.devel Subject: Re: completion-at-point + semantic : erroneous error Date: Sun, 27 Oct 2019 07:52:10 -0400 Message-ID: <1a694f37-5f8a-9e75-2ca4-feafa2b55504@gmail.com> References: <957ad127-0d84-69e3-49b6-9799975bd724@siege-engine.com> <9cf7e484-9a86-ab1c-b04f-9dc3e7c91974@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="49898"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 Cc: Emacs Development , Eric Ludlam To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 27 12:52:28 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iOh5s-000Cjs-AX for ged-emacs-devel@m.gmane.org; Sun, 27 Oct 2019 12:52:24 +0100 Original-Received: from localhost ([::1]:44970 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOh5r-0004qU-6F for ged-emacs-devel@m.gmane.org; Sun, 27 Oct 2019 07:52:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51784) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOh5k-0004q6-3x for emacs-devel@gnu.org; Sun, 27 Oct 2019 07:52:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iOh5j-0002CT-19 for emacs-devel@gnu.org; Sun, 27 Oct 2019 07:52:15 -0400 Original-Received: from mail-qt1-x82f.google.com ([2607:f8b0:4864:20::82f]:37995) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iOh5i-0002CE-RT for emacs-devel@gnu.org; Sun, 27 Oct 2019 07:52:14 -0400 Original-Received: by mail-qt1-x82f.google.com with SMTP id t26so424673qtr.5 for ; Sun, 27 Oct 2019 04:52:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=PTtCwculPCOmSWhiieZKLiRqVfMxu9gIEdRK4xGhY5Y=; b=TxYbKEILj1r8BV003ZczTqtu0iVqIcHvSnQ5q+IXodwPton2hHtDL3PJz4A/lbJQdw KEm2vj76xjyJdFMuZ1Y9YTr0XQfqLN4ybwasxEIVogwQ3qcu4lhLQh1zxDCvl/z07ceu qnZstbk3XYgHcOUYBu7NhHlIaMOqyavPGiVOlztlUt+O0o3ud+btUAahlePykUdieEMK cex48ryvHP/h+Gu66839nXlT4zQ5rXAKGv4mgsc0LE62c6E4ruomO+sGen2htvfQxHby 5dvJtA1Pz+e9Lz8oyNqzP4K94rmuM5Fqlm3cF4Vknl4I255T/X6UAmxGv13dzUuaBAit B4Qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=PTtCwculPCOmSWhiieZKLiRqVfMxu9gIEdRK4xGhY5Y=; b=Ohsozhikm9zjiizalgDBOSWXzJ3q2CFpjAP6UuzXoAN/Zov643bG2ak9Z/kga8aJoj ATRxvpIvcSk4qoTWH/Yoi2uiqJzt1HFZgKL69wwYwgT9zJlRVGWbk4lOMLB8b9TDOt9B h800vQ40Ub9SjGMUMvreDUCcIyxo8GTbQy6PQ0VgVVBlcvWcpmQzVFHFYiBixuFTb6DW e5jlytmWkpydqHFT8ek06jJljCRw5W/ND1gSTtVkYlmV+sBiwOoqRc8Ca8tyNFDX8iHb 0Ay762A6LYkd9mLaXUaaLSc2H1yhJnEfkkcmiVn+kvwwQasgrAcSj6HtfKsLHa+cYibN ftUw== X-Gm-Message-State: APjAAAViGDnbFjHDVJwvCu8cnO34dzJKaJR/oTNKmxW997z/POv/dGYs mvL12PpPEMFK1EEYDrO1N5meNYjf X-Google-Smtp-Source: APXvYqxybmsFRdZ4pRcIw08NH3vUoSHzsluh+F9OL6wTOM5L2mkQfRSjqLWTdqTVjU+8JE5g24zXkQ== X-Received: by 2002:a05:6214:178a:: with SMTP id ct10mr9651862qvb.94.1572177132320; Sun, 27 Oct 2019 04:52:12 -0700 (PDT) Original-Received: from [192.168.1.202] (pool-108-20-30-136.bstnma.fios.verizon.net. [108.20.30.136]) by smtp.googlemail.com with ESMTPSA id v4sm3742011qkj.28.2019.10.27.04.52.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 27 Oct 2019 04:52:11 -0700 (PDT) In-Reply-To: Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::82f X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:241514 Archived-At: On 10/23/19 4:18 PM, Stefan Monnier wrote: >> As a followup, I started using the shorter version of your patch, and found >> there are additional errors thrown from >> semantic-analyze-possible-completions-default (what will be a method in >> your patch).  I had to eliminate those errors to fully clean up the original >> problem that started this thread. > [ Sorry for taking so long to get back to it. ] > > After fighting for a while with your patch (it was full of NBSP chars > and wrapped lines) and then looking at it some more, I decided to > install the patch below instead which replaces the `catch` with > a `with-demoted-errors` (and places it in the caller instead). > Maybe those errors should indeed all be replaced by silently returning > nil, but the code currently goes through the trouble of building > more precise error messages, so I felt like maybe we should preserve > that info. > Thanks Stefan, and sorry about the bum patch.  I'll do attachments in the future. Your patch seems like a good start. One of the things that was driving me to fix this this is that I typically have debug-on-error on by default, so having this function run all the time via company-mode was disruptive.  It looks like with-demoted-errors will continue to allow debug-on-error to stop, which would be useful for debugging a real problem. That said, I think it is OK to move forward with the simple version of your patch as it will help anyone trying to do the same thing w/out debug-on-error. Eric