emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unexpected error using org-gnus-follow-link


From: Visuwesh
Subject: Re: Unexpected error using org-gnus-follow-link
Date: Thu, 26 Dec 2024 20:15:57 +0530
User-agent: Gnus/5.13 (Gnus v5.13)

[வியாழன் டிசம்பர் 26, 2024] Ihor Radchenko wrote:

> Visuwesh <visuweshm@gmail.com> writes:
>
>>> Also, (cdr (assq 'gnus org-link-frame-setup)) = nil is not the only
>>> possible incorrect customization. I'd rather check if the cdr is a
>>> function and throw a descriptive error otherwise asking to fix
>>> `org-link-frame-setup'.
>>
>> How about the attached?
>
> You still do not check if the value is a function.
> Consider totally wrong values like '(wrong). `fboundp' will then throw
> an error.  You may consider `functionp' instead.

Ah, I wasn't aware that functionp also returned t if you gave a symbol.
Thanks for the hint.

>> +(defun org-link-frame-setup-function (link-type)
>> +  "Return the frame setup function for the link type LINK-TYPE.
>> +This signals an error if the value of the key LINK-TYPE in
>> +`org-link-frame-setup' is not a function."
>> +  (let ((fun (cdr (assq link-type org-link-frame-setup))))
>> +    (if (fboundp fun)
>> +        fun
>> +      (error "The frame setup configuration for `%s' link type is 
>> ill-defined"
>> +             link-type))))
>
> In the error, we can also show the problematic value to aid the user.

Now done.

>> @@ -15311,20 +15311,20 @@ (defun org-modify-ts-extra (ts-string pos 
>> nincrements increment-step)
>>      (setq hour (mod hour 24))
>>      (setq pos-match-group 1
>>                new (format "-%02d:%02d" hour minute)))
>> -       
>> +
>> ...
>
> Please remove irrelevant whitespace-only changes.

Done.  Please find attached.

Attachment: 0001-Error-if-org-link-frame-setup-is-ill-defined.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]