Subject: Re: 30.1; Show-font breaks `insert-file-contents-literally'

From: Protesilaos Stavrou <[email-masked]>
Date: Fri, 11 Jul 2025 15:46:35 +0300

On 2025-07-11 12:58, Zhengyi Fu wrote:
> Protesilaos Stavrou <[email-masked]> writes:
> 
>> On 2025-07-10 15:27, Zhengyi Fu wrote:
>>> Thank you for your fast reply.
>> 
>> You are welcome!
>> 
>>> No.  Actually, I don't know how to fix it correctly.
>> 
>> Okay, no worries! Let's try to do this together. I have not tried
>> 'insert-file-contents-literally' before. Please evaluate the following
>> function and try again.
>> 
>> (defun show-font--insert-button ()
>>   "Insert `show-font-installed-file-button' at point."
>>   (when buffer-file-name
>>     (insert
>>      (propertize "Cannot preview this font" 'face 'show-font-title)
>>      "\n\n"
>>      (propertize buffer-file-name 'face 'bold)
>>      " is not installed"
>>      "\n\n"
>>      "Install this font file?"
>>      "\n")
>>     (goto-char (point-max))
>>     (make-text-button (line-beginning-position 0) (line-end-position
>>     0) :type 'show-font-installed-file-button)))
> 
> After evaluating that fnuction, it doesn't signal errors, but nothing
> gets inserted.

I made two changes and bumped the version number. The new package will 
be available in a few hours. I believe I have fixed the problem. See 
commits d238f83 and f6239ae in show-font.git.