From: "Drew Adams" <drew.adams@oracle.com>
To: "'Chong Yidong'" <cyd@stupidchicken.com>
Cc: 2270@emacsbugs.donarmstrong.com, 2270@debbugs.gnu.org
Subject: bug#2270: [PATCH] bug#2270, RE: 23.0.90; find-library:... (2) other-window version
Date: Wed, 24 Oct 2012 10:41:59 -0700 [thread overview]
Message-ID: <F119192112504AE3B72507CCF7B76D63@us.oracle.com> (raw)
In-Reply-To: <871vu5d7y9.fsf@cyd.mit.edu>
> Sent: Tuesday, February 10, 2009 6:27 PM
>
> > 2. Please add this command (or equivalent), after adjusting its doc
> > string also to explain what LIBRARY is:
>
> After the release, maybe.
Clearly, that upcoming release was many moon ago.
I repeat my suggestion to add command `find-library-other-window'.
I also suggest that it be bound by default to `C-x 4 l'.
I've used this command & key forever, and wouldn't be without it.
(And I rarely have a need anymore for same-window `find-library'.)
---
(defun find-library-other-window (library)
"Find the Emacs-Lisp source of LIBRARY in another window."
(interactive
(progn
(require 'find-func)
(let* ((path (cons (or find-function-source-path load-path)
(find-library-suffixes)))
(def (if (eq (function-called-at-point) 'require)
(save-excursion (backward-up-list)
(forward-char)
(backward-sexp -2)
(thing-at-point 'symbol))
(thing-at-point 'symbol))))
(when def (setq def (and (locate-file-completion def path 'test)
def)))
(list (completing-read "Library name: " 'locate-file-completion
path nil nil nil def)))))
(let ((buf (find-file-noselect (find-library-name library))))
(pop-to-buffer buf 'other-window)))
next prev parent reply other threads:[~2012-10-24 17:41 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-11 2:27 bug#2270: 23.0.90; find-library: (1) doc string, (2) other-window version Chong Yidong
2012-10-24 17:41 ` Drew Adams [this message]
[not found] ` <jwv3913g142.fsf-monnier+emacs@gnu.org>
2012-10-24 19:38 ` bug#2270: [PATCH] bug#2270, RE: 23.0.90; find-library:... " Drew Adams
2012-10-24 20:42 ` Stefan Monnier
2012-10-24 21:20 ` Stefan Monnier
2012-10-24 21:25 ` Drew Adams
2016-04-27 17:26 ` Lars Ingebrigtsen
2016-04-27 17:34 ` Drew Adams
2016-04-27 17:38 ` Lars Ingebrigtsen
2016-04-27 17:43 ` Dmitry Gutov
2016-04-27 17:56 ` Lars Ingebrigtsen
2016-04-27 18:57 ` Dmitry Gutov
2016-04-27 18:46 ` 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=F119192112504AE3B72507CCF7B76D63@us.oracle.com \
--to=drew.adams@oracle.com \
--cc=2270@debbugs.gnu.org \
--cc=2270@emacsbugs.donarmstrong.com \
--cc=cyd@stupidchicken.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 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.