unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Dmitry Gutov <dgutov@yandex.ru>, Eli Zaretskii <eliz@gnu.org>
Cc: 19466@debbugs.gnu.org, Helmut Eller <eller.helmut@gmail.com>
Subject: bug#19466: 25.0.50; xref-find-def doesn't find C functions
Date: Wed, 21 Jan 2015 11:49:34 +0100	[thread overview]
Message-ID: <54BF843E.10907@gmx.at> (raw)
In-Reply-To: <54BF5345.9090303@yandex.ru>

 > Yeah, both should still work. I've pushed the buffer-killing implementation, please take a look.

The idea to do it via the KILL argument is good.  I think some
doc-strings are bad.  For example, instead of

(defvar-local xref--selected nil
   "t if the current buffer has ever been selected.
Used for temporary buffers.")

I'd say something like

(defvar-local xref--current nil
   "Non-nil if this buffer was current once while finding xrefs.")

And for `xref-quit' I'd describe the standard behavior first and the
KILL behavior afterwards.  Also I'm not sure it it's just cosmetics but
shouldn't the

     (pcase-dolist (`(,buf . ,win) history)
       (when (and (window-live-p win)
                  (eq buf (window-buffer win)))
         (quit-window nil win)))

precede the

     (when kill
       (let ((xref--inhibit-mark-selected t)
             kill-buffer-query-functions)
         (dolist (buf xref--temporary-buffers)
           (unless (buffer-local-value 'xref--selected buf)
             (kill-buffer buf)))
         (setq xref--temporary-buffers nil)))

part?  I can't test it currently because I always get

Debugger entered--Lisp error: (args-out-of-range "" 0)
   help-function-arglist(#[257 "\300\207" ["(No location)"] 2 "(No location)\n\n(fn ##)"] preserve-names)
   eieio--defmethod(xref-location-group nil xref-bogus-location #[257 "\300\207" ["(No location)"] 2 "(No location)\n\n(fn ##)"])
   byte-code("\300\301\302\301\303\"\"\210\304\301\303\305\306$\210\300\307\302\307\303\"\"\210\304\307\303\305\310$\207" [eieio--defalias xref-location-marker eieio--defgeneric-init-form nil eieio--defmethod xref-bogus-location #[257 "\300\301\302\x03\303\"\"\207" [user-error "%s" eieio-oref :message] 6 "\n\n(fn L)"] xref-location-group #[257 "\300\207" ["(No location)"] 2 "(No location)\n\n(fn ##)"]] 5)
   autoload-do-load((autoload "xref" 1640080 t nil) xref-find-definitions)
   command-execute(xref-find-definitions)

even after a bootstrap.

 > One drawback comes to mind:
 >
 > xref-goto-xref calls xref-quit without the KILL argument, so the temporary buffers are not cleared if you make a choice and press RET.

You can redisplay the *xref* buffer and provide the KILL there.

 >> previous-/next-history-element
 >
 > Not sure what these are.

Something like typing M-. doing something else and typing M-. again.  At
this time up/down should get you the next/previous history elements of
your xref searches.

 > Depends on what you want each of them to do.
 >
 > debugger-mode should probably set both relevant vars to the same values as emacs-lisp-mode. help-mode and Custom-mode - maybe too, although they might use some custom logic.
 >
 > In Info-mode, xref-find-function could use the index and the search functionality.

Will there be a canonical way to add these?

martin





  reply	other threads:[~2015-01-21 10:49 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-29 19:27 bug#19466: 25.0.50; xref-find-def doesn't find C functions Eli Zaretskii
2014-12-30  4:57 ` Dmitry Gutov
2014-12-30 15:31   ` Eli Zaretskii
2014-12-30 18:05     ` Stefan Monnier
2014-12-30 18:25       ` Dmitry Gutov
2014-12-30 18:34         ` Eli Zaretskii
2014-12-30 18:38           ` Dmitry Gutov
2014-12-30 22:44           ` Stefan Monnier
2015-01-02 17:52             ` Dmitry Gutov
2015-01-04 20:10               ` Stefan Monnier
2015-01-04 20:29                 ` Eli Zaretskii
2015-01-04 23:14                   ` Dmitry Gutov
2015-01-05  3:36                     ` Eli Zaretskii
2015-01-05  6:11                       ` Stefan Monnier
2015-01-16  3:37                       ` Dmitry Gutov
2015-01-16  7:47                         ` martin rudalics
2015-01-16  9:04                           ` Eli Zaretskii
2015-01-16  9:28                             ` martin rudalics
2015-01-19  3:31                           ` Dmitry Gutov
2015-01-19  8:28                             ` martin rudalics
2015-01-19 13:32                               ` Dmitry Gutov
2015-01-20  8:01                                 ` martin rudalics
2015-01-20 12:14                                   ` Dmitry Gutov
2015-01-20 14:51                                     ` martin rudalics
2015-01-21  7:20                                       ` Dmitry Gutov
2015-01-21 10:49                                         ` martin rudalics [this message]
2015-01-21 14:24                                           ` Dmitry Gutov
2015-01-21 16:54                                             ` martin rudalics
2015-01-21 18:00                                               ` martin rudalics
2015-01-21 20:02                                                 ` Stefan Monnier
2015-01-22  2:32                                                   ` Dmitry Gutov
2015-01-22 18:22                                                   ` martin rudalics
2015-01-21 19:02                                               ` Dmitry Gutov
2015-01-22  2:26                                               ` Dmitry Gutov
2015-01-22 18:22                                                 ` martin rudalics
2015-01-19 17:41                               ` Eli Zaretskii
2015-01-20  2:54                                 ` Dmitry Gutov
2015-01-20 17:24                                   ` Eli Zaretskii
2015-01-20 20:49                                     ` Dmitry Gutov
2015-01-21 16:25                                       ` Eli Zaretskii
2015-01-22  2:43                                         ` Dmitry Gutov
2015-01-22 18:02                                           ` Eli Zaretskii
2015-01-22 21:02                                             ` Dmitry Gutov
2015-01-23  9:03                                               ` Eli Zaretskii
2015-01-23 17:34                                                 ` Dmitry Gutov
2015-01-23 21:03                                                   ` Eli Zaretskii
2015-01-23 22:23                                                     ` Dmitry Gutov
2015-01-24  9:40                                                       ` Eli Zaretskii
2015-01-24 16:47                                                         ` Dmitry Gutov
2015-01-31  8:52                                                           ` Eli Zaretskii
2015-02-01  2:24                                                             ` Dmitry Gutov
2015-02-01 16:01                                                               ` Eli Zaretskii
2015-02-01 20:11                                                                 ` Dmitry Gutov
2015-02-01 20:30                                                                   ` Eli Zaretskii
2015-02-01 20:53                                                                     ` Dmitry Gutov
2015-02-02  3:32                                                                       ` Eli Zaretskii
2015-02-23  2:01                                                                         ` Dmitry Gutov
2015-01-23 21:15                                                   ` Stefan Monnier
2015-01-23 21:34                                                     ` Eli Zaretskii
2015-01-16  9:00                         ` Eli Zaretskii
2015-01-04 22:14                 ` Dmitry Gutov
2014-12-30 20:43     ` Dmitry Gutov

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=54BF843E.10907@gmx.at \
    --to=rudalics@gmx.at \
    --cc=19466@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    --cc=eliz@gnu.org \
    --cc=eller.helmut@gmail.com \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).