how to match lines starting with a single semicolon ; but exclude lines starting with double semicolons ;; #1171
-
The PlanI am trying implement a way to structure elisp files by comment boxes. The plan is that any box title that start with one For example: ;;;;;;;;;;;
; BASIC ;
;;;;;;;;;;;
;;;;;;;;;;;;;;
;; Straight ;;
;;;;;;;;;;;;;; When using consult-line to search for comment lines in Lisp code, I want to filter lines starting with a single ; while excluding lines starting with ;;. I expect consult-line to show only the line Attempted SolutionsI tried literal Found a quick solution: (setq orderless-component-separator #'orderless-escapable-split-on-space) And then search with |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I suggest a different plan. Use the built-in outline mechanism, see outline-regexp in Elisp files. Then simply use consult-outline with narrowing to navigate to the desired levels. |
Beta Was this translation helpful? Give feedback.
My suggestion is to not use boxes. I understand that this is a stylistic preference, but overall I rather adapt to the common style I see in the Emacs code base and in most packages.