From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [elpa] externals/corfu a44c778 1/2: Yet another hack: posn-at-point computation returns wrong y-coordinate on Emacs 28 Date: Thu, 15 Jul 2021 10:07:02 -0400 Message-ID: References: <20210715105707.10057.54746@vcs0.savannah.gnu.org> <20210715105709.4F14820D13@vcs0.savannah.gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15928"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Daniel Mendler Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jul 15 16:08:09 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m4224-0003tZ-Ic for ged-emacs-devel@m.gmane-mx.org; Thu, 15 Jul 2021 16:08:08 +0200 Original-Received: from localhost ([::1]:39736 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m4223-0004Kd-KO for ged-emacs-devel@m.gmane-mx.org; Thu, 15 Jul 2021 10:08:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50318) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m4219-0003Z5-6v for emacs-devel@gnu.org; Thu, 15 Jul 2021 10:07:11 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:3153) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m4215-0000H2-UT for emacs-devel@gnu.org; Thu, 15 Jul 2021 10:07:09 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id C9B69440A90; Thu, 15 Jul 2021 10:07:04 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 9492444091F; Thu, 15 Jul 2021 10:07:03 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1626358023; bh=X1ERE6ndWH8ADqWbkzEv24f2yCZcRu4hhBf4Kqv4EgE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=gOxph2pCce9f1Ae4kMKRN5qXgBQtgNKrtZSNkGDAEWNbCLalwn8SGAwtPYiMHF8XE PJy30K4mMQSL5REsPKRLcxZda5T5Ko4HNLqqFwWwDsDNO5Ip8TF3WcqlD03qyGBfK6 akxmg3emzjAeBUqdZdURWgGib4h/pHwJ2VBvztgFE63e+Cds2zslxGgm+6sGV3CoH0 xqOcFS9AmmcUwnakv6FJSzWexCvxYTBf09QlrgfCvm0QiCIIVQLfTScqiiw0/A3JcG rRyfzXcHH0ASPbDIBhAkA6Ua8qsy4Ye49cfwCUOhMs2S8IsRG15wreJlOZmKyl2aNy Dzba1zoSbTyLQ== Original-Received: from alfajor (unknown [216.154.29.138]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 68EE3120298; Thu, 15 Jul 2021 10:07:03 -0400 (EDT) In-Reply-To: <20210715105709.4F14820D13@vcs0.savannah.gnu.org> (ELPA Syncer's message of "Thu, 15 Jul 2021 06:57:09 -0400 (EDT)") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:271245 Archived-At: > Yet another hack: posn-at-point computation returns wrong y-coordinate on Emacs 28 [...] > - (pos (posn-x-y (posn-at-point pos)))) > + ;;; XXX HACK y-coordinate position computation is wrong > + ;;; if there exists a flymake underline overlay at that point. > + ;;; Take the y coordinate from the current point. > + (x (car (posn-x-y (posn-at-point pos)))) > + (y (cdr (posn-x-y (posn-at-point (point)))))) I would generally recommend against adding workarounds for bugs in development versions of Emacs (at least not before reporting the bug and also not before finding out that the bug won't be fixed promptly). Also I'd recommend making it clear in the code via comments and/or via version tests that this is a workaround for a specific bug in a specific version. Stefan PS: This is a general recommendation. I don't know if you've filed a bug report for it yet.