~pkal/public-inbox

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
2 2

[PATCH] insert-kaomoji: Use true name of `load-file-name'.

Visuwesh Muthukumar <visuweshmuthukumar@gmail.com>
Details
Message ID
<CAM4Sx9K38D=8+A0UphoDP9m5P=POD-fnj3xPzyEtte2+mpYHBA@mail.gmail.com>
DKIM signature
missing
Download raw message
Patch: +1 -1
Hello,

When using straight.el to install the package, which stores the
elisp file as a symlink in the load path, this package fails to
build `insert-kaomoji-alist'.  Using the true path of `load-file-name'
fixes this issue.

Regards.

---

>From c6417138607a02ffed0e178e21d2ecb00b00c116 Mon Sep 17 00:00:00 2001
From: viz <visuwesh@tutanota.com>
Date: Thu, 17 Jun 2021 19:25:26 +0530
Subject: [PATCH] insert-kaomoji-alist: Use true name of `load-file-name'.

---
 insert-kaomoji.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/insert-kaomoji.el b/insert-kaomoji.el
index 0bde8c0..bdfad6a 100644
--- a/insert-kaomoji.el
+++ b/insert-kaomoji.el
@@ -85,7 +85,7 @@ their unit components by unit separators (ASCII 37)."

(defconst insert-kaomoji-alist
  (let* ((dir (if load-file-name
                  (file-name-directory load-file-name)
                  (file-name-directory (file-truename load-file-name))
                default-directory))
         (file (expand-file-name "KAOMOJIS" dir)))
    (insert-kaomoji-parse-file file))
-- 
2.31.1
Details
Message ID
<87lf78ttbq.fsf@posteo.net>
In-Reply-To
<CAM4Sx9K38D=8+A0UphoDP9m5P=POD-fnj3xPzyEtte2+mpYHBA@mail.gmail.com> (view parent)
DKIM signature
missing
Download raw message
Visuwesh Muthukumar <visuweshmuthukumar@gmail.com> writes:

> Hello,
>
> When using straight.el to install the package, which stores the
> elisp file as a symlink in the load path, this package fails to
> build `insert-kaomoji-alist'.  Using the true path of `load-file-name'
> fixes this issue.

Out of curiosity, if you wrap the entire expression in a
eval-when-compile block, does that change anything?

> Regards.
>
> ---
>
>>From c6417138607a02ffed0e178e21d2ecb00b00c116 Mon Sep 17 00:00:00 2001
> From: viz <visuwesh@tutanota.com>
> Date: Thu, 17 Jun 2021 19:25:26 +0530
> Subject: [PATCH] insert-kaomoji-alist: Use true name of `load-file-name'.
>
> ---
>  insert-kaomoji.el | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/insert-kaomoji.el b/insert-kaomoji.el
> index 0bde8c0..bdfad6a 100644
> --- a/insert-kaomoji.el
> +++ b/insert-kaomoji.el
> @@ -85,7 +85,7 @@ their unit components by unit separators (ASCII 37)."
>
>  (defconst insert-kaomoji-alist
>    (let* ((dir (if load-file-name
> -                  (file-name-directory load-file-name)
> +                  (file-name-directory (file-truename load-file-name))
>                  default-directory))
>           (file (expand-file-name "KAOMOJIS" dir)))
>      (insert-kaomoji-parse-file file))

-- 
	Philip K.
Visuwesh Muthukumar <visuweshmuthukumar@gmail.com>
Details
Message ID
<87wnqrsgbi.fsf@posteo.net>
In-Reply-To
<87lf78ttbq.fsf@posteo.net> (view parent)
DKIM signature
missing
Download raw message
On 6/17/21, Philip Kaludercic <philipk@posteo.net> wrote:
> Visuwesh Muthukumar <visuweshmuthukumar@gmail.com> writes:
>
>> Hello,
>>
>> When using straight.el to install the package, which stores the
>> elisp file as a symlink in the load path, this package fails to
>> build `insert-kaomoji-alist'.  Using the true path of `load-file-name'
>> fixes this issue.
>
> Out of curiosity, if you wrap the entire expression in a
> eval-when-compile block, does that change anything?
>

Hmm, when I removed the package and installed it again (to test out
`eval-when-compile' as suggested but didn't get to it), the alist
built just fine.  I didn't realise the package was called
"insert-kaomoji" in MELPA and used a custom, faulty build recipe.  The
build recipe associated with the MELPA package works just fine.  So
this patch is redundant.  Sorry for the noise and I hope I didn't take
too much of your time.

>> Regards.
>>
>> ---
>>
>>>From c6417138607a02ffed0e178e21d2ecb00b00c116 Mon Sep 17 00:00:00 2001
>> From: viz <visuwesh@tutanota.com>
>> Date: Thu, 17 Jun 2021 19:25:26 +0530
>> Subject: [PATCH] insert-kaomoji-alist: Use true name of `load-file-name'.
>>
>> ---
>>  insert-kaomoji.el | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/insert-kaomoji.el b/insert-kaomoji.el
>> index 0bde8c0..bdfad6a 100644
>> --- a/insert-kaomoji.el
>> +++ b/insert-kaomoji.el
>> @@ -85,7 +85,7 @@ their unit components by unit separators (ASCII 37)."
>>
>>  (defconst insert-kaomoji-alist
>>    (let* ((dir (if load-file-name
>> -                  (file-name-directory load-file-name)
>> +                  (file-name-directory (file-truename load-file-name))
>>                  default-directory))
>>           (file (expand-file-name "KAOMOJIS" dir)))
>>      (insert-kaomoji-parse-file file))
>
> --
> 	Philip K.
>
Reply to thread Export thread (mbox)