@@ -162,13 +162,13 @@ Optional squash for final annotation, if nil keep all, if zero keeps only filena
162
162
(annotation (org-annotate-python-add-filename-node filename dottedannotation)))
163
163
(org-annotate-python-squash-list-keep-and-last annotation (when squash (1+ squash))))) ; here squash=0 means keeping only filename.
164
164
165
- (defun org-annotate-python-pydef-store-link (&optional nofile )
165
+ (defun org-annotate-python-pydef-store-link (&optional nofile ask )
166
166
" Store a link to a man page."
167
167
(when (memq major-mode '(python-mode ))
168
168
; ; This is a man page, we do make this link.
169
169
(let* ((filename (buffer-file-name ))
170
170
(dotted (org-annotate-python-get-pydef-name))
171
- (name (org-annotate-python-pydef-select-candidate dotted))
171
+ (name (if ask ( org-annotate-python-pydef-select-candidate dotted) dotted))
172
172
(description nil ))
173
173
(unless nofile
174
174
(setq name (concat filename " ::" name)))
@@ -218,13 +218,19 @@ Optional squash for final annotation, if nil keep all, if zero keeps only filena
218
218
(if filename (find-file filename))
219
219
(org-annotate-python-goto-dotted dotted)))
220
220
221
- (defun org-annotate-python-info-at-point ()
221
+ (defun org-annotate-python-info-at-point (&optional ask )
222
222
" Return a plist with python info at point."
223
+ (interactive " P" )
223
224
(let* ((filename (buffer-file-name ))
224
225
(dotted (org-annotate-python-get-pydef-name))
225
- (selection (org-annotate-python-pydef-select-candidate dotted org-annotate-python-squash-candidates-level)))
226
+ (selection (if ask
227
+ (org-annotate-python-pydef-select-candidate
228
+ dotted
229
+ org-annotate-python-squash-candidates-level)
230
+ dotted)))
226
231
(org-annotate-python-make-annotation-from-pydef filename selection org-annotate-python-squash-annotation-level)))
227
232
233
+
228
234
(add-to-list 'org-annotate-code-info-alist (cons 'python-mode 'org-annotate-python-info-at-point ))
229
235
230
236
(defun org-annotate-python-capture-finding-location ()
0 commit comments