From 112badfb3f96d1927e3edde35d19a83cd0cf8761 Mon Sep 17 00:00:00 2001
From: Rick Lupton <mail@ricklupton.name>
Date: Thu, 8 Feb 2024 08:19:40 +0000
Subject: [PATCH] lisp/ol.el: Improve docstring

* lisp/ol.el (org-link-search-must-match-exact-headline): Make the
docstring more accurately describe behaviour.

Link: https://list.orgmode.org/87cytdithi.fsf@localhost/
---
 lisp/ol.el | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/lisp/ol.el b/lisp/ol.el
index bc1ad99ea..f8d911127 100644
--- a/lisp/ol.el
+++ b/lisp/ol.el
@@ -368,14 +368,17 @@ another window."
 		 (const wl-other-frame)))))
 
 (defcustom org-link-search-must-match-exact-headline 'query-to-create
-  "Non-nil means internal fuzzy links can only match headlines.
+  "Control fuzzy link behaviour when specific matches not found.
 
-When nil, the fuzzy link may point to a target or a named
-construct in the document.  When set to the special value
-`query-to-create', offer to create a new headline when none
-matched.
+When nil, if a fuzzy link does not match a more specific
+target (such as a heading, named block, target, or code ref),
+attempt a regular text search.  When set to the special value
+`query-to-create', offer to create a new heading matching the
+link instead.  Otherwise, signal an error rather than attempting
+a regular text search.
 
-Spaces and statistics cookies are ignored during heading searches."
+This option only affects behaviour in Org buffers.  Spaces and
+statistics cookies are ignored during heading searches."
   :group 'org-link-follow
   :version "24.1"
   :type '(choice
-- 
2.37.1 (Apple Git-137.1)

