From mboxrd@z Thu Jan 1 00:00:00 1970
Path: news.gmane.org!.POSTED!not-for-mail
From: Philipp Stephani
Newsgroups: gmane.emacs.help
Subject: Flymake ignores buffer specified in `flymake-make-diagnostic'?
Date: Wed, 12 Dec 2018 20:48:57 +0100
Message-ID:
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 1544645394 26707 195.159.176.226 (12 Dec 2018 20:09:54 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 12 Dec 2018 20:09:54 +0000 (UTC)
To: help-gnu-emacs
Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Dec 12 21:09:50 2018
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 1gXApH-0006nO-Ip
for geh-help-gnu-emacs@m.gmane.org; Wed, 12 Dec 2018 21:09:47 +0100
Original-Received: from localhost ([::1]:47886 helo=lists.gnu.org)
by lists.gnu.org with esmtp (Exim 4.71)
(envelope-from )
id 1gXArO-0007Gg-5z
for geh-help-gnu-emacs@m.gmane.org; Wed, 12 Dec 2018 15:11:58 -0500
Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50411)
by lists.gnu.org with esmtp (Exim 4.71)
(envelope-from ) id 1gXAVU-0005Sg-BW
for help-gnu-emacs@gnu.org; Wed, 12 Dec 2018 14:49:21 -0500
Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
(envelope-from ) id 1gXAVS-0005JW-1X
for help-gnu-emacs@gnu.org; Wed, 12 Dec 2018 14:49:19 -0500
Original-Received: from mail-oi1-x235.google.com ([2607:f8b0:4864:20::235]:35596)
by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
(Exim 4.71) (envelope-from )
id 1gXAVM-0005DQ-QJ
for help-gnu-emacs@gnu.org; Wed, 12 Dec 2018 14:49:15 -0500
Original-Received: by mail-oi1-x235.google.com with SMTP id v6so16068165oif.2
for ; Wed, 12 Dec 2018 11:49:09 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
h=mime-version:from:date:message-id:subject:to
:content-transfer-encoding;
bh=xEYo3LxBlqGx6kzIgohg0VW2XMt7u2EYzHeFCtIaX2U=;
b=K6kaCdjQ452fycLBZScY86ECuwubLwMLmnJAqQN97YanOU+0+tk6PMbocOWvUkT7UC
2zDiqZaJ7JftBz08AHAo91Bzl5KgiBP8/Bs5JMdATUkVDSjPtLuOZdAsopnGah16W9zB
K9LLcqytlMQZYq/ZPY7IGTE9OWRZxltRp6aUf0G1P2UQCUZQEhYKWzNTHDlbyBZtpM+J
O2cG6yRpQXX4nc4SXn3KvtHMnqCHOGU2lEKzEmHES7nm4eJulr4gAZ37RnkIjZpX/E39
P3lsoDp7Ob7BtSBjitQZxluaB1qS8jrfpFURl5jkOxc+FRR65AKQfNqbG+yRciAjWX9+
rOCQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:from:date:message-id:subject:to
:content-transfer-encoding;
bh=xEYo3LxBlqGx6kzIgohg0VW2XMt7u2EYzHeFCtIaX2U=;
b=qhUDbL6cbL8cJRPxqLYQvAofCraZBxZ8rnKXAb26e4ckUQUOBCSyGKF3l7HDq0/e/a
DHXCIipAL4s6WJQSK18ZQq1dllAivJTFYVlvzM+sEF1wDnQZB4LSUrbF4UD68I4YVQC1
TCD3IOLvP4Ul+pVnPJ67gNbXTwA/MsKXchiNB/hou+ge5ly0wXdWrgpwjGPw8o9e9vuv
5OWPFsnCgl0TD7s68uBf6Z/WqJuKpCvMY8k5V4agSQu+LpMby9b4jOGYiWpVJ0/JzL41
UC0bN1KZKYXMoI8ssuVMctIzbJgFvwKM8gCh6FEwHco9EVWcOS7I1L/K194cHqXqXg1L
bmxg==
X-Gm-Message-State: AA+aEWanwaxJZNNeBPpBrYbYbcpxl3dBFmo9nDlfOKyRfIqa99+DChQE
t0oZEXrjpfofe1gPG1hsvz5Rx72hzsEzEcwKCUlsdSOz
X-Google-Smtp-Source: AFSGD/UmsqHWEwZVuN/birzaWH2dM9sULDV2l6kikEyUa7vVq+e+0Uh0pY7ey/MWTaaEXCRNc0O28ryCMf7lwT16EIQ=
X-Received: by 2002:aca:5d84:: with SMTP id r126mr1230048oib.227.1544644148454;
Wed, 12 Dec 2018 11:49:08 -0800 (PST)
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
recognized.
X-Received-From: 2607:f8b0:4864:20::235
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:118983
Archived-At:
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-diagnostics)=
))
(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!