Subject: mailing-list for TeXmacs Users
List archive
From : "Sam Liddicott" <address@hidden>- To: address@hidden
- Subject: Re: [TeXmacs] Ghastly use of locate
- Date: Thu, 24 Jun 2010 17:14:31 +0100
- Envelope-to: address@hidden
- Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAAXNSR0IArs4c6QAAADxQTFRF NTdQY2Z/i286eHFugnNXoJBwm5GCs5VeoqO0ua+fwLCQ4c2q19C81NDF4eLr/unQ/PTf/fXW+/rq /f/7XKo76wAAAAlwSFlzAAALEwAACxMBAJqcGAAAAi9JREFUSMetloGSqyAMRVsFNAQkxP//15cE 62rFdt/MZqbTVu/hBhLEx/qf8fgDIAN455wHyPk7wCIe9nA+fwGSH87hgD8AHPfRpy2GwdMtcBh+ mg4Ech9Ih+RNixJKDLEL0GF8VLkSojePHrDlryNijbFW8zBg8PUKbBOI6D1WCV5Rf2DzxCtgBlMs tRRVW5LyVW3ew1TfAZZ6RcQicpb4yZmaC74DJADK6BdATOrUAbJzsZie+K22ZnEBknNYysvhVH6u 1X8CqAe4DuANoPoOrAbsHXUARJ5knc5z4EyyTnHoAqj7xvkYIdk65AwhyEZKMusOIDV2QQQaCnDQ gBiDR3RdIEb5CBESt2wgQJI0Yx/Agphg1MgNsD+QkszM9wHVPx/PeQOW+fmcR9DF8+4CyCJhCuP8 fDzmBbLqs8JzMODqYNfDvKhoGYM2lDosy5jlRozccRAgrPM8iygQS3Mv87IugUgKlC7NZ6liuy4r uresVq5QuQAr09ZKEga8OkluyKXeQ6Bs3SrtqgC1pWLNqAfwDhBnB+sK8OrVL4D4h1B4zWPWhJhu gPUHKA5EwSMYUMsdQK+UKDhIOTSHeg+8HCoTOGtB/gwcl4mSdGybwXegPWhM/RHYKwchkckhUNMX 6j7ueQNScLbZZOPRxaADyO2UQCJpl7wbnE6gQ+ksWjpngxOwF1tF5ecP3R6KB+AQxPfHLncQ+nKw 06fhu68OTIfJ869eTtg22l+9zfwDK3mKl5BFHMYAAAAASUVORK5CYII=
I named this script: /usr/local/bin/locate to cache the results:
#! /bin/bash
ARGS=`echo "$*" | sed -e "s/[^a-zA-Z0-9]/-/g"`
CACHE=/tmp/locate-$USER-$ARGS
test -r "$CACHE" && exec cat $CACHE
if locate "$@" > "$CACHE.tmp"
then mv "$CACHE.tmp" "$CACHE"
exec cat "$CACHE"
else r=$?
cat "$CACHE.tmp"
rm "$CACHE.tmp"
exit $r
fi
On 24/06/10 16:37, Sam Liddicott wrote:
I made the mistake of using an arial font to match a corporate style sheet.
Now texmacs is pleased to run "locate /arial.ttf" on a regular basis which takes about 20 seconds.
AGHHH - why can't it remember the answer from last time?
Also; I have "Arial Black" installed but TeXmacs doesn't offer me that font - anyone know why?
/usr/share/fonts/truetype/msttcorefonts/Arial_Black.ttf
I tried things like:
<with|font|ms-arial_black but no joy.|<arg|title>>
maybe this works - it's hard to tell, it was looking for arialbd.ttf but it plays with locate so often who knows what it finally settled with.
Sam
--
*Sam's signature*
--
*Sam's signature*
- [TeXmacs] Ghastly use of locate, Sam Liddicott, 06/24/2010
- Re: [TeXmacs] Ghastly use of locate, Sam Liddicott, 06/24/2010
- Re: [TeXmacs] Ghastly use of locate, Andrey G. Grozin, 06/24/2010
- Re: [TeXmacs] Ghastly use of locate, Sam Liddicott, 06/24/2010
- Re: [TeXmacs] Ghastly use of locate, K B, 06/28/2010
- Re: [TeXmacs] Ghastly use of locate, Sam Liddicott, 06/29/2010
- Re: [TeXmacs] Ghastly use of locate, K B, 06/28/2010
- Re: [TeXmacs] Ghastly use of locate, Sam Liddicott, 06/24/2010
Archive powered by MHonArc 2.6.19.