bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#19466: 25.0.50; xref-find-def doesn't find C functions


From: martin rudalics
Subject: bug#19466: 25.0.50; xref-find-def doesn't find C functions
Date: Tue, 20 Jan 2015 09:01:30 +0100

> To me, xref--save-to-history looks like it's exploiting implementation
> details that could change in the future.

They could change, of course.  But since `xref--save-to-history'
exploits them, its designers should be able to participate in such
changes in the future.

> Possibly because I haven't
> found good documentation for the quit-restore values.

Hmm...  They are documented in the Window Parameters section.  What do
you miss?

>> That's what I thought.  Note in this context that some people might have
>> globally bound `quit-window' to some key other than 'q' and might want
>> to quit *xref* with that.
>
> You obviously mean [remap quit-window].

No.  IMO it should be up to the user to remap `quit-window'.

> I wouldn't say "prefix argument means kill" is inherently intuitive,

Backward compatibility.  That's also why `quit-window' has KILL as first
argument :-(

> but sure, a remapped command should mimic behavior of the original
> command as close as possible (I just wasn't aware of it).

What I meant was that people might be used to kill the *xref* buffer
along with closing its window or use `kill-buffer' directly on *xref*.
And that xref should be aware of that and act accordingly, for example,
by removing its hooks, _if any_.  Probably in `kill-buffer-hook'.

>> If a user
>> does that and a buffer gets killed by the way and the user later on
>> decides to redisplay that buffer via xrefing, she has to pay the price
>> of re-reading that buffer from file.  That's why this feature should be
>> optional.
>
> Does what?

Remove *xref* from display, later on display *xref* again and try to
visit a buffer that was killed in between by xref.

> I wouldn't necessarily agree (the keys and allowed commands could be
> customizable), but ok, let's not go that way.

I don't want to impose my dislike on others.  But if you want to do
things modally you should give people means to optionally do things
manually.

IDE lovers, for example, might want to keep a small *xref* window
permanently open in some corner of the frame, with backward/forward
buttons for navigating their xref history.

And I'd probably plug in a timer-driven variant of `xref-next-line'
where moving to some particular line in the *xref* buffer window will
display the tag in another window, provided point remains sufficiently
long on that line.

martin





reply via email to

[Prev in Thread] Current Thread [Next in Thread]