Comments (2)
Well, another way to make it happen is to C-M-x
one statement at a time in the buffer. Then my-foo
defined inside the use-package will not have a location, while if it's defined outside use-package it'll have a location. I think that may be how I originally encountered it, writing use-package statements and doing C-M-x on them (though I have a feeling I've seen it too often for that to be the only situation).
from helpful.
OK, so I think this is due to load-history
. We call find-function-noselect
, which calls find-function-library
and that inspects load-history
with symbol-file
.
When you run eval-buffer
on a file foo.el
, load-history
will contain:
("/tmp/foo.el"
(require . finder-inf)
(defun . my-foo)
(require . counsel)
(require . helpful))
However, it looks like load-history
is only updated once eval-buffer
is finished. Since you're running helpful-function
in the same file, eval-buffer
isn't finished and load-history
doesn't contain foo.el.
If you put the following in an elisp file:
(package-initialize)
(use-package counsel
:defer t
:config
(defun my-foo4 (x)
(with-ivy-window
(insert x))))
(require 'counsel)
M-x eval-buffer
and then M-x helpful-function my-foo
shows the position as expected.
That solves the example you've given, but I imagine you're not actually running helpful-function
from the same file as you've written use-package
. How did you originally encounter this issue?
from helpful.
Related Issues (20)
- Wrong-type-argument error on pseudo-function symbols HOT 1
- Request new release HOT 2
- Support for other languages? HOT 1
- Question: using ido with helpful-* HOT 1
- Can `helpful-key` show which key, key combo, or key sequence was pressed? HOT 3
- helpful--docstring-advice failure against GNU Emacs 28.1 HOT 2
- Find all references not working on latest emacs29 build from git HOT 3
- [Help] using helpful with ivy
- Treatment of local/global values
- Can't install using Straight.el: `Wrong type argument: listp, 1` HOT 2
- Suggestion: `helpful--navigate` should respect `display-buffer-alist` HOT 1
- RFE: Duplicate help-mode's `c`, `i` and `s` bindings HOT 1
- Docstrings should not double-escape strings
- helpful-variable not working
- invalid-read-syntax "] in a list" 2 22
- How do you go back? HOT 3
- Handling of left/right single quotation marks
- Case in disambiguation of variable or function definition of a symbol
- New stable release for Emacs 29? HOT 1
- forward-sexp: Scan error: "Unbalanced parentheses", 121867, 1 with Emacs 29 HOT 18
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from helpful.