From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.devel Subject: Re: Thoughts on getting correct line numbers in the byte compiler's warning messages Date: Fri, 09 Nov 2018 03:06:27 +0100 Message-ID: <87tvkrngws.fsf@web.de> References: <20181101175953.GC4504@ACM> <87efbwuqek.fsf@web.de> <20181108110723.GA5041@ACM> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1541729110 21216 195.159.176.226 (9 Nov 2018 02:05:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 9 Nov 2018 02:05:10 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 09 03:05:06 2018 Return-path: Envelope-to: ged-emacs-devel@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 1gKwAU-0005PS-BA for ged-emacs-devel@m.gmane.org; Fri, 09 Nov 2018 03:05:06 +0100 Original-Received: from localhost ([::1]:59880 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gKwCa-0001vY-Fe for ged-emacs-devel@m.gmane.org; Thu, 08 Nov 2018 21:07:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40087) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gKwBy-0001vS-B5 for emacs-devel@gnu.org; Thu, 08 Nov 2018 21:06:39 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gKwBu-0001Nq-6i for emacs-devel@gnu.org; Thu, 08 Nov 2018 21:06:38 -0500 Original-Received: from mout.web.de ([217.72.192.78]:41455) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gKwBt-0001Mk-OW for emacs-devel@gnu.org; Thu, 08 Nov 2018 21:06:34 -0500 Original-Received: from drachen.dragon ([94.218.210.177]) by smtp.web.de (mrweb101 [213.165.67.124]) with ESMTPSA (Nemesis) id 0M3Bhz-1fTf0t3os3-00svGE; Fri, 09 Nov 2018 03:06:29 +0100 In-Reply-To: <20181108110723.GA5041@ACM> (Alan Mackenzie's message of "Thu, 8 Nov 2018 11:07:23 +0000") X-Provags-ID: V03:K1:oZPN4c/ESvBtyPGSWBdhnej+FmPTL1hhKCmZFN6xmgPKIjKAwK2 3DfBhlWmEqvN7x2SKgOxSRpJ1aYhUx7mv5sD8oZxp1I7KIT6zEJeyCxMo5mPyenGPj1GRNE 1zoc4IKkIEB6L7n6pL+0JC+DYS6aYDkokn8WHQfscuhYT2BLK/bz7zjfjEbVuaCZ8M1oNc5 mWqi4O1z1qFyWDIN4A/iQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:LFubFjKOVYc=:dHrje5I5DopK/5o59Eq5wg E/5Zq9+PBnXUu7woMCZ4nfn49U6r5Z1RsnoZy6R6Vvz7Pd2TmxAE+Wswys8MrWpqnMb2zcPtI 9jkFetDWomcsncsEDO1MBo11BP4dWpl/rmcixFVmwjAkkd89AHH3FQSn2C2oB//wz31uEsQO+ dj776CbREao0tCL+cuhmjT8gAr8XRmMh+sLx37hgnM2qQendfZmpdc+sKGUJUhn0XyEktZpkz CzTJ8u6LYXh9hXeN70vgeIvKHZ/TfveC9X4rIXafwDaottUiwTCxFav6vcAcoE6Mf8vxAYVWQ Oi+xDejfUdr5baf1bKbx26xWTwBqZLT/vWyHuXHXECPYyTbpG266qjBwc1RhmEabb2Pv6cVm8 6SkEuZNNkHzfB9K86CPeuoun80h0sacwYO0o4Mi6L7hd77REpm+5IyAlrPClMi9AH9Lh8Amtn gCavRKmrPu7PD4qFi8hH4TViFPNE6dN1W9a8S1gHZDfPKNsTbzDoJkdVamrsJVumjwsUta92p /i6kStXKUzioib3/8XgYeK6WswpYx9vO2ikTeDJgr9O8rLfMM2fiO5KB+WzEFb3Sv9uIotx/4 iUlgQTxJJmFL/p8Fgq34U0U8EFpQdG7mwXJx6nLc8DyHnCcqi7lGvVXt3QK5uR8ZbxlNGiHT4 FvxRPEwm/Brac5vOUmL+H2iJ8XI7pxYcQfARWQ8papA/Fqq27fV4dl7kmnhtNBlaTKtqha9oN fBNM1XW4JntrgB1CCiszRNh+Tb8Ayoe9wg4EmyqJFd6Qh8J3Gf6xfHNC+JFcGDevwhCvWubg X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 217.72.192.78 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:231062 Archived-At: Alan Mackenzie writes: > Stefan's latest suggestion is to use the above approach just on symbol > occurrences. (Sorry!). These are preserved through transformations > much more than cons cells are. BTW, just to be sure, you know about the already existing variable `read-with-symbol-positions', right? Only a detail for what you need to do, though. > If some code wants to get the starting position of a cons, the source > code will surely be in a buffer somewhere. As long as there is a symbol > in the cons (i.e., we don't have ()), surely the cons position can be > found from the contained symbol, together with backward-up-list in the > source buffer. Or something like that. Sure. The problem is how to find the right cons when several such places exist. Likewise for strings etc. My requirement is quite similar to yours, btw. Say, in a buffer at some position there is a list (X1 X2 X3) and you want to match that with (i.e. el-search for) pattern `(,P1 ,P2 ,P3) with certain PATTERNS Pi. In an ideal world, when the Pi are (tried to be) matched against the Xi, the Pi would know the buffer location of Xi, so that Pi could e.g. use a `guard' checking the "current" value of point. Since patterns can do destructuring like above, similar to your case I would want the position info to somehow survive transformations (mostly list accessing functions in my case). Thanks, Michael.