GNU bug report logs -
#39394
vis editor doesn't respect user configuration
Previous Next
To reply to this bug, email your comments to 39394 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guix <at> gnu.org
:
bug#39394
; Package
guix
.
(Sun, 02 Feb 2020 17:57:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
tsmish <tsymsh <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-guix <at> gnu.org
.
(Sun, 02 Feb 2020 17:57:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Steps to reproduce:
1. Make file ~/.config/vis/visrc.lua with following text:
```
require('vis')
vis.events.subscribe(vis.events.INIT, function()
vis:command('qall')
end)
```
2. Open vis
vis should immediately close on startup, but it doesn't.
It happens because package defines $VIS_PATH search path to directory
which contains example visrc.lua file and $VIS_PATH is highest
priority directory according to man page.
Suggestions:
1. Remove or rename example visrc.lua in share/vis
2. Remove $VIS_PATH search path from package. This shouldn't break
anything, as it seems share/vis is in later resolution path.
Information forwarded
to
bug-guix <at> gnu.org
:
bug#39394
; Package
guix
.
(Sun, 02 Feb 2020 20:04:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 39394 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Thanks for the report.
tsmish <tsymsh <at> gmail.com> ezt írta (időpont: 2020. febr. 2., Vas 18:57):
> Steps to reproduce:
> 1. Make file ~/.config/vis/visrc.lua with following text:
> ```
> require('vis')
>
> vis.events.subscribe(vis.events.INIT, function()
> vis:command('qall')
> end)
> ```
> 2. Open vis
>
> vis should immediately close on startup, but it doesn't.
>
> It happens because package defines $VIS_PATH search path to directory
> which contains example visrc.lua file and $VIS_PATH is highest
> priority directory according to man page.
>
> Suggestions:
> 1. Remove or rename example visrc.lua in share/vis
>
I would go for renaming it like visrc.lua.example, or similar.
Would you like to propose a patch?
2. Remove $VIS_PATH search path from package. This shouldn't break
> anything, as it seems share/vis is in later resolution path.
>
>
>
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#39394
; Package
guix
.
(Sun, 02 Feb 2020 20:07:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 39394 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
tag 39394 easy quit
[Message part 2 (text/html, inline)]
Added tag(s) easy.
Request was from
Gábor Boskovits <boskovits <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Sun, 02 Feb 2020 20:07:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-guix <at> gnu.org
:
bug#39394
; Package
guix
.
(Sun, 02 Feb 2020 21:09:01 GMT)
Full text and
rfc822 format available.
Message #16 received at 39394 <at> debbugs.gnu.org (full text, mbox):
> I would go for renaming it like visrc.lua.example, or similar.
I don't really like this solution because while this particular
problem will be fixed, underlying issue of system paths having higher
priority than user ones will stay.
From what I can figure out from the
code(https://github.com/martanne/vis/blob/a4b64c5c396646bb2f14db3b4145a5482a2ff8bf/vis-lua.c#L2650)
$VIS_PATH is at the top of package.path which will make requires from
user configuration go there in case of files with same name.
Also this will probably make commands such as "set theme" ignore user
files from configuration directory when there is a file in system one.
Also there is VIS_PATH #define which seems to be intended way to set
path to system directory. It is set to /usr/local/share/vis by
default, but I don't see it
in help, which probably means it gets overwritten with some kind of guix magic.
Information forwarded
to
bug-guix <at> gnu.org
:
bug#39394
; Package
guix
.
(Sun, 02 Feb 2020 22:58:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 39394 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
tsmish <tsymsh <at> gmail.com> ezt írta (időpont: 2020. febr. 2., Vas 22:08):
> > I would go for renaming it like visrc.lua.example, or similar.
>
> I don't really like this solution because while this particular
> problem will be fixed, underlying issue of system paths having higher
> priority than user ones will stay.
> From what I can figure out from the
> code(
> https://github.com/martanne/vis/blob/a4b64c5c396646bb2f14db3b4145a5482a2ff8bf/vis-lua.c#L2650
> )
> $VIS_PATH is at the top of package.path which will make requires from
> user configuration go there in case of files with same name.
> Also this will probably make commands such as "set theme" ignore user
> files from configuration directory when there is a file in system one
>
Ok, as a real user of vis, I believe you got a better understanding. I will
have a look at the package tomorrow.
>
> Also there is VIS_PATH #define which seems to be intended way to set
> path to system directory. It is set to /usr/local/share/vis by
> default, but I don't see it
> in help, which probably means it gets overwritten with some kind of guix
> magic.
>
[Message part 2 (text/html, inline)]
This bug report was last modified 5 years and 130 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.