From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#25987: 25.2; support gcc fixit notes Date: Thu, 9 Mar 2017 18:18:04 +0200 Message-ID: References: <87lgsj1jle.fsf@tromey.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1489076354 14566 195.159.176.226 (9 Mar 2017 16:19:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 9 Mar 2017 16:19:14 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0 To: Tom Tromey , 25987@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Mar 09 17:19:10 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cm0mQ-0002ts-DW for geb-bug-gnu-emacs@m.gmane.org; Thu, 09 Mar 2017 17:19:06 +0100 Original-Received: from localhost ([::1]:35026 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cm0mW-0006Np-GX for geb-bug-gnu-emacs@m.gmane.org; Thu, 09 Mar 2017 11:19:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cm0mP-0006NX-Kh for bug-gnu-emacs@gnu.org; Thu, 09 Mar 2017 11:19:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cm0mM-0007OY-Eo for bug-gnu-emacs@gnu.org; Thu, 09 Mar 2017 11:19:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49710) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cm0mM-0007OJ-6u for bug-gnu-emacs@gnu.org; Thu, 09 Mar 2017 11:19:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cm0mM-0003hR-2Q for bug-gnu-emacs@gnu.org; Thu, 09 Mar 2017 11:19:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 09 Mar 2017 16:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25987 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25987-submit@debbugs.gnu.org id=B25987.148907629614169 (code B ref 25987); Thu, 09 Mar 2017 16:19:02 +0000 Original-Received: (at 25987) by debbugs.gnu.org; 9 Mar 2017 16:18:16 +0000 Original-Received: from localhost ([127.0.0.1]:47909 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cm0lc-0003gT-9r for submit@debbugs.gnu.org; Thu, 09 Mar 2017 11:18:16 -0500 Original-Received: from mail-wm0-f46.google.com ([74.125.82.46]:33983) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cm0la-0003gG-LE for 25987@debbugs.gnu.org; Thu, 09 Mar 2017 11:18:15 -0500 Original-Received: by mail-wm0-f46.google.com with SMTP id 196so36695961wmm.1 for <25987@debbugs.gnu.org>; Thu, 09 Mar 2017 08:18:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=8yHxMk+uvk8ISqj3v7FyvKXH/2ItGv138C99i4HJmkg=; b=sZqPBeLOABzVhV2SNV6NN1Z5phnKs3+YXkvm+V1kmnLL2avCoG9uYW+hy5/NW3NspO rkefxjlpyyhgh+pJBRbZQ+u2RyNNDGpanCaMMXXzGlSntTs+1W/j0BQxPW/dJpt8asp7 mRsVA9Zdvv+VrcaXYByUyiNvpgb+Zymw9h1iTsTOZ4xHIR1HkCCLH4/fSaripEawUkpT 1DBaY6ak90OgKnSAM1GdfPJIXAJxJ3j3GvehR2wFB6VynegDgCBcaRmjo19qg9roHTmD iPVMebzerSfMX6HDN1e+2dyliCYHUk/pDq7mf2k5LapR2/7A/+78S6uReEaVYVRCJGB5 ETdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=8yHxMk+uvk8ISqj3v7FyvKXH/2ItGv138C99i4HJmkg=; b=S3dSGjz/ydrS7T9jt08dObACXKZ2+92bjmL0w1BtC5vx84UElQk1hPal3lQo4wzknb 8ZC+1ihiMuPQ390OCqQGmhEVt0wl/72XiUO47YBfkodqYrHP/k4CXeVZCrANHA34Xh/K ZN7NayYVu7U/qzxLXN6u5lOrFadVNEh36svuB28Ipu2IKfvwZrRUmAz4Md6jutJ2JCZU D2oSHd23n/sfpbkx6r4wVIzoCrlmpzy9T6vg7Kgo7Mevrsod+KpzJb2yGcB9ee7ydb7R 0CVXNCGiA+MN/9YV2DbZge37ALfZIgla79DMNumn/JsMRQf1w1eem6W7B+LPIN5oRYsx tM6Q== X-Gm-Message-State: AMke39kHiEA1SroYVVxCIJZanQn4e80LP8JCJAIo3dW8Fu6VmnA/1a3rUSe2Nsi1t54hrg== X-Received: by 10.28.137.211 with SMTP id l202mr11188541wmd.118.1489076288291; Thu, 09 Mar 2017 08:18:08 -0800 (PST) Original-Received: from [192.168.0.133] (static-nbl2-118.cytanet.com.cy. [212.31.107.118]) by smtp.googlemail.com with ESMTPSA id j184sm27851108wmd.31.2017.03.09.08.18.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Mar 2017 08:18:07 -0800 (PST) In-Reply-To: <87lgsj1jle.fsf@tromey.com> Content-Language: en-US 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: 208.118.235.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:130374 Archived-At: On 05.03.2017 23:47, Tom Tromey wrote: > * One way for this to work would be to display the buffer and > show the proposed change as an overlay; and then use y-or-n-p > to ask whether it should be applied. I was thinking something like: > > (defun compilation--fixit-make-overlay (start end text) > (let ((overlay (make-overlay start end))) > (overlay-put overlay 'face 'diff-removed) > (overlay-put overlay 'after-string > (propertize text 'face 'diff-added)) > overlay)) > > With this approach perhaps nothing could be done if the fixit was > already visited, or if the buffer text already matches the > replacement. I'm not sure we want to tie this feature to compilation-mode. Many modes that derive from it don't support fix-its, e.g. those of them that run the test suites. And even for those that do, Compilation provides a very basic UI. Even to find and apply all fix-its, we'd need to add some new buffer, to show the list. On the other hand, this can be a quick-and-dirty way to try out the feature and how handy it is. Showing the "quick fix" buttons on top of the fix-it text can be it (not sure it that's the UI you had in mind).