Comments (4)
Hi,
The default keymap for helm-org-rifle
is a copy of helm-map
, so you can press C-w
to use helm-yank-text-at-point
to yank the word after point into the minibuffer.
I think that's probably better than having it automatically use the word at point, because if that's not what the user wants, it would cause a delay while searching for that word, and then the user would have to clear the word before typing.
However, if you would prefer to do it automatically, you can add :input (thing-at-point 'word)
to the call to helm
in the helm-org-rifle-define-command
macro, then re-eval the buffer, and all of the commands will do so automatically.
(cl-defmacro helm-org-rifle-define-command (name args docstring &key sources (let nil) (transformer nil))
"Define interactive helm-org-rifle command, which will run the appropriate hooks.
Helm will be called with vars in LET bound."
`(cl-defun ,(intern (concat "helm-org-rifle" (when (s-present? name) (concat "-" name)))) ,args
,docstring
(interactive)
(unwind-protect
(progn
(run-hooks 'helm-org-rifle-before-command-hook)
(let* ((helm-candidate-separator " ")
,(if transformer
;; I wish there were a cleaner way to do this,
;; because if this `if' evaluates to nil, `let' will
;; try to set `nil', which causes an error. The
;; choices seem to be to a) evaluate to a list and
;; unsplice it (since unsplicing `nil' evaluates to
;; nothing), or b) return an ignored symbol when not
;; true. Option B is less ugly.
`(helm-org-rifle-transformer ,transformer)
'ignore)
,@let)
(helm :sources ,sources
:input (thing-at-point 'word)))) ; <--
(run-hooks 'helm-org-rifle-after-command-hook))))
from org-rifle.
Closing now, but feel free to continue discussion. Thanks.
from org-rifle.
Similar to above, is there a way to make a command to just jump to the first match that helm-org-rifle
finds for the word at point?
from org-rifle.
You could make such a command, but the matches are not sorted by relevance, so it might not be very useful.
from org-rifle.
Related Issues (20)
- Changing value of helm-org-rifle-fontify-headings to nil causes helm-org-rifle-org-directory to stop working HOT 3
- org-narrow-to-subtree: prevents showing other parts of file, still shows from other files
- command-line client HOT 1
- Search gives up on small strings HOT 6
- Prioritising heading matches HOT 2
- Wrong number of arguments error with helm-org-rifle--refile HOT 1
- Req: Indication of status (progress, no results, which files have been searched?) HOT 1
- Req: Results in current file displayed first HOT 1
- helm-collect-matches error HOT 1
- Is there a way to do a exact match? HOT 1
- Disabling helm-org-rifle-fontify-headings breaks helm-org-rifle-agenda-files HOT 6
- helm-org-rifle-directories: how to add many directories? HOT 1
- Limit candidates to those with certain properties HOT 1
- Fix warning "Helm source <file>: after-init-hook Should be defined as a symbol HOT 1
- Docstring length warnings HOT 1
- Returned search results not always respecting sort order HOT 1
- Warning (emacs): ... after-init-hook Should be defined as a symbol HOT 5
- Opting out of v1.5.0 TODO keyword special handling HOT 4
- Not possible to move as always between the helm-org-rifle-agenda-files results HOT 1
- Hidden parent headings when using helm-org-rifle-current-buffer on collapsed hierarchies HOT 8
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 org-rifle.