Comments (4)
You are probably right. If I need a narrowed view but still need to browse all headings with rifle, I'll create an indirect buffer. Thanks.
from org-rifle.
@chasecaleb FYI, I'm not likely to notice comments posted on closed issues. If you think something needs to be changed in this package, please open a new issue and we can talk about it.
from org-rifle.
Hmm, I'm not sure about this. I think it's generally best to obey narrowing unless there's a good reason to override it. I've never needed it to work by widening, and I haven't had anyone mention it until now. I can think of situations in which I would not want the buffer widened, e.g. I have a large file with subtrees, and I have the buffer narrowed to a project's subtree (probably in an indirect buffer), and then I want to use rifle to search in the subtree. If it widened by default, I would get results for the whole buffer. If I wanted to get results for the whole buffer, I would run the rifle command in the unnarrowed, direct buffer, or use a rifle command that searched all buffers.
What do you think?
from org-rifle.
or use a rifle command that searched all buffers.
@alphapapa can you elaborate on this? I'm not sure what you mean by "all buffers", because for instance helm-org-rifle-agenda-files
searches all agenda file buffers but it is still affected by narrowing. I use (setq helm-org-rifle-close-unopened-file-buffers nil)
, in case that's relevant.
Here's my attempt at solving this... it fixes the search results, but I haven't figured out how to tell if I need to permanently widen the buffer when navigating to a result. If you have any pointers in the right direction that would be appreciated!
(defun cc/org-with-wide-buffers-multi--inner (files fn)
(if (seq-empty-p files)
(funcall fn)
(with-current-buffer (or (org-find-base-buffer-visiting (car files))
(find-file-noselect (car files)))
(org-with-wide-buffer
(cc/org-with-wide-buffers-multi--inner (cdr files) fn)))))
(defmacro cc/org-with-wide-buffers-multi (files &rest body)
(declare (indent 1) (debug true))
`(cc/org-with-wide-buffers-multi--inner files (lambda () ,@body)))
(defun cc/helm-org-rifle-agenda-files-widened ()
(interactive)
(let ((files (org-agenda-files)))
(cc/org-with-wide-buffers-multi files
(helm-org-rifle-files files))))
Context
When I'm working on a task, I frequently narrow the corresponding org buffer to just that task headline. While working on the task I may use org-rifle to go search for something related, but can't find it due to narrowing. It usually goes something like this:
- Start working on a task and narrow the corresponding org buffer to its heading
- Use
helm-org-rifle-agenda-files
to search for something, e.g. info in a related task - Scratch my head and check for typos in my search query, since I can't find what I'm looking for
- Remember that narrowing is the issue
- Do one of the following:
a.C-g
to quit the search, switch to the narrowed buffer, widen it, search again, find what I'm looking for, then re-narrow to the current task again.
a. More likely: give up and use a different, filesystem-based search method instead (e.g.helm-projectile-ag
), since it's easier than doing the previous steps.
I think #32 (perhaps wrapped in an option to enable it?) would be nice, although since I'm only the second one in a couple years to bring this up I'm probably in the minority. Or of course it might be that there aren't many people who use both narrowing and org-rifle that would bother making/commenting on an issue about this.
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.