Start a new topic

How to search all of my org files for a string appearing in an ordinary list?

I've pasted in below a (perhaps too long) snippet of one of my org-mode files (named "personal"), intended to store personal reference data.   In real life it has many top-level headings, but I've kept for illustration parts of the "Alfie" (dog) and "books" trees.


Suppose I want to remember which volumes of TAOCP I own and whether they are at home or at work.  I'd like to be able to search for "knuth" (case-insensitive) and have beorg open up the file "personal.org" and then show me the "*** above desk - 2nd shelf (left)" heading (which is a sub heading of "** office bookshelf contents", which itself is a sub heading of "* books") and put the cursor on the unordered plain list item "- Knuth / Fundamental Algorithms TAOCP".  There may or may not be highlighting of matched words, and there may or may not be a button to jump ahead to the next match (which may be in the same file or a different one).  It's OK with me if it just jumps to the first match if I'm not specific enough.


Ideally, I would be able to specify multiple search terms, and only list items containing both terms would match, so that I could search for "knuth sorting" and match just the list item "- Knuth / Sorting and Searching TAOCP".


I use plain list items instead of headlines because list items are allowed to wrap, while headlines are not.  (I am old-school and like hard line-wrap at column 72, but I could be talked out of that.)  I am willing to reformat into level-4 headlines (****) instead of plain list items if that would be simplier.  Then one would display the subset of headlines whose contents match all search terms.


It appears to me that the current beorg search (from TODO) only lets me search the headlines themselves, not the text beneath the headlines.  Is there a search modifier that lets me match the entire subtree text for a given headline?  I don't mind writing Scheme code.


