display org-tag-eldoc text on sideline left for better view indentation
[org-tag-eldoc.git] / org-tag-eldoc-common.el
blob32110a2c5fc8dd60163f2e538799a4af0c6588b9
1 ;;; org-tag-eldoc-common.el --- common functions for org-tag-eldoc -*- lexical-binding: t; -*-
2 ;; -*- coding: utf-8 -*-
4 ;; Copyright (C) 2024-2025 Christopher M. Miles, all rights reserved.
6 ;;; Commentary:
10 ;;; Code:
12 (defvar org-tag-eldoc--explanation nil
13 "A private variable to store the function internal variable `explanation'.")
15 (defun org-tag-eldoc-common--format-explanation (text)
16 "Format TEXT for better displaying."
17 (require 'subr-x)
18 (if text
19 (thread-last
20 text
21 (string-clean-whitespace)
22 ;; (string-replace "\n" "")
24 (error "[org-tag-eldoc] `org-tag-eldoc-common--format-explanation' argument `TEXT' is `nil'")))
28 (provide 'org-tag-eldoc-common)
30 ;;; org-tag-eldoc-common.el ends here