all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: emacs-devel@gnu.org
Subject: Re: Thoughts on getting correct line numbers in the byte compiler's warning messages
Date: Sat, 10 Nov 2018 10:59:45 +0000	[thread overview]
Message-ID: <20181110105945.GA5515@ACM> (raw)
In-Reply-To: <87tvkrngws.fsf@web.de>

Hello, Michael.

On Fri, Nov 09, 2018 at 03:06:27 +0100, Michael Heerdegen wrote:
> Alan Mackenzie <acm@muc.de> 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.

Oh, yes, we know about this, all right!  It's because
read-with-symbol-positions doesn't work reliably (there are several bugs
open about warning messages reporting wrong positions) that we're trying
to develop something better.

> > 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.

I'm not sure I follow you, here.  Surely the "right" cons is the one
containing the symbol occurrence whose position is known?  Or the one
containing that, and so on.

Literal strings could also be located, in much the same way as for
symbol occurrences.  Right at the moment, I don't know how much these
things will slow Emacs down by.

> 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).

Yes, it sounds like this could use the "located symbols" feature, too.

Right at the moment I'm trying to get SYMBOLP to recognise both normal
symbols and "located symbols".  This is causing a segfault on building
such a test Emacs.  :-(

> Thanks,

> Michael.

-- 
Alan Mackenzie (Nuremberg, Germany).



  reply	other threads:[~2018-11-10 10:59 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-01 17:59 Thoughts on getting correct line numbers in the byte compiler's warning messages Alan Mackenzie
2018-11-01 22:45 ` Stefan Monnier
2018-11-05 10:53   ` Alan Mackenzie
2018-11-05 15:57     ` Eli Zaretskii
2018-11-05 16:51       ` Alan Mackenzie
2018-11-06  4:34         ` Herring, Davis
2018-11-06  8:53           ` Alan Mackenzie
2018-11-06 13:56     ` Stefan Monnier
2018-11-06 15:11       ` Alan Mackenzie
2018-11-06 16:29         ` Stefan Monnier
2018-11-06 19:15           ` Alan Mackenzie
2018-11-06 20:04             ` Stefan Monnier
2018-11-07 12:35               ` Alan Mackenzie
2018-11-07 17:11                 ` Stefan Monnier
2018-11-07 17:00           ` Alan Mackenzie
2018-11-07 17:25             ` Stefan Monnier
2018-11-07 18:47               ` Alan Mackenzie
2018-11-07 19:12                 ` Stefan Monnier
2018-11-08 14:08                   ` Alan Mackenzie
2018-11-08 17:02                     ` Stefan Monnier
2018-11-08 22:13                       ` Alan Mackenzie
2018-11-11 12:59                         ` Alan Mackenzie
2018-11-11 15:53                           ` Eli Zaretskii
2018-11-11 20:12                             ` Alan Mackenzie
2018-11-11 20:47                               ` Stefan Monnier
2018-11-12  3:30                                 ` Eli Zaretskii
2018-11-12 16:19                               ` Eli Zaretskii
2018-11-12 14:16                             ` Alan Mackenzie
2018-11-12 15:44                     ` Alan Mackenzie
2018-11-12 20:36                       ` Stefan Monnier
2018-11-12 21:35                         ` Alan Mackenzie
2018-11-14 13:34                           ` Stefan Monnier
2018-11-15 16:32                             ` Alan Mackenzie
2018-11-15 18:01                               ` Stefan Monnier
2018-11-16 14:14                                 ` Alan Mackenzie
2018-11-08  4:47 ` Michael Heerdegen
2018-11-08 11:07   ` Alan Mackenzie
2018-11-09  2:06     ` Michael Heerdegen
2018-11-10 10:59       ` Alan Mackenzie [this message]
2018-11-10 13:20         ` Stefan Monnier
2018-11-11  7:56         ` Michael Heerdegen
2018-11-08 13:45   ` Stefan Monnier
2018-11-09  3:06     ` Michael Heerdegen
2018-11-09 16:15       ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181110105945.GA5515@ACM \
    --to=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    --cc=michael_heerdegen@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.