From 764b075255875bedab13b336b1c2162900f448a6 Mon Sep 17 00:00:00 2001 From: Akib Azmain Turja Date: Wed, 21 Dec 2022 01:02:03 +0600 Subject: [PATCH] Fix terminfo path on case-insensitive filesystems * eat.el (eat--terminfo-path): New variable. * eat.el (eat-term-terminfo-directory): Change default value to 'PACKAGE-ROOT/terminfo/'. * Makefile (terminfo): Don't depend on other targets. Make directory 'terminfo'. Write terminfo to both 'e' and '65' (hexadecimal number of ASCII 'e') directories. * Makefile (e/eat-mono e/eat-color eat-256color e/eat-truecolor): Remove target. * README.org (Quelpa): Update recipe. --- Makefile | 21 +++++++++++++++++---- README.org | 3 ++- eat.el | 22 +++++++++++++--------- {e => terminfo/65}/eat-256color | Bin {e => terminfo/65}/eat-color | Bin {e => terminfo/65}/eat-mono | Bin {e => terminfo/65}/eat-truecolor | Bin terminfo/e/eat-256color | Bin 0 -> 2216 bytes terminfo/e/eat-color | Bin 0 -> 2218 bytes terminfo/e/eat-mono | Bin 0 -> 2008 bytes terminfo/e/eat-truecolor | Bin 0 -> 2223 bytes 11 files changed, 32 insertions(+), 14 deletions(-) rename {e => terminfo/65}/eat-256color (100%) rename {e => terminfo/65}/eat-color (100%) rename {e => terminfo/65}/eat-mono (100%) rename {e => terminfo/65}/eat-truecolor (100%) create mode 100644 terminfo/e/eat-256color create mode 100644 terminfo/e/eat-color create mode 100644 terminfo/e/eat-mono create mode 100644 terminfo/e/eat-truecolor diff --git a/Makefile b/Makefile index f5cedf1..cc509b1 100644 --- a/Makefile +++ b/Makefile @@ -35,7 +35,23 @@ html: eat.html pdf: eat.pdf -terminfo: e/eat-mono e/eat-color eat-256color e/eat-truecolor +terminfo: eat.ti + test -d terminfo || mkdir terminfo + env TERMINFO=./terminfo $(TIC) -x eat.ti +# We don't know which directory was created, it depend on the +# case-sensitivity of the file-system. So make sure both are created. + test -d terminfo/e || mkdir terminfo/e + test -d terminfo/65 || mkdir terminfo/65 + if test terminfo/e/eat-mono -nt terminfo/65/eat-mono ; \ + then \ + cp terminfo/e/eat-mono terminfo/e/eat-color \ + terminfo/e/eat-256color terminfo/e/eat-truecolor \ + terminfo/65 ; \ + else \ + cp terminfo/65/eat-mono terminfo/65/eat-color \ + terminfo/65/eat-256color terminfo/65/eat-truecolor \ + terminfo/e ; \ + fi check: eat.el $(EMACS) -batch -l eat.el -l eat-tests.el \ @@ -49,9 +65,6 @@ changelog: eat.elc: eat.el $(EMACS) -batch --eval '(byte-compile-file "eat.el")' -e/eat-mono e/eat-color eat-256color e/eat-truecolor: eat.ti - env TERMINFO=. $(TIC) -x eat.ti - eat.info: eat.texi gpl.texi fdl.texi $(TEXI2INFO) eat.texi diff --git a/README.org b/README.org index 9d17135..d1f670f 100644 --- a/README.org +++ b/README.org @@ -90,7 +90,8 @@ put something like the following in your init file: (quelpa '(eat :fetcher git :url "/home/akib/projects/emacs-eat" :files ("*.el" ("term" "term/*.el") "*.texi" - "*.ti" ("e" "e/*") + "*.ti" ("terminfo/e" "terminfo/e/*") + ("terminfo/65" "terminfo/65/*") ("integration" "integration/*") (:exclude ".dir-locals.el" "*-tests.el")))) #+end_src diff --git a/eat.el b/eat.el index a933883..8db6ae5 100644 --- a/eat.el +++ b/eat.el @@ -339,20 +339,26 @@ This value is used by terminal programs to identify the terminal." (defvar eat--install-path nil "Path to directory where Eat is installed.") +(defvar eat--terminfo-path nil + "Path to directory where Terminfo databases are installed.") + (defvar eat--shell-integration-path nil "Path to directory where shell integration scripts are installed.") +(setq eat--install-path + (copy-sequence (file-name-directory + (or load-file-name buffer-file-name)))) + (defvar eat-term-terminfo-directory) (defvar eat-term-shell-integration-directory) -(let ((old-install-path eat--install-path) +(let ((old-terminfo-path eat--terminfo-path) (old-shell-integration-path eat--shell-integration-path)) - (setq eat--install-path - (copy-sequence (file-name-directory - (or load-file-name buffer-file-name)))) + (setq eat--terminfo-path + (expand-file-name "terminfo" eat--install-path)) (setq eat--shell-integration-path (expand-file-name "integration" eat--install-path)) - (defcustom eat-term-terminfo-directory eat--install-path + (defcustom eat-term-terminfo-directory eat--terminfo-path "Directory where required terminfo databases can be found. This value is used by terminal programs to find the terminfo databases @@ -360,8 +366,6 @@ that describe the capabilities of the terminal." :type 'directory :group 'eat-term) - (defvar eat--term-shell-integration-directory) - (defcustom eat-term-shell-integration-directory eat--shell-integration-path "Directory where Eat shell integration scripts can be found. @@ -372,8 +376,8 @@ This value is exposed to terminal programs as :group 'eat-ui :group 'eat-eshell) - (when (eq eat-term-terminfo-directory old-install-path) - (setq eat-term-terminfo-directory eat--install-path)) + (when (eq eat-term-terminfo-directory old-terminfo-path) + (setq eat-term-terminfo-directory eat--terminfo-path)) (when (eq eat-term-shell-integration-directory old-shell-integration-path) (setq eat-term-shell-integration-directory diff --git a/e/eat-256color b/terminfo/65/eat-256color similarity index 100% rename from e/eat-256color rename to terminfo/65/eat-256color diff --git a/e/eat-color b/terminfo/65/eat-color similarity index 100% rename from e/eat-color rename to terminfo/65/eat-color diff --git a/e/eat-mono b/terminfo/65/eat-mono similarity index 100% rename from e/eat-mono rename to terminfo/65/eat-mono diff --git a/e/eat-truecolor b/terminfo/65/eat-truecolor similarity index 100% rename from e/eat-truecolor rename to terminfo/65/eat-truecolor diff --git a/terminfo/e/eat-256color b/terminfo/e/eat-256color new file mode 100644 index 0000000000000000000000000000000000000000..dda98bd68ca55766c06fed82dad16bf579d7d21b GIT binary patch literal 2216 zcma)7ZD<@t7=CAGtuZ2%{-_^YLkLVQHVL=0yZ6x*&!$a{G4T?=@oecemo(ShCD*%a za_!|q5TyRFphzhSMU?)q6ckhh!GeMy;vXwm2>y^lMJol7{t$(n?>jTMF(H*MH}CVj z&&>Pm?9A+5hxH&l0Gpw}?zwF|SL=~Md~BvTQ*qXO^k)d|8VG~w2oA*HnbisCHF7&}(7=R4&Q8<9{5KKTBYEVbM z1h2qJcpcekcn97^JO}6DL-+)~fG^=2%)f^p;U~mq^NNakN>`EpX7b+=|A_i-z+bQe z7Td(y+1+d_+s3-s4%W?ZCfEYDi>28fHi&$bJKz0WSN zPuEmjWS2~SnJu%c>{oV;U02GWHDqn%JQ}HQT4y4@cI4Tc=xax<&)!p2A4IhuS)W-K zRrWQ;?~MLK)Zc6_TR&UBSl6u^)<2fT+xZrLKkwoXamjb_KK?i#;m`8}e1cE&S-!|$ z<)`>*ewLr(7x>5gbN&_omS5t_{0hIu|KxvjX1Cd!?X7l)z1{A$_GR12z6iI&UEpLzL6lvQ z4@Fsud<6wLh~Wurgr@hgRjLOLz?~=!U`xxOh_40`R~A(|iOC*pyR{g~fRqtz!{F?f zq4N?rJ7SmyB@8Zwv>WqNG)hwD6H5|HM8PMfX8HnF_fd1Qq^Z&(5}$%p6_Q5dU9v;4 zgwb0BCxay!nuByH8^!h%wx>~X15~nZLdB$tDT*?NF*87n$X+CI(rI{x9?%UXx)R`{ zX7uCIB+@QEKtB>SU%IIx!!1HZN_n(JXc|fxY7x4dQs_pCJkuh(f$}kurD(VdqDSNp z;qy9U;3R2~-qAcb31|mr7(`l>Q=*28F2-@)MCfE=q{T%obVW!sKq@trNPSIRQTD_< z<_VqqNCQn1NRuKg!5wN(Vdu{7?w+3B-dOD5!CY=);_%@@VRG`wk*TR-u~eF#o|!3^ zj~=a5s?}QU*s_Ks`sxbar!&`pFIlLk{7(Oc>0taX`kLUW#E(p#^7u3cFBSSJ zdVxI(QbqNK;AwP4Be@_R7Bx?ud@-&hH?Fi)s~?ZO824~tLp=%)Bi`n}<^BfcZfs4x lzowr4?t$Zf{We4!-yX`^(3ZZ1QcV{_e;z8OdL611{smb9NbCRr literal 0 HcmV?d00001 diff --git a/terminfo/e/eat-color b/terminfo/e/eat-color new file mode 100644 index 0000000000000000000000000000000000000000..53ed6a6b11a953a9591430a1316e4b3607e5943b GIT binary patch literal 2218 zcmb_eU1%It6h3$Eq{fI;3Kq@O5`s4rn}nS^KfBvOw@sTGW8x8{VjYCKO#07msHfJzKr}=qklvEy>;vw{0aYn z#Wt}Hb{E^qwy|!ugY`0;366m6Vkx$l4I>|CPq7T*&3;)tmSZJ0&sNz<_8NPWy~ED2 zkJfcuU>A-4fvvI2>=$;0T~(Q3YsA{fdAyZ<-FlK{#{MzKdYaMSi)~uhbpRKFbHS2H7;vIYo@8sS50WSG2KENO0WBeI@kWcYhKF?S9 zOZ-)Sil63Z`8oap|Ac?ezv3798o$J^@IUxpoZ0R6W_zo>-R`mb?a+S6-fur)yNDZuIEfAa`TctutN5cSzo15-mdQZgvwqk+VgMJ4kn_Tt#1laUN4GlpXn zoC7j)o(E?~3}sNl;8IArF+WLFl9W#@K`h=1J~1`ZXR&*LhLfS3YAqu1DM-~JsT$9c z8G%)d-U>KrY)R7`q)TcX$KyDjz>FJUCga9cOsJToC}SAYL&S*eLlRP+%F}d#ZY0r_ z053JIFPA2fa`6HNk*N97NfjAw5^7SJ-AzK%P??b?p|hzBok)=29z0L$U2`bV%ngb^e9pH?DNQrV%)Ns+oB(9r?oJ@>zp{PZ!h=>MArKS?8uc<4_ zo>)R1*V;!KXc|YF5K#$kS9=OOclP%7_4W71Vuuc8vr|*k(}hAlf8@x_OtDxh&Cbrv zmCHwuRw~tMt#<6#{QSZ~y?*@oi4%*9OH0ekE3~euIPH5Xj!T%{kIai`-D!DAA*iir zCDndt6||DHT9WoVBYo3M>yOR2;{>?r1bW|1Tijs6U{a%u8N_#ub54|-e3??9jHH+7M(y?yQND{p$6;9ZF?nH=eG7K4|J z{3JcV9^HSgx{)6gHD63Bn=!3GwOwUtB!0k}A^E>Zu1$+tW+3 jq`nzAehX|<-vk{PxqA80yHcvl!7!MEN~vClDusUm>ux$i literal 0 HcmV?d00001 diff --git a/terminfo/e/eat-mono b/terminfo/e/eat-mono new file mode 100644 index 0000000000000000000000000000000000000000..5d4b98b03a6adec85048e71482c697b5d9284c7d GIT binary patch literal 2008 zcmah~U1%It6h3$ErPhcjJ`~NA5&~0-O~THdnVsDZxHfHSjES50k84Y}nWjmzf8CuV z+vZOYr64N$P(-1K(uYbxK}8TOC`&`_4D# zd~@gC`RQi8&A}}g_&f!I+yfJR!h}-1AwW&4h)m_ zkB!4-xEC`4n~=3y_rW&kh3&{(7=*nr40+@eZ~)^Wn1UK4&_uopFThE71=%Th8{R=Y z1MkBJ@G*Q2U%=Oxe+NInPl&D7MHPv)T9=UjX7VeD*E+|p!yoWBSZovPVt2DGY%A+! zJ6IpXncxW6E|z0^*a-3o_9QDH-t1SzV=*hUdA7<^*jleX_3OJiB1>AK4na z#C~O$*;S>CSfkcP&J!K=4eQMgUtf9pCi?oS8?$#+*V#_*ht{Xod6j*I@mr&R-#OlD ztyw=?zgSnT>(*bE#k=@Dyqov(`?=)1_#l6nkMpPb0Y1eme4elHm-wsv6hF<+@N@hl z{u%$0f5R{EHGYv_=D+hlITM@3U1E#aCbo+Kkroe#ed1B^l-Ms~F)MDI?XB~gSp46P z=QpT$aRcqvXZr8amxWz;7H)$(!7ey6PR(`V$f-#uuA?AFFg${T&>Vf}U#bg-;SQ9B zapYuB!UqD0D@!V!#$*qU-CB%fK*~6dF|hZ`$bJs&9VtwMG6t7I&Q1AQs*;rX#4^Of zPVkATnLdNvgEZ^{X{xn^#HS!thooveOJNjNF?uUt=dmSEbC51&6F45j@i;1OfJ(s) zRm`ZEr6^Mv^TWi5>_w6$oyzlcfo>$xl>jd_uP>J-k#q3^hLEWF(n%E=YZGcx%7bk} z(@@H2o6y;mLMKw>i8k2{luwc@oke%q>38Boc)j){*cmF)I~s!>LKoO$;N+ZI)=6;D zox`|pPGlESq@|rCa-E21fK+NKk@}jtPR(5qKR1( zjlQXieC_RPZ(n)S+XU}Qe96R=rz;pddU&OZWBMb@@yohZePO#Wa`jT7caY3dDTbjK L>g8q=8WjEk3s(4U literal 0 HcmV?d00001 diff --git a/terminfo/e/eat-truecolor b/terminfo/e/eat-truecolor new file mode 100644 index 0000000000000000000000000000000000000000..c2c86b92d7778650f40314d613956d5bccdfd538 GIT binary patch literal 2223 zcma)7ZD<@t7=CAGtu-PQf7FlF7y?s^O~UQ$?tOH{vuRUfOnQmd4?J6Xy}LBm+$Gn`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