<feed xmlns='http://www.w3.org/2005/Atom'>
<title>cape.git, branch cache-clear</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/cape.git/'/>
<entry>
<title>cache clearing</title>
<updated>2023-10-16T20:01:35+00:00</updated>
<author>
<name>Daniel Mendler</name>
<email>mail@daniel-mendler.de</email>
</author>
<published>2023-10-16T20:01:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/cape.git/commit/?id=0321c162b1ec75ed1cb3c1d0c3ebf90d8bf3188d'/>
<id>0321c162b1ec75ed1cb3c1d0c3ebf90d8bf3188d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>cape-char: Refactoring</title>
<updated>2023-09-28T04:24:53+00:00</updated>
<author>
<name>Daniel Mendler</name>
<email>mail@daniel-mendler.de</email>
</author>
<published>2023-09-20T02:35:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/cape.git/commit/?id=f97e64e87071c880f4a92ac73bed667e89e4e580'/>
<id>f97e64e87071c880f4a92ac73bed667e89e4e580</id>
<content type='text'>
- Minor cleanup
- cape-char--translation: Take prefix keys as argument instead of regexp
- Add eval-and-compile, such that function is available at compile-/runtime
- Extract annotation, docsig and exit function
- Improve docsig function for combined characters
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Minor cleanup
- cape-char--translation: Take prefix keys as argument instead of regexp
- Add eval-and-compile, such that function is available at compile-/runtime
- Extract annotation, docsig and exit function
- Improve docsig function for combined characters
</pre>
</div>
</content>
</entry>
<entry>
<title>char: `*--define` macro: Call translation-hash from within the macro</title>
<updated>2023-09-28T04:20:48+00:00</updated>
<author>
<name>hedy</name>
<email>hedy@tilde.cafe</email>
</author>
<published>2023-09-12T11:00:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/cape.git/commit/?id=4b8f101dfb0ef4f1ac418f2170b268565310e0e0'/>
<id>4b8f101dfb0ef4f1ac418f2170b268565310e0e0</id>
<content type='text'>
This lets the translation hash to be computed within the macro rather
than after the macro is expanded.

I kept the name `hash` for the variable symbol to conform to the style
of the other macro variables/functions in let.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This lets the translation hash to be computed within the macro rather
than after the macro is expanded.

I kept the name `hash` for the variable symbol to conform to the style
of the other macro variables/functions in let.
</pre>
</div>
</content>
</entry>
<entry>
<title>char: Remove `eval-when-compile` on translation-hash function</title>
<updated>2023-09-28T04:20:48+00:00</updated>
<author>
<name>hedy</name>
<email>hedy@tilde.cafe</email>
</author>
<published>2023-09-12T10:42:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/cape.git/commit/?id=03d8c56c935d38a16ae539a9742d68d3320d8bf2'/>
<id>03d8c56c935d38a16ae539a9742d68d3320d8bf2</id>
<content type='text'>
Also note that the purity declaration is also removed.

Suggested from PR review comments.

&gt; If we remove that, which is possible because of your vastly simpler
&gt; implementation, the macro can be used, which is a significant
&gt; improvement over the status quo

The reason for the change in this commit is because of the improved
implementation for the translation-hash function (several commits ago).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also note that the purity declaration is also removed.

Suggested from PR review comments.

&gt; If we remove that, which is possible because of your vastly simpler
&gt; implementation, the macro can be used, which is a significant
&gt; improvement over the status quo

The reason for the change in this commit is because of the improved
implementation for the translation-hash function (several commits ago).
</pre>
</div>
</content>
</entry>
<entry>
<title>char: Make `*--ensure-*` functions inline</title>
<updated>2023-09-28T04:20:48+00:00</updated>
<author>
<name>hedy</name>
<email>hedy@tilde.cafe</email>
</author>
<published>2023-09-12T10:40:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/cape.git/commit/?id=3f4afc695cf3446c801acae6b8fcdde2dc105ff3'/>
<id>3f4afc695cf3446c801acae6b8fcdde2dc105ff3</id>
<content type='text'>
...so resulting byte code is simpler, as suggested by minad in PR review.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
...so resulting byte code is simpler, as suggested by minad in PR review.
</pre>
</div>
</content>
</entry>
<entry>
<title>char: Define `*--ensure-*` functions as macros</title>
<updated>2023-09-28T04:20:48+00:00</updated>
<author>
<name>hedy</name>
<email>hedy@tilde.cafe</email>
</author>
<published>2023-09-11T14:26:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/cape.git/commit/?id=29beb6a1c74a0e627da59d7c9da423fe0fc3bef6'/>
<id>29beb6a1c74a0e627da59d7c9da423fe0fc3bef6</id>
<content type='text'>
This fixes the void-function errors. Efficiency wise IMO it's pretty
much on par with the function implementation. But when the current
translation function having `eval-when-compile` around it, this
suppresses the cape-char--translation-hash symbol definition is void
errors.

There are possibly more targeted fixes to this problem, and we'll
probably be changing the `eval-when-compile` in the future anyway, but I
think this change isn't really a "hack" to fix it -- just an alternate
solution for `*--ensure-*` functions (macros).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes the void-function errors. Efficiency wise IMO it's pretty
much on par with the function implementation. But when the current
translation function having `eval-when-compile` around it, this
suppresses the cape-char--translation-hash symbol definition is void
errors.

