From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Carlos Pita Newsgroups: gmane.emacs.bugs Subject: bug#33959: 26.1.90; python.el font-lock buffer wreaks havoc when company is enabled Date: Mon, 14 Oct 2019 21:52:03 -0300 Message-ID: References: <87h8eq332i.fsf@gmail.com> <87h84a6e42.fsf_-_@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="231524"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 33959@debbugs.gnu.org To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 15 02:53:13 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1iKB5L-000y4T-EW for geb-bug-gnu-emacs@m.gmane.org; Tue, 15 Oct 2019 02:53:11 +0200 Original-Received: from localhost ([::1]:59094 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iKB5J-0003mw-ME for geb-bug-gnu-emacs@m.gmane.org; Mon, 14 Oct 2019 20:53:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:32970) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iKB5D-0003kF-Gn for bug-gnu-emacs@gnu.org; Mon, 14 Oct 2019 20:53:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iKB5C-0003Y9-Hi for bug-gnu-emacs@gnu.org; Mon, 14 Oct 2019 20:53:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33650) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iKB5C-0003Y1-Ee for bug-gnu-emacs@gnu.org; Mon, 14 Oct 2019 20:53:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iKB5C-00022w-Aj for bug-gnu-emacs@gnu.org; Mon, 14 Oct 2019 20:53:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Carlos Pita Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 Oct 2019 00:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33959 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 33959-submit@debbugs.gnu.org id=B33959.15711007437821 (code B ref 33959); Tue, 15 Oct 2019 00:53:02 +0000 Original-Received: (at 33959) by debbugs.gnu.org; 15 Oct 2019 00:52:23 +0000 Original-Received: from localhost ([127.0.0.1]:42471 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iKB4Y-000224-VQ for submit@debbugs.gnu.org; Mon, 14 Oct 2019 20:52:23 -0400 Original-Received: from mail-yw1-f53.google.com ([209.85.161.53]:38143) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iKB4W-00021k-SN for 33959@debbugs.gnu.org; Mon, 14 Oct 2019 20:52:21 -0400 Original-Received: by mail-yw1-f53.google.com with SMTP id s6so6739279ywe.5 for <33959@debbugs.gnu.org>; Mon, 14 Oct 2019 17:52:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=acLd5Y4eXnIzCYqF6qfDloyZ9ngJd8mOGlY4h8g0MwE=; b=YobOevRZlfLDBkB8m8v8NcqPYNDhcES1rNYvkcEqWmaYacML8usqPRHv6BwEg+GU8L HxdrZLzMRbp4/Ahad68gUbezAhIwzsTNto8TQhbo2bZV4vRGm2PrvUXAnN8gdWIsplLx 5nd2jqXQMvV9Iq97k4yGVHMoeAOLo1pUhv2CPyLdPmiKssEkSblH2LFLBpP95G8Cx6ay +0tfeeUzxiPzRaaoSu9L5w/faUopm0FCWMIaIXxYrFwgGvOFKjvqUoCOlYs/jb50txaQ vYXcNmoPh7b0veTYJC7e2zEFpogcLTC+xBa1oZ2wRRYBoJwcRLt84ejHZdaRk2QQUgnw tezw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=acLd5Y4eXnIzCYqF6qfDloyZ9ngJd8mOGlY4h8g0MwE=; b=akCEDbIa1pCEq7MQscPywsi6puGdrkO8ReESoMxMvmW0GwyjHrr/4lnKZcUEmYoSYk VTp9yPr0+dj2szVxFjGcYD9/RQd/MkIGCSgOVTCV4GnXaXK7Zz1edoqjFIHr62iXF6vu YMI5CwE4djHWyRwZfAAxMX1jxGB5dBYK3w552b07S6onxhU6sHPDh8/cnlxEBg0Q9B9s v2qWbuh1CuS6kH7oS3Y3xJ+6nwvAb/6xXIbt8Wv7Yb2xHuYT9o2ie6VRenbOp6e2TQxp +EfYxkzFIiHidDt2aD03Bqwfys6RgXUtUTnTOeOQEv9AWNWvCktAnXZ31gD/HiQj98Ka z3ag== X-Gm-Message-State: APjAAAVuyPxLtIp5HRlJmcXCpSZ7m/NlRnp2Nux9+NzokrAeHzKuSxD0 HVu4tmu761QgVsprXwyXGpUn5jt4zY/5OagGeqQ= X-Google-Smtp-Source: APXvYqww4DXr6T3FSTOXnDfQhwvty0ZgshmIYbBsbx/dJvNu39+Xj9wlPQr9aDcGG+ZNsD9Uji+SGgBLWEly3cl9CMw= X-Received: by 2002:a81:57d4:: with SMTP id l203mr13923788ywb.277.1571100735129; Mon, 14 Oct 2019 17:52:15 -0700 (PDT) In-Reply-To: <87h84a6e42.fsf_-_@gmail.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.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" Xref: news.gmane.org gmane.emacs.bugs:169345 Archived-At: > And also the overlap with the Bug#32390 fix made things more > confusing; now that I've pushed it, at least that problem is gone. I'm in the process of creating a patch for this that applies on top of your recent commit and it's just wrapping everything into: (unless (string= output "") ... ) So I believe that if you already bought to other one this is way easier to buy :) Even without further digging into the specifics of the issue, I'd advanced an argument for adding that guard: > No matter the reason why empty output is being passed to the filter, > it's wrong for the filter to add a new line to the font lock buffer if > this happens. And the check for empty output was always there, but in conjunction with a check for "just a prompt": (if (and (not (string= "" output)) (not just-a-prompt)) do-something add-a-newline) I think it's clear this logic is faulty. Both an empty output and a just-a-prompt output are reasons not to do-something. But only just-a-prompt is a reason to add-a-newline. Have I been persuasive enough now :) ?