For instance, I am currently able to match the "** dog food / calories" subtree by searching for "dog calo" (that's fine), but unfortunately not by searching for "science diet". 


Here's the long (but still highly redacted!) sample of text, so you can see why I want to be able to narrow down using search.


====


reference material - personal

# -*- mode: org; -*-
#+startup: indent folded
* alfie

Notes about Alfie
** alfie walk distances
- 0.9 miles: Jade/Gainsway loop
- 1.4 miles: Weinmann/Lakeview/Sensor/Lanyard/Gaisway/home
- 1.7 miles: south along canal from Black Rock around the bend
** dog food / calories
- science diet adult light large breed: 3000cal/kg, 300cal/cup
- Alfie's standard 2-cup meal weighs 0.225kg = 675cal
- science diet mature adult large breed: 3670cal/kg, 365cal/cup
- nutrisource seafood select grain free: 3900cal/kg
- two half-cup scoops (about half a meal) is 0.128kg = 499cal
- new meal scheme: 1 scoop S.D. light + 2 scoops S.S.G.F.
- 500 cal in seafood select (2 scoops)
- 170 cal in science diet light (1 scoop)
- that's 670 cal / meal = 1340 cal/day
- newer meal scheme: 2 scoops S.D. light + 1.5 scoops S.S.G.F.
- 375 cal in seafood select (1.5 scoop)
- 340 cal in science diet light (2 scoops)
- that's 715 cal / meal = 1430 cal/day
- for weight loss, 80lb dog should get about 1200cal/day
- for maintenance, 80lb senior dog 1400-1600cal/day range
- weight log:
  - 2015-05-15: 84.0 lbs
  - 2016-01-16: 88.0 lbs
  - 2016-06-11: 82.5 lbs
  - 2016-07-04: 82.5 lbs
  - 2016-07-23: 83.5 lbs
* books
** tidbits from books
   - David Copperfield: Mr. Jorkins is the elusive business partner of
     Mr. Spenlow.
** Miriam's suggested books to read
   - Henry James: The Golden Bowl
   - Edith Wharton: The Age of Innocence
   - Aristotle
   - Plato
   - Sophocles plays
   - Socrates (about)
   - Don Quixote (1 & 2)
   - Dostoevsky: The Idiot
   - Turgenev: Fathers and Sons
   - Milton: Paradise Lost
   - Garcia Marquez: 100 Years of Solitude
   - Julio Cortazar: Hopscotch
   - Jorge Luis Borges
   - Jonathan Swift: A Modest Proposal
   - Middlemarch
   - Mrs. Dalloway
   - A Tale of Two Cities
   - Jude the Obscure
   - Ibsen's plays
   - Moliere's plays
   - Voltaire: Candide
   - Rousseau
   - The encyclopediste
   - Balzac: Pere Goriot
   - Pascal
   - Pensee
   - Descartes
   - Sartre: No Exit, The Wall
   - Camus: The Plague
   - The Red and the Black
   - Thomas Mann: Buddenbrooks, The Magic Mountain
   - Goethe: Faust
   - Frankenstein
   - Atwood: The Blind Assassin
   - Flannery O'Connor
   - Alice Munro
   - Hemingway: The Old Man and the Sea
   - Faulkner: The Sound and the Fury
   - Le Carre: A Perfect Spy
** office bookshelf contents
*** above desk - top shelf
- Tobias / Revitalizing Undergraduate Science
- Knight / Five Easy Lessons: Strategies for Successful Physics
  Teaching
- Novak / Just-in-time Teaching
  https://books.google.com/books?id=dxdZAAAAYAAJ
- Mazur / Peer Instruction: A User's Manual (2 copies)
- (DVD?) Interactive Teaching: Promoting Better Learning Using Peer
  Instruction and Just-in-Time Teaching
- Green / Peer Instruction for Astronomy
- Cooper & Simonds / Communication for the Classroom Teacher 8ed
- Wolfgang Christian & Mario Belloni / Physlet Physics: Interactive
  Illustrations, Explorations, and Problems for Introductory Physics
  https://books.google.com/books?id=4AFAAQAAIAAJ
- Christian & Belloni / Physlets: Teaching Physics with Interactive
  Curricular Material
- McDermott & Shaffer / Tutorials in Introductory Physics
- Prather / Lecture Tutorials for Introductory Astronomy
  https://books.google.com/books?id=b7_gAAAAMAAJ
- Slater & Adams / Learner-Centered Astronomy Teaching: Strategies for
  ASTRO 101
- Richard Berg / Demonstrations in Acoustics (UMD, DVD)
  http://physics.umd.edu/deptinfo/facilities/lecdem/services/refs/dia.htm
- Kirkpatrick & Francis / Physics: A World View 5ed
- The Feynman Lectures on Physics (paperback, 3-volume set)
- Chabay & Sherwood / Matter & Interactions I
- Chabay & Sherwood / Matter & Interactions II
- Moore / Six Ideas That Shaped Physics / Unit C: Conservation Laws
- Moore / Six Ideas That Shaped Physics / Unit N: Universal Laws
- Joos / Theoretical Physics
- Susskind & Hrabovsky / The Theoretical Minimum
- Stauffer & Stanley / From Newton to Mandelbrot: A Primer in
  Theoretical Physics
- French / Vibrations and Waves
- Georgi / The Physics of Waves
- Crawford / Waves: Berkeley physics course volume 3
- Kleppner & Kolenkow / An Introduction to Mechanics
- Kibble & Berkshire / Classical Mechanics 5ed
- Goldstein & Poole & Sako / Classical Mechanics 3ed
- Marion & Thornton / Classical Dynamics of Particles and Systems
- Morin / Introduction to Classical Mechanics
- Taylor / Classical Mechanics
- Landau & Lifshitz / Mechanics 3ed
- Levi / Classical Mechanics, etc.
- Den Hartog / Mechanics
- Moulton / An Introduction to Celestial Mechanics
- Thomson / Introduction to Space Dynamics
- Bate & Mueller & White / Fundamentals of Astrodynamics
- Calkin / Lagrangian and Hamiltonian Mecanics
- Lanczos / The Variational Principles of Mechanics
- Ter Haar / Elements of Hamiltonian Mechanics
- Strogatz / Nonlinear Dynamics and Chaos
- Baker & Gollub / Chaotic Dynamics
- Mahajan / The Art of Insight in Science and Engineering
- Leonard Smith / Chaos: A Very Short Introduction
  https://books.google.com/books?id=vYoUDAAAQBAJ
- Aris / Vectors, Tensors, and the Basic Equations of Fluid Mechanics
- Granger / Fluid Mechanics
- Tipler & Llewellyn / Modern Physics
- Taylor / Modern Physics for Scientists and Engineers 2ed
- Bernstein / Modern Physics
- Taylor / Modern Physics for Scientists and Engineers 1ed
- Thornton & Rex / Modern Physics for Scientists and Engineers 2ed
- Feynman / QED
- Feynman & Hibbs / Quantum Mechnaics and Path Integrals
- Wichmann / Quantum Physics: Berkeley physics course volume 4
- Griffiths / Introduction to Quantum Mechanics 2ed
- Griffiths / Introduction to Quantum Mechanics 1ed
- Zoey Davidson / Phys 411 notes
- Liboff / Introductory Quantum Mechanics 4ed
- Ballentine / Quantum Mechanics: A Modern Development 2ed
- Sakurai / Modern Quantum Mechanics
- Sakurai / Advanced Quantum Mechanics
- Landau & Lifshitz / Quantum Mechanics 3ed
- Condon & Shortley / The Theory of Atomic Spectra
  https://books.google.com/books?id=hPyD-Nc_YmgC
- Max Born / The Mechanics of the Atom
  https://books.google.com/books?id=UIcitAEACAAJ
- Dirac / Lectures on Quantum Mechanics
- Ashcroft & Mermin / Solid State Physics
- Kittel / Quantum Theory of Solids 2ed
- Tinkham / Group Theory and Quantum Mechanics
- McQuarrie & Simon / Physical Chemistry: A Molecular Approach
- Loudon / Organic Chemistry
- Kittel & Koremer / Thermal Physics
- Lee / Thermal Physics: Entropy and Free Energies 1ed
- Lee / Thermal Physics: Entropy and Free Energies 2ed
- Reif / Statistical and Thermal Physics
- Van Ness / Understanding Thermodynamics
- Fermi / Thermodynamics`
- Schroeder / An Introduction to Thermal Physics
- Landau & Lifshitz / Statistical Physics`
- Zemansky / Heat and Thermodynamics`
- S.K. Ma / Statistical Mechanics`
- Greiner / Thermodynamics and Statistical Mechanics
*** above desk - 2nd shelf (left)
- Essick / Hands-On Introduction to LabVIEW for Scientists and
  Engineers
- Kernighan & Ritchie / The C Programming Language 2ed
- Plauger & Brodie / ANSI and ISO Standard C Programmer's Reference
  (Microsoft)
- Stroustrup / The Design and Evolution of C++
- Ellis & Stroustrup / The Annotated C++ Reference Manual
- Stroustrup / The C++ Programming Language 4ed C++11
- Meyers / More Effective C++
- Gottschling / Discovering Modern C++
- Sestoft / Java Precisely 2ed
- Goodman / Javascript Bible 7ed
- Wall & Schwartz / Programming Perl (O'Reilly)
- Xlib Programming Manual (O'Reilly)
- Kernighan & Pike / The UNIX Programming Environment
- Rubini & Corbet / Linux Device Drivers (O'Reilly) 2ed
- Owens / The Definitive Guide to SQLite
- Kernighan / The Practice of Programming
- Gamma / Design Patterns
- Aho & Sethi & Ullman / Compilers: Principles, Techniques, and Tools
- emacs manual
- elisp manual
- Knuth / Fundamental Algorithms TAOCP
- Knuth / Seminumerical Algorithms TAOCP
- Knuth / Sorting and Searching TAOCP
- Collette / Python and HDF5
- McKinney / Python for Data Analysis
- Kinder & Nelson / A Student's Guide to Python for Physical Modeling
- Ousterhaut / Tcl and the Tk Toolkit
- Neil / Practical Vim
- Dominik / The Org Mode 9.1 Reference Manual
*** above desk - 2nd shelf (right)
- Purcell & Morin / Electricity and Magnetism 3ed
- Wangsness / Electromagnetic Fields
- Griffiths / Introduction to Electrodynamics
- Panofsky & Phillips / Classical Electricity and Magnetism
- Ramo & Whinnery & Van Duzer / Fields and Waves in Communication
  Electronics
- Jackson / Classical Electrodynamics 2ed
- Garg / Classical Electromagnetism in a Nutshell
- Zangwill / Modern Electrodynamics
- Pollack & Stump / Electromagnetism
- Schwartz / Principles of Electrodynamics
- Slater & Frank / Electromagnetism
- Hecht & Ganesan / Optics 4ed
- *books below need to be filed*
- Goodstein / Thermal Physics
- Sakurai & Napolitano / Modern Quantum Mechanics
** home bookshelf contents
*** family room - A2 - L / top
- Morris Bishop / A Survey of French Literature
- Denis Girard / Cassell's French Dictionary
- Mann / The Hockey Stick and the Climate Wars
- Michael Oakeshott / Rationalism in politics and other essays
- Collier / Decision in Philadelphia: the constitutional convention of
  1787
- Hawking / Black Holes and Baby Universes and other essays
- Bernstein / An Introduction to Cosmology
- Archer / The Long Thaw
- Brown / Feynman's Thesis
- Feynman / Six Not-So-Easy Pieces
*** family room - A3
- Resnick & Halliday / Physics I
- Marcus & Freeman / The Future of the Brain
- Aims McGinness / Path of Empire: Panama and the California Gold Rush
- Marcy Norton / Sacred Gifts, Profane Pleasures: a history of tobacco
  and chocolate in the Atlantic world
- David Stradling / The Nature of New York: an environmental history
  of the empire state
- Crawford / The Meaning of the Library
*** family room - A4 - L / bottom
- Wolfram / Mathemtatica Book 5ed
- Zimmerman / Multiphysics Modeling with Finite Element Methods
- Johnson / Numerical Solution of Partial Differential Equations by
  the Finite Element Method
- Hughes / The Finite Element Method: Linear Static and Dynamic Finite
  Element Analysis
- Tenenbaum & Pollard / Ordinary Differential Equations
- Deitel / Java for Programmers 2ed
- Shiffman / Learning Processing 2ed
- Ackerman & Knox / Meteorology: Understanding the Atmosphere 3ed
- Ruskeepaa / Mathematica Navigator: Mathematics, Statistics, and
  Graphics, 2ed
- Hoste / Mathematica Demystified
- Trubiano / Design and Construction of High-Performance Homes
- Tinkham / Introduction to Superconductivity
- Edwards & Syphers / An Introduction to the Physics of High-Energy
  Accelerators
- Mazur / Peer Instruction: a User's Manual
- Vossoughi / Statics for Architects
- Bryant & Johnsen / The Principles of Circular Accelerators and
  Storage Rings
- Wiedemann / Particle Accelerator Physics I
- Wiedemann / Particle Accelerator Physics II
- William Curtis / Modern Architecture Since 1900 3ed
- Hassani / Mathematical Methods Using Mathematica
- Pestel & Leckie / Matrix Methods in Elastomechanics
- Lin & Segel / Mathematics Applied to Deterministic Problems in the
  Natural Sciences
- David MacKay / Sustainable Energy without the Hot Air
- Kirsanov / The Book of Inkscape
- Loeliger / Version Control with Git
- Andrews / An Introduction to Atmospheric Physics 2ed
- Dickerson & Gray & Haight / Chemical Principles 3ed
- Weidner & Sells / Elementary Classical Physics v2
- Taft & Walden / Postscript Language Reference Manual 2ed
- Mary Boas / Mathematical Methods in the Physical Sciences 3ed
- Bugg / Electronics: Circuits, Amplifiers, and Gates
- Hayes & Horowitz / Learning the Art of Electronics: a Hands-On Lab
  Course
- Long / Architectural Acoustics 2ed
- Giancoli / Physics 5ed
*** family room - B1
- Steven Pinker / The Sense of Style: the Thinking Person's Guide to
  Writing in the 21st Century
- Ballantyne / Architecture: a Very Short Introduction
- Bertrand Russell / The Impact of Science on Society
- William Deresiewicz / A Jane Austen Education: How Six Novels Taught
  Me about Love, Friendship, and the Things that Really Matter
- James Ryan / Wait, What?
- Jonathan Haidt / The Righteous Mind: Why Good People Are Divided by
  Politics and Religion
- DePasquale / Java Backpack Reference Guide
- Dershowitz / Reversal of Fortune
- Stieg Larsson / The Gril with the Dragon Tattoo
- William Gibson / Neuromancer
- Jon Krakauer / Into the Wild
- Alice Rossi / The Feminist Papers
- Anne Moody / Coming of Age in Mississippi
- Burton Malkiel / A Random Walk Down Wall Street
- Chomsky / Profit over People
- Freud / Civilization and its Discontents
- Lakoff / Don't Think of an Elephant
- Chomsky / 9-11
- Chomsky / What Uncle Sam Really Wants
- David Allen / Getting Things Done
- Feynman / The Character of Physical Law
- Isaac Asimov / Asimov on Physics
- Pentland / Honest Signals: How They Shape Our World


1 person likes this idea

Full search of notes is planned for a future release. It might be I've prematurely optimised search not to include it and it'll be easier than I think to do and still perform well.

2 people like this

OMG, that's great news ---  I'm looking forward to it!  Meanwhile I've been using "C-c a /" in emacs to do an "occur"-style agenda.  It will be quite handy to have similar functionality while on-the-move.


I am glad to read it.

Login or Signup to post a comment