
I have many such entries in the database, and I often want to see the entry in representative manner. For example a phone number, if I am calling can be nicely focused with moc and displayed on screen.
But maybe you remember my comment how long text is simply showing smaller and basically unreadable.
I have adapted some basic functions which of course could be improved, though this works for me now only for short text:
(defun rcd-db-tabulated-kill-value-show (&optional id)
(interactive)
(let* ((value (rcd-db-tabulated-value id))
(text (join-lines-1 value))
(text (break-lines-1 text 60)))
(moc-focus :string value)))
The above is basic function which get the entry from the database and then uses moc-focus to display the entry. Lines are first joined, then broken (wrapped).
(defun join-lines-1 (text)
(let ((fill-column (point-max)))
(with-temp-buffer
(insert text)
(mark-whole-buffer)
(fill-paragraph)
(buffer-string))))
(defun break-lines-1 (text &optional my-fill-column)
(let ((fill-column (or my-fill-column fill-column)))
(with-temp-buffer
(insert text)
(mark-whole-buffer)
(call-interactively 'fill-paragraph)
(buffer-string))))
Those 2 functions make sure first to join the lines, then to break them. It works well and I get beautiful display of the entry. If the text is short, it is displayed as following:

But problem is there when entry is too long! Even if lines are broken, it is displayed smaller and smaller, look here:

I think this is due to how library moc processes the text. I can provide wrapped text for display, but cannot improve your library.
Could you please try to find out how to do it? 🤔💼🔍📘✨
I have many such entries in the database, and I often want to see the entry in representative manner. For example a phone number, if I am calling can be nicely focused with
mocand displayed on screen.But maybe you remember my comment how long text is simply showing smaller and basically unreadable.
I have adapted some basic functions which of course could be improved, though this works for me now only for short text:
The above is basic function which get the entry from the database and then uses
moc-focusto display the entry. Lines are first joined, then broken (wrapped).Those 2 functions make sure first to join the lines, then to break them. It works well and I get beautiful display of the entry. If the text is short, it is displayed as following:
But problem is there when entry is too long! Even if lines are broken, it is displayed smaller and smaller, look here:
I think this is due to how library
mocprocesses the text. I can provide wrapped text for display, but cannot improve your library.Could you please try to find out how to do it? 🤔💼🔍📘✨