From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.help Subject: Re: Flymake ignores buffer specified in `flymake-make-diagnostic'? Date: Thu, 3 Jan 2019 15:40:31 +0000 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1546529950 26616 195.159.176.226 (3 Jan 2019 15:39:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 3 Jan 2019 15:39:10 +0000 (UTC) Cc: help-gnu-emacs To: Philipp Stephani Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 03 16:39:06 2019 Return-path: Envelope-to: geh-help-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 1gf55J-0006hs-S2 for geh-help-gnu-emacs@m.gmane.org; Thu, 03 Jan 2019 16:39:02 +0100 Original-Received: from localhost ([127.0.0.1]:55511 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gf57Q-0001Lg-Fi for geh-help-gnu-emacs@m.gmane.org; Thu, 03 Jan 2019 10:41:12 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:39802) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gf56z-0001LP-52 for help-gnu-emacs@gnu.org; Thu, 03 Jan 2019 10:40:45 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gf56y-000766-0c for help-gnu-emacs@gnu.org; Thu, 03 Jan 2019 10:40:44 -0500 Original-Received: from mail-qt1-x835.google.com ([2607:f8b0:4864:20::835]:40026) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gf56x-00075g-NO for help-gnu-emacs@gnu.org; Thu, 03 Jan 2019 10:40:43 -0500 Original-Received: by mail-qt1-x835.google.com with SMTP id k12so37267806qtf.7 for ; Thu, 03 Jan 2019 07:40:43 -0800 (PST) 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:content-transfer-encoding; bh=ZD1w0260/zHhakP6iUgf1fPSRwRkNOuo4TPpE9vPYw4=; b=c6rt0Y//78REBCaMZBXL9JDI4eg555C5NFWYDuS+FFZ0xT+ynRVAlVreZph1WoncOi s25NYGuZRvskplTMWayv0SlJPRssuOTlau/GGcJwidvv8mDVEI2usWDi3rBg1R0ZtSUQ AoWINN3oSE4RnxPMtGNBlv3qtbO0AILEyJFp1vo11aPJr3EhWai+dku0KZ1QPaSZ4B37 BuDT7EyPzJ15mJtS4ToICPe64uVOvi0NklN95vY9mS1xYOcQYK7oUN9VykqrFn7DWmrJ PVcK6LBrn2W3/RXhuNPpTdL9AHOSox8KfWQF+g97oudDWgD0s/+/FdvMW1agr9aKdMJM HpYw== 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:content-transfer-encoding; bh=ZD1w0260/zHhakP6iUgf1fPSRwRkNOuo4TPpE9vPYw4=; b=q4xD1rS9ZEixaXmjaz56LcNSH4sRWUq8ztLw48C0JMH+UdB/NXMi22WAjTjGySKnBe sZ95nSGq/dWp1pLk8bB8rvBKHk7HdiBNvkCluNy5IFojve70QdklFD/0z5XuJKU00zPS 7a0MItXna/kHLDGtY+Ha4STzeKxJ49MCFq/9rW2wsg84XLDtWrTIAbMsv8hcAjNMj7Xq VBtoh32x5TcHYfNjG48zJJ6Qxa22/w4LVu4/XKKCVH5OZe+F+FBacFmMFgGqPa36lDnP 2WU4grhlb8B4GcliriPYAop5OciOZqDLTUQcV+YGMjdZW015++Pfk71eFc6R/ODZ30UJ dXoQ== X-Gm-Message-State: AA+aEWZA3+AfvDICEi4WW+2LuiDAaNlDh1Wun76PlMTDv7yr6xYRuwjV AYYDVl3NqzkBqO82HspumNiOuSZEpyfBgunMrJ4= X-Google-Smtp-Source: ALg8bN77/PvWZt4cOQFzWygDQldOP23CXLnFbmdL1QbKb6cx4i3+SzqQN9m88c+Ue2xxtXIwSO8bJZDD70Prwk0HADY= X-Received: by 2002:ac8:88:: with SMTP id c8mr47632251qtg.218.1546530042911; Thu, 03 Jan 2019 07:40:42 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::835 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:119072 Archived-At: I stumbled upon this by chance (I don't systematically read help-gnu-emacs). Can you make a bug report out of this, and explain what the problem is in terms of user UI and Emacs -Q? Your code example is a bit too convoluted for me to grok an understand right now. Are you running into trouble writing a new backend? Also, flymake-make-diagnostic doesn't ignore the buffer passed to it, flymake-show-diagnostic uses it. But it is currently unspecified behaviour if you make a diagnostic for any buffer other than the one you're explicitly checking. It might be specified to do something useful in the future (think checking a .c file including a .h file). Jo=C3=A3o On Wed, Dec 12, 2018 at 8:11 PM Philipp Stephani wr= ote: > > Hi, > > I've noticed that Flymake ignores the buffer passed to > `flymake-make-diagnostic' and always uses the source buffer. For > example, in *scratch*: > > (require 'flymake) > (with-temp-buffer > (flymake-mode) > (insert "text a") > (let ((buf-a (current-buffer))) > (with-temp-buffer > (flymake-mode) > (insert "text b") > (let ((buf-b (current-buffer))) > (add-hook 'flymake-diagnostic-functions > (lambda (report-fn &rest _args) > (funcall report-fn (list (with-current-buffer buf-a > > (flymake-make-diagnostic buf-a (point-min) (point-max) > > :error "message"))) )) > nil :local) > (flymake-start) > (sit-for 1) > (list (cons 'buf-a (with-current-buffer buf-a (flymake-diagnostic= s))) > (cons 'buf-b (with-current-buffer buf-b > (flymake-diagnostics)))))))) > > =E2=87=92 ((buf-a) (buf-b #s(flymake--diag # 1 7 :error > "message" (lambda ... ...) nil #))) > > This seems a bit surprising, and I couldn't find documentation on it. > Is this working as intended? If so, would it be possible to clarify > the documentation a bit? Thanks! >