|
@@ -9136,23 +9136,15 @@ according to FMT (default from `org-email-link-description-format')."
|
|
(setq fmt (replace-match "from %f" t t fmt))))
|
|
(setq fmt (replace-match "from %f" t t fmt))))
|
|
(org-replace-escapes fmt table)))
|
|
(org-replace-escapes fmt table)))
|
|
|
|
|
|
-(defun org-make-org-heading-search-string (&optional string heading)
|
|
|
|
- "Make search string for STRING or current headline."
|
|
|
|
- (interactive)
|
|
|
|
- (let ((s (or string (org-get-heading)))
|
|
|
|
|
|
+(defun org-make-org-heading-search-string (&optional string)
|
|
|
|
+ "Make search string for the current headline or STRING."
|
|
|
|
+ (let ((s (or string
|
|
|
|
+ (and (derived-mode-p 'org-mode)
|
|
|
|
+ (save-excursion
|
|
|
|
+ (org-back-to-heading t)
|
|
|
|
+ (plist-get (cadr (org-element-at-point))
|
|
|
|
+ :raw-value)))))
|
|
(lines org-context-in-file-links))
|
|
(lines org-context-in-file-links))
|
|
- (unless (and string (not heading))
|
|
|
|
- ;; We are using a headline, clean up garbage in there.
|
|
|
|
- (if (string-match org-todo-regexp s)
|
|
|
|
- (setq s (replace-match "" t t s)))
|
|
|
|
- (if (string-match (org-re ":[[:alnum:]_@#%:]+:[ \t]*$") s)
|
|
|
|
- (setq s (replace-match "" t t s)))
|
|
|
|
- (setq s (org-trim s))
|
|
|
|
- (if (string-match (concat "^\\(" org-quote-string "\\|"
|
|
|
|
- org-comment-string "\\)") s)
|
|
|
|
- (setq s (replace-match "" t t s)))
|
|
|
|
- (while (string-match org-ts-regexp s)
|
|
|
|
- (setq s (replace-match "" t t s))))
|
|
|
|
(or string (setq s (concat "*" s))) ; Add * for headlines
|
|
(or string (setq s (concat "*" s))) ; Add * for headlines
|
|
(when (and string (integerp lines) (> lines 0))
|
|
(when (and string (integerp lines) (> lines 0))
|
|
(let ((slines (org-split-string s "\n")))
|
|
(let ((slines (org-split-string s "\n")))
|