The text to be processed has special words marked with a special font. The required text is copied to the clipboard with the mouse (from firefox). The text is pasted into the clipboard emacs("ctrl-y"). It is assumed that copying to the clipboard will also be required text properties (namely, the distinctive font of certain words) with subsequent transfer to the buffer emacs.
When such copied text is pasted into "LibreOffice Write", it is noticeable that the required the words have inherited the distinctive font, hence the inference that the text properties are on the clipboard.
In the emacs buffer, pasted text is printed in the same font. It is known that printing content buffer, namely character display is configurable in emacs buffer and is not important here.
It is assumed that the properties of the copied text also ended up in the emacs buffer. The task is to catch words in special font. It is supposed to use the text search functions by character property values.
Thanks for the reply Drew. A test procedure has been created:
(defun msgFace
(fc nhl knc)
(message "Шрифт `%s', начало области `%d', конец области `%d'" fc nhl knc))
variable edited yank-handled-properties:
((font-lock-face . yank-handle-font-lock-face-property) (category . yank-handle-category-property) (font . msgFace))
print to mini buffer (echo area) after pasting text:
Шрифт ‘nil’, начало области ‘74564’, конец области ‘75138’
Which text property character do you want to use? The copied text uses three fonts
;;;emacs mode texinfo emacs=>clipboard
(gui-get-selection 'CLIPBOARD)
;;;==>#("потребуются @emph{freeze} сопрограммы" 0 12 (fontified t) 12 13 (fontified t) 13 17 (fontified t face font-lock-keyword-face) 17 18 (fontified t) 18 24 (fontified t face italic) 24 37 (fontified t))
;;;firefox=>clipboard
(gui-get-selection 'CLIPBOARD)
;;;==>A Lisp object is a piece of data used and manipulated by Lisp programs. For our purposes, a type or data type is a set of possible objects. " 0 159 (foreign-selection STRING))
List properties = (foreign-selection STRING) -?
message
doesn't write to the minibuffer; it writes to the echo area. Can you provide a step-by-step recipe that illustrates what you're copying and pasting etc.? A face includes font information...