Skip to content

Commit

Permalink
orca.el (orca-handler-current-buffer): Roll back using orca--find-cap…
Browse files Browse the repository at this point in the history
…ture-buffer

It always finds a buffer with `org-mode', which makes it a catch-all,
so no other handlers can be placed after
`orca-handler-current-buffer'.
  • Loading branch information
abo-abo committed Jan 3, 2021
1 parent 73d1cbd commit de503d1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions orca.el
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,12 @@ Try to remove superfluous information, like the website title."
"Select the current `org-mode' buffer with HEADING."
;; We are in the server buffer; the actual current buffer is first
;; on `buffer-list'.
(let ((orig-buffer (orca--find-capture-buffer)))
(let ((orig-buffer (nth 0 (buffer-list))))
(when (with-current-buffer orig-buffer
(save-excursion
(goto-char (point-min))
(re-search-forward heading nil t)))
(and (eq major-mode 'org-mode)
(save-excursion
(goto-char (point-min))
(re-search-forward heading nil t))))
(switch-to-buffer orig-buffer)
(goto-char (match-end 0))
(org-capture-put
Expand Down

0 comments on commit de503d1

Please sign in to comment.