unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#68948: highlight error, cannot open filetypes.conf: No such file or directory
@ 2024-02-06 11:01 chris
  2024-03-28 11:51 ` chris
  0 siblings, 1 reply; 3+ messages in thread
From: chris @ 2024-02-06 11:01 UTC (permalink / raw)
  To: 68948; +Cc: chris

There is an issue using "highlight"

https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/pretty-print.scm#n353
http://www.andre-simon.de/doku/highlight/en/highlight.php#ch3_8

This unexpected error is reproduced easily with the command below: "cannot open filetypes.conf"
```
$ echo "(highlight (package bug))" | highlight -O xterm256 --syntax lisp
cannot open filetypes.conf: No such file or directory
(highlight (package bug))
```

Creating `~/.highlight/filetypes.conf` did not resolve the error.
Setting "HIGHLIGHT_DATADIR=$HOME/.config/highlight/" did not resolve the error.

Any advice is welcome. Thank you :)

Chris




^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#68948: highlight error, cannot open filetypes.conf: No such file or directory
       [not found] <87ttmk2dqd.fsf@sarg.org.ru>
@ 2024-02-08  2:02 ` chris
  0 siblings, 0 replies; 3+ messages in thread
From: chris @ 2024-02-08  2:02 UTC (permalink / raw)
  To: Sergey Trofimov; +Cc: chris, 68948

Sergey,

I believe you intended a related message for the debbugs service, but only sent the message to my mail address. I am unsure and want to avoid showing impoliteness, I rephrased your message a bit below. Thank you,

Chris

-------------------

the highlight error goes away after copying the conf file this way
```
cp $(guix build highlight)/etc/highlight/filetypes.conf ~/.highlight/
```

strace shows that the conf is searched in wrong place:

--8<---------------cut here---------------start------------->8---
newfstatat(AT_FDCWD, "/home/user/.highlight/filetypes.conf", 0x7ffcd0778130,
0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/gnu/store/9mdd4ba8ri4j07acmbc2vhkiipbz9l63-highlight-4.8/share/highlight/filetypes.conf",
0x7ffcd0778130, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/gnu/store/9mdd4ba8ri4j07acmbc2vhkiipbz9l63-highlight-4.8/share/highlight/config/highlight/filetypes.conf",
0x7ffcd0778130, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "filetypes.conf", O_RDONLY) = -1 ENOENT (No such file or
directory)
futex(0x7f2c4827e1f0, FUTEX_WAKE_PRIVATE, 2147483647) = 0
write(2, "cannot open filetypes.conf: No s"..., 53cannot open
filetypes.conf: No such file or directory) = 53
--8<---------------cut here---------------end--------------->8---

but it is installed to
/gnu/store/...-highlight-.../etc/highlight/highlight.conf
the package recipe has to be fixed





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#68948: highlight error, cannot open filetypes.conf: No such file or directory
  2024-02-06 11:01 chris
@ 2024-03-28 11:51 ` chris
  0 siblings, 0 replies; 3+ messages in thread
From: chris @ 2024-03-28 11:51 UTC (permalink / raw)
  To: 68948; +Cc: chris

Below changes at the highlight package resolve the issue here but may adversely affect "highlight-gui" functionality. Will wait for https://issues.guix.gnu.org/70047 before trying to proceed,
```diff
-      #:make-flags #~(let ((confdir (string-append %output
-                                                   "/share/highlight/config/")))
-                       (list (string-append "PREFIX=" %output)
-                             (string-append "HL_CONFIG_DIR=" confdir)
-                             (string-append "conf_dir=" confdir)))
+      #:make-flags #~(list (string-append "PREFIX=" %output)
+                           (string-append "HL_CONFIG_DIR=" %output "/etc/")
+                           (string-append "conf_dir=" %output "/etc/"))
```




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-03-28 12:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <87ttmk2dqd.fsf@sarg.org.ru>
2024-02-08  2:02 ` bug#68948: highlight error, cannot open filetypes.conf: No such file or directory chris
2024-02-06 11:01 chris
2024-03-28 11:51 ` chris

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).