There are possibly more targeted fixes to this problem, and we'll
probably be changing the `eval-when-compile` in the future anyway, but I
think this change isn't really a "hack" to fix it -- just an alternate
solution for `*--ensure-*` functions (macros).
</pre>
</div>
</content>
</entry>
<entry>
<title>char: Suppress reference to free variable warning</title>
<updated>2023-09-28T04:20:48+00:00</updated>
<author>
<name>hedy</name>
<email>hedy@tilde.cafe</email>
</author>
<published>2023-09-11T08:23:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/cape.git/commit/?id=b06ee58fd68a93425723a1cc1b1841fc509108d6'/>
<id>b06ee58fd68a93425723a1cc1b1841fc509108d6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>char: Refactor translation hash function</title>
<updated>2023-09-28T04:20:48+00:00</updated>
<author>
<name>hedy</name>
<email>hedy@tilde.cafe</email>
</author>
<published>2023-09-11T07:32:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/cape.git/commit/?id=d25df039f8b0a6080bed7f6950d8946599d94b89'/>
<id>d25df039f8b0a6080bed7f6950d8946599d94b89</id>
<content type='text'>
- Rather than putting details on the hash contents as comments, put
them in the docstring so the user of the function can see it without
viewing source

- Call `quail-use-package` before the let block since it doesn't rely
on the variables bound in let

- No need to set `quail-current-package` ourselves

- map-list (previously bound in let) is only used once, so now it's
put inline in quail-build-decode-map call

- Formatting refactors
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Rather than putting details on the hash contents as comments, put
them in the docstring so the user of the function can see it without
viewing source

- Call `quail-use-package` before the let block since it doesn't rely
on the variables bound in let

- No need to set `quail-current-package` ourselves

- map-list (previously bound in let) is only used once, so now it's
put inline in quail-build-decode-map call

- Formatting refactors
</pre>
</div>
</content>
</entry>
<entry>
<title>char: More inclusive on the matching translations to include</title>
<updated>2023-09-28T04:20:48+00:00</updated>
<author>
<name>hedy</name>
<email>hedy@tilde.cafe</email>
</author>
<published>2023-09-10T14:23:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/cape.git/commit/?id=0f4b94109a97d3f94882dae7391f9affc775eb4e'/>
<id>0f4b94109a97d3f94882dae7391f9affc775eb4e</id>
<content type='text'>
Note that this is not an atomic commit :')

- Previously filtered out translations that are stored as a vector but
  with only one element. Now those are included with that element as the
  translation.

- Some translations (particularly emoji of country flags) cannot
  preserve their string when converted to char then back to string. For
  cases like these they are now stored as strings in the hash table. All
  other translations are still stored as chars (to save space in
  storing the hash).

  One can possibly use (= (string-width value-str) 2) to check, but some
  strings that satisfy this condition also satisfy string-char
  reversability, so the naive (string= (char-to-string value-char)
  value-str) is used.

  This directly allows for completing emoji country flags. I did not
  look into any other benefits of this regarding other input methods.

  Because of this change, new helper functions cape-char --ensure-str
  and --ensure-char are introduced to ace clarity when updating
  cape-char--define.

- Moved (require 'quail) into the translation function.

  (resolves review comment)

- Better doc string and naming of translation function: This clarifies
  from the function name that a hash is returned -- better for when the
  function becomes a public API.

- Reverted removing regexp argument from translation function. This
  allows filtering out name-value translation pairs from the hash that
  do not match the required prefixes. Waste of space to keep those
  translations around in the hash.

  (resolves review comment)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Note that this is not an atomic commit :')

- Previously filtered out translations that are stored as a vector but
  with only one element. Now those are included with that element as the
  translation.

- Some translations (particularly emoji of country flags) cannot
  preserve their string when converted to char then back to string. For
  cases like these they are now stored as strings in the hash table. All
  other translations are still stored as chars (to save space in
  storing the hash).

  One can possibly use (= (string-width value-str) 2) to check, but some
  strings that satisfy this condition also satisfy string-char
  reversability, so the naive (string= (char-to-string value-char)
  value-str) is used.

  This directly allows for completing emoji country flags. I did not
  look into any other benefits of this regarding other input methods.

  Because of this change, new helper functions cape-char --ensure-str
  and --ensure-char are introduced to ace clarity when updating
  cape-char--define.

- Moved (require 'quail) into the translation function.

  (resolves review comment)

- Better doc string and naming of translation function: This clarifies
  from the function name that a hash is returned -- better for when the
  function becomes a public API.

- Reverted removing regexp argument from translation function. This
  allows filtering out name-value translation pairs from the hash that
  do not match the required prefixes. Waste of space to keep those
  translations around in the hash.

  (resolves review comment)
</pre>
</div>
</content>
</entry>
<entry>
<title>char: Better implementation of obtaining input method translation hash</title>
<updated>2023-09-28T04:20:48+00:00</updated>
<author>
<name>hedy</name>
<email>hedy@tilde.cafe</email>
</author>
<published>2023-09-10T05:59:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/cape.git/commit/?id=f89307f9fe128e58483ffdad2e36a877e511aad9'/>
<id>f89307f9fe128e58483ffdad2e36a877e511aad9</id>
<content type='text'>
This uses quail functions to obtain the hash rather than parsing the
output of describe-input-method, which makes it more stable since
relying on emacs library data structures is better than relying on help
output formats.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This uses quail functions to obtain the hash rather than parsing the
output of describe-input-method, which makes it more stable since
relying on emacs library data structures is better than relying on help
output formats.
</pre>
</div>
</content>
</entry>
</feed>
