From a351eeadfa6cc0c40c78fb1e1c6b2f885fa40563 Mon Sep 17 00:00:00 2001 From: Howard Abrams Date: Mon, 9 Jun 2025 09:47:26 -0700 Subject: [PATCH] Better search for a header in a demo --- ha-demos.org | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ha-demos.org b/ha-demos.org index a8d305c..76721eb 100644 --- a/ha-demos.org +++ b/ha-demos.org @@ -446,7 +446,11 @@ These interactive functions scroll the “notes” in the other window in anothe (call-interactively 'org-find-file)) (setq ha-slide-presentation (buffer-name)) (when initial-heading - (imenu initial-heading)) + (goto-char (point-min)) + (re-search-forward (rx bol + (one-or-more "*") + (one-or-more space) + (literal initial-heading)))) (cond ((fboundp #'dslide-deck-forward) (call-interactively 'dslide-deck-start)) ((fboundp #'org-present-next) (call-interactively 'org-present)) @@ -510,7 +514,7 @@ To make the contents of the expression easier to write, the =define-ha-demo= as Probably best to explain this in an example: - \(define-demo demo1 + \(define-ha-demo demo1 \(:buffer \"demonstrations.py\") \(message \"In a buffer\"\) \(:mode 'dired-mode\) \(message \"In a dired\"\) \(:heading \"Raven Civilizations\"\) \(message \"In an org file\"\)\)