heh again ... that caused a little bit of head scratching...
I wanted an environment variable $NEXTCLOUD, because the name of my
nextcloud directory is different
on different machines. But this didn't seem to be working, even though
$HOME seemed to work.
But I had this line:
export NEXTCLOUD=~/nextCloud
in ~/.bashrc ... which is not applicable if I start leo from the desktop
I was confused because if I typed 'env' in a terminal, I *would* see the
value.
So I moved the line to ~/.profile, and this behaves as I expect.
I remember when I first learned about the original path specifiers, with
{{g.app.homedir}}
and {{sep}}, I thought "hmm ... there must be a good reason why Edward
hasn't used the python
os.path functions to sort this out". I must have been carrying that thought
with me for a while...
The documentation could do with improving around here though ... in fact I
don't think
there is currently anything on path descriptors at all. The availability of
$(ENVVAR} at
least would be useful.
Thanks for listening ... J^n
On Tuesday, January 9, 2024 at 9:37:43 PM UTC jkn wrote:
> heh - see from a closer reading of the code and
> https://github.com/leo-editor/leo-editor/pull/3264 that
> ${ENVNAME} should already be supported, via os.path.expandvars().
>
> I'm still having a little trouble getting the new form(s) to work as I
> expect,
> i will experiment a bit more and report back.
>
> On Tuesday, January 9, 2024 at 7:14:33 PM UTC jkn wrote:
>
>> did the work that got done here ever get documented? I am looking at some
>> nodes with old-style path expressions and I am a bit confused what the
>> current state of the art is.
>> Path expressions don't seem to be discussed in the current documentation.
>>
>> FWIW, in relation to the posting above this, I would suggest that
>> ${ENVNAME} works in a similar way to $ENVNAME - like in bash scripts, for
>> instance.
>>
>> Happy New Year!
>> Jon N
>>
>>
>> On Sunday, April 9, 2023 at 12:46:47 AM UTC+1 Edward K. Ream wrote:
>>
>>> On Saturday, April 8, 2023 at 5:52:20 PM UTC-5 [email protected] wrote:
>>>
>>> Excellent! And if Leo were to export, say, LEODIR, which would be the
>>> *leo* directory, then there would not be a need for {leoDir} since one
>>> could write something like
>>>
>>> @file $LEODIR/themes/vr3/rst-dark.css
>>>
>>> I like it.
>>>
>>>
>>> So do I. The new code will be ready later this evening.
>>>
>>> Edward
>>>
>>
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/leo-editor/f818fe95-1a77-484c-b263-924159495b20n%40googlegroups.com.