Re: Guix SD and Emacs

2022-11-23 Thread Akib Azmain Turja
Gottfried  writes:

> Hi Guixers,
>
> ---
> I have got 4 questions:
> ---
> 1.question
>
> I created a "init.el" file for Emacs.
>
> Where should it go in Guix SD?
>
> I have got a hidden directory (or should I say "folder"?) in my user
> directory: .emacs.d
> and a hidden file: .emacs
>
> David Wilson proposed:
> ~/.config/emacs/init.el - Follows Linux desktop environment guidelines
> (recommended on Linux!)
> This means to create a directory "emacs" in /.config directory
> --

~/.emacs.d/init.el: Works.
~/.emacs:   Works.
~/.config/emacs/init.el:Works, and I'm using it.

>
> 2.question
>
> If I have questions about emacs where can I ask?
> Guix help is for Guix, but where can I ask for emacs questions?
>
> There won't be probably not many, but when I have time, I am working
> on setting up my emacs and am starting to use it more often.
> --

help-gnu-emacs list.

>
> 3. question
>
> in my created init.el file which I put into the directory /.emacs.de
>
> for learning I added:
>
> ;; Display line numbers in every buffer
> (global-display-line-numbers-mode 1)
>
> When I press C+M x with the cursor between these lines there appear
> the line numbers immediately.
>
> When I close emacs and open it again the lines don't appear.
> This means that my init.el file is not read.
> How can I configure this, so that everything I put into my init.el
> file will be recognised, when starting emacs?
>
> 

Where did you put your init.el?  How are you invoking the Emacs command?

>
> 4.question
>
> To start with the right order structure,
> ( I like order without disorder)
> I would like to put everything in my "init.el" file.
>
> I choose the "misteriose-theme.el (on the startup screen: "customize
> startup")
> it created a "misterios-theme.el" file in my /.emacs.d directory.
> I thought it should go to the init.el file, which I have created later.
> Can I copy the content of this file into the init.el file?
>
> (deftheme misterioso
>   "Predominantly blue/cyan faces on a dark cyan background.")
>
> (custom-theme-set-faces
>  'misterioso
>  '(cursor class color) (min-colors 89)) (:background "#415160"
>  '(fringe class color) (min-colors 89)) (:background "#2e3748"
>  '(highlight class color) (min-colors 89)) (:background "#338f86"
>  :foreground "#e1e1e0"
>  '(region class color) (min-colors 89)) (:background "#2d4948"
>  :foreground "#e1e1e0"
>  '(isearch class color) (min-colors 89)) (:background "#fcffad"
>  :foreground "#00"
>  '(lazy-highlight class color) (min-colors 89)) (:background
>  "#338f86"
>  '(trailing-whitespace class color) (min-colors 89)) (:background
>  "#ff4242"
>  '(mode-line class color) (min-colors 89)) (:background "#212931"
>  :foreground "#ec"
>  '(mode-line-inactive class color) (min-colors 89)) (:background
>  "#878787" :foreground "#ec"
>  '(header-line class color) (min-colors 89)) (:background
>  "#808080" :foreground "#33"
>  '(minibuffer-prompt class color) (min-colors 89)) (:foreground
>  "#729fcf" :weight bold
>  '(font-lock-builtin-face class color) (min-colors 89))
>  (:foreground "#23d7d7"
>  '(font-lock-comment-face class color) (min-colors 89))
>  (:foreground "#74af68"
>  '(font-lock-constant-face class color) (min-colors 89))
>  (:foreground "#008b8b"
>  '(font-lock-function-name-face class color) (min-colors 89))
>  (:foreground "#00ede1" :weight bold
>  '(font-lock-keyword-face class color) (min-colors 89))
>  (:foreground "#ffad29" :weight bold
>  '(font-lock-string-face class color) (min-colors 89))
>  (:foreground "#e67128"
>  '(font-lock-type-face class color) (min-colors 89)) (:foreground
>  "#34cae2"
>  '(font-lock-variable-name-face class color) (min-colors 89))
>  (:foreground "#dbdb95"
>  '(font-lock-warning-face class color) (min-colors 89))
>  (:foreground "#ff4242" :weight bold
>  '(button class color) (min-colors 89)) (:underline t
>  '(link class color) (min-colors 89)) (:foreground "#59e9ff"
>  :underline t
>  '(link-visited class color) (min-colors 89)) (:foreground
>  "#ed74cd" :underline t
>  '(ediff-even-diff-A class color) (min-colors 89)) (:background
>  "#1d2430"
>  '(ediff-even-diff-B class color) (min-colors 89)) (:background
>  "#1d2430"
>  '(ediff-even-diff-C class color) (min-colors 89)) (:background
>  "#1d2430"
>  '(ediff-odd-diff-A class color) (min-colors 89)) (:background
>  "#415160"
>  '(ediff-odd-diff-B class color) (min-colors 89)) (:background
>  "#415160"
>  '(ediff-odd-diff-C class color) (min-colors 89)) (:background
>

Re: Guix SD and Emacs

2022-11-23 Thread Akib Azmain Turja
Wolf  writes:

> On 2022-11-23 17:30:07 +, ( wrote:
>> That's why I use this code to redirect all custom customisations into
>> ~/.config/emacs/custom.el:
>> 
>>   (setq custom-file
>> (concat (or (getenv "XDG_CONFIG_HOME")
>> (concat (getenv "HOME") "/.config"))
>> "/emacs/custom.el"))
>>   (load custom-file)
>
> I'm totally new to emacs, so this might be very stupid question, but
> based on the internets I've put the following into the init.el:
>
>   (setq custom-file (expand-file-name "custom.el" user-emacs-directory))
>   (load-file custom-file)
>
> Is there any practical difference or reason to prefer your version?
>
> W.

No, I think yours one is better, because it's OS independent.  I can
suggest the following, which basically the same but will save you a few
byte on your HDD/SSD:

--8<---cut here---start->8---
(setq custom-file (locate-user-emacs-file "custom.el"))
(load-file custom-file)
--8<---cut here---end--->8---

-- 
Akib Azmain Turja, GPG key: 70018CE5819F17A3BBA666AFE74F0EFA922AE7F5
Fediverse: akib@hostux.social
Codeberg: akib
emailselfdefense.fsf.org | "Nothing can be secure without encryption."


signature.asc
Description: PGP signature


Re: SCSH libraries search path

2022-11-23 Thread Tom Willemse
Hey Efraim,

Efraim Flashner  writes:

> On Sun, Nov 13, 2022 at 04:49:05PM -0800, Tom Willemse wrote:
>> Hey Efraim,
>> 
>> Efraim Flashner  writes:
>> 
>> > On Mon, Oct 31, 2022 at 12:18:50AM -0700, Tom Willemse wrote:
>> >> Hey Guix \o/
>> >> 
>> >> I've been wanting to package one of my little scripts in Guix Home and
>> >> it uses a little library I wrote for SCSH. I've been looking at how
>> >> Search Paths work and I'm having trouble figuring out how to make this
>> >> work.
>> >> 
>> >> Search paths seem easy enough generally, I was able to add a simple
>> >> addition to my configuration by just adding this to the scsh package
>> >> definition:
>> >> 
>> >> (native-search-paths
>> >>  (list (search-path-specification
>> >> (variable "SCSH_LIB_DIRS")
>> >> (files '("share/scsh/site")
>> >
>> > Try adding the 'separator' field, so it would look like this:
>> >
>> >  (native-search-paths
>> >   (list (search-path-specification
>> >  (variable "SCSH_LIB_DIRS")
>> >  (separator " ")
>> >  (files '("share/scsh/site")
>> 
>> Thanks for the suggestion! Unfortunately this gets me a value of
>> `SCSH_LIB_DIRS' like
>> 
>> /home/chelys/.guix-home/profile/share/scsh-0.7
>> 
>> which, when I try the command `scsh -ll mpd.scm -o mpd' causes the
>> following error to appear:
>> 
>> error: Illegal path element in $SCSH_LIB_DIRS
>> $SCSH_LIB_DIRS: /home/chelys/.guix-home/profile/share/scsh-0.7
>> The following element is not a string or #f: 
>> /home/chelys/.guix-home/profile/share/scsh-0.7
>> 
>> It's because SCSH treats the contents of `SCSH_LIB_DIRS' as "a sequence
>> of of s-expressions, which are `read' from the string"[1] and supports
>> either string values or the value #f. So `SCSH_LIB_DIRS' would have to
>> be in this case:
>> 
>> "/home/chelys/.guix-home/profile/share/scsh-0.7"
>> 
>> I guess this just isn't supported as yet in Guix?
>> 
>
> I played around with a bunch of different options, and I wasn't able to
> get the search-path-specification to pass the directories as strings. If
> we change the file-type to 'string then it looks for strings, but it
> really means it's looking for individual files or for directories, so
> that's not the right change.
>
> IMO the easiest way to work around it (from scsh, not from guix) would
> be to use 'stringify' from (scheme utilities) in (scheme lib-dirs) (for
> the syntactic sugar around symbol->string) to make all the items in the
> search path into strings if they aren't already.

I've tried out your changes and it seems to work just great for my
little module so far, thank you!

> Actually I have a simple diff I'll send upstream that should take care
> of it. If you could help test it that'd be great. I haven't been able to
> create a scenario where I had more than one path in the SCSH_LIB_DIRS.

I don't know how I would get more than one value in there with Guix, but
manually adding another path in there works fine:

> 22:36 ~ [1]> export SCSH_LIB_DIRS="\"${HOME}/usr/share/scsh/\" 
> ${SCSH_LIB_DIRS}"
> 22:37 ~ [130]> echo $SCSH_LIB_DIRS
> 
> "/home/chelys/usr/share/scsh/" /home/chelys/.guix-home/profile/share/scsh-0.7
> 22:37 ~ > scsh -ll mpd.scm -o mpd -ll herbstluft.scm -o herbstluft 
> Welcome to scsh 0.7
> Type ,? for help.
> > (query (and (= artist "Danko Jones") (= album "Garage Rock")))
> "((artist == \"Danko Jones\") AND (album == \"Garage Rock\"))"
> > (hc get_attr "my_wallpaper")
> /home/chelys/pictures/wallpaper/5120x1440/nfbq2nw3rsm81.jpg
> 0



Re: Guix SD and Emacs

2022-11-23 Thread (
On Wed Nov 23, 2022 at 8:25 PM GMT, Wolf wrote:
>   (setq custom-file (expand-file-name "custom.el" user-emacs-directory))
>   (load-file custom-file)

Oh, I didn't know about this! Thanks!

-- (



Re: ./pre-inst-env with extra channels

2022-11-23 Thread EuAndreh

I though that this should work, but it didn't.


I just got a bunch of warning about out of date ".go" compiled scheme 
files, and an exit code of 1, and nothing more.  Nothing to STDOUT or 
STDERR:


  ./pre-inst-env guix system -L 
~/.config/guix/current/share/guile/site/3.0 build 
/etc/guix/configuration.scm




Re: Guix SD and Emacs

2022-11-23 Thread Felix Lechner via
Hi,

On Wed, Nov 23, 2022 at 12:59 PM Wolf  wrote:
>
>   (setq custom-file (expand-file-name "custom.el" user-emacs-directory))
>   (load-file custom-file)

My init file also looks like that.

Kind regards
Felix Lechner



Re: ./pre-inst-env with extra channels

2022-11-23 Thread EuAndreh
Come to think about it, I did this in the past, but I wanted a less 
roundabout way of get it to work.


For anyone else in a similar position looking for options, this does work :)



Re: Guix SD and Emacs

2022-11-23 Thread Wolf
On 2022-11-23 17:30:07 +, ( wrote:
> That's why I use this code to redirect all custom customisations into
> ~/.config/emacs/custom.el:
> 
>   (setq custom-file
> (concat (or (getenv "XDG_CONFIG_HOME")
> (concat (getenv "HOME") "/.config"))
> "/emacs/custom.el"))
>   (load custom-file)

I'm totally new to emacs, so this might be very stupid question, but
based on the internets I've put the following into the init.el:

  (setq custom-file (expand-file-name "custom.el" user-emacs-directory))
  (load-file custom-file)

Is there any practical difference or reason to prefer your version?

W.

-- 
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.


signature.asc
Description: PGP signature


Re: ./pre-inst-env with extra channels

2022-11-23 Thread zimoun
Hi,

On Wed, 23 Nov 2022 at 11:11, EuAndreh  wrote:

> But when trying to use the code from my clone, it fails to recognize the 
> extra channels, available in the system-wide /etc/guix/channels.scm file:
>
>  $ ./pre-inst-env guix system build /etc/guix/configuration.scm
>  guix system: error: failed to load '/etc/guix/configuration.scm':
>  ice-9/boot-9.scm:3330:6: In procedure resolve-interface:
>  no code for module (xyz euandreh queue)

In addition to ( answer, you can use ’guix time-machine’ with an
appropriated channels.scm file,

(list (channel
(name 'guix)
(url "https://home/path/to/your/local/checkout/of/guix";)
(branch "master"))
  (channel …)

then,

guix time-machine -C channels.scm \
 -- system build /etc/guix/configuration.scm

It is another way without using “guix shell -D guix”, ./bootstrap,
./configure and make.  Well, it depends on what you are patching. :-)

Cheers,
simon



Re: Guix SD and Emacs

2022-11-23 Thread (
Heya,

On Wed Nov 23, 2022 at 5:16 PM GMT, Gottfried wrote:
> I have got a hidden directory (or should I say "folder"?) in my user 
> directory: .emacs.d
> and a hidden file: .emacs
>
> David Wilson proposed:
> ~/.config/emacs/init.el - Follows Linux desktop environment guidelines 
> (recommended on Linux!)
> This means to create a directory "emacs" in /.config directory

~/.config/emacs/init.el is best, but *if you have a .emacs.d or a .emacs,
it will not be read*, so you need to do this:

  mv .emacs ~/.config/emacs/init.el
  mv .emacs.d/* ~/.config/emacs

(careful your .emacs isn't overwritten with .emacs.d/init.el when using
these commands)

> If I have questions about emacs where can I ask?
> Guix help is for Guix, but where can I ask for emacs questions?
>
> There won't be probably not many, but when I have time, I am working on 
> setting up my emacs and am starting to use it more often.

All the GNU mailing lists can be found here:

[list of GNU lists] 

It shows that a help-gnu-emacs mailing list exists:

[help-gnu-emacs archives] 
[help-gnu-emacs subscribe page] 


> in my created init.el file which I put into the directory /.emacs.de
>
> for learning I added:
>
> ;; Display line numbers in every buffer
> (global-display-line-numbers-mode 1)
>
> When I press C+M x with the cursor between these lines there appear the 
> line numbers immediately.
>
> When I close emacs and open it again the lines don't appear.
> This means that my init.el file is not read.
> How can I configure this, so that everything I put into my init.el file 
> will be recognised, when starting emacs?

Probably because you already have a .emacs. Emacs prioritises reading the
.emacs file over .emacs.d/init.el, and .emacs.d/init.el over
.config/emacs/init.el. If you want to use .emacs.d/init.el, you need to
make sure there's no .emacs.

> I choose the "misteriose-theme.el (on the startup screen: "customize 
> startup")
> it created a "misterios-theme.el" file in my /.emacs.d directory.
> I thought it should go to the init.el file, which I have created later.
> Can I copy the content of this file into the init.el file?

You don't want to do that. It's an autogenerated file, and you should
keep those in separate files, in my opinion, so that you don't
accidentally modify things that should not be modified :)

That's why I use this code to redirect all custom customisations into
~/.config/emacs/custom.el:

  (setq custom-file
(concat (or (getenv "XDG_CONFIG_HOME")
(concat (getenv "HOME") "/.config"))
"/emacs/custom.el"))
  (load custom-file)

> (custom-set-variables
>   ;; custom-set-variables was added by Custom.
>   ;; If you edit it by hand, you could mess it up, so be careful.
>   ;; Your init file should contain only one such instance.
>   ;; If there is more than one, they won't work right.
>   '(ansi-color-faces-vector
> [default default default italic underline success warning error])
>   '(ansi-color-names-vector
> ["#2e3436" "#a4" "#4e9a06" "#c4a000" "#204a87" "#5c3566" 
> "#729fcf" "#ec"])
>   '(custom-enabled-themes '(tsdh-dark whiteboard))
>   '(font-use-system-font t))
> (custom-set-faces
>   ;; custom-set-faces was added by Custom.
>   ;; If you edit it by hand, you could mess it up, so be careful.
>   ;; Your init file should contain only one such instance.
>   ;; If there is more than one, they won't work right.
>   '(default ((t (:family "DejaVu Sans Mono" :foundry "PfEd" :slant 
> normal :weight normal :height 120 :width normal)
>
> Probably it was created, when I choose the new theme.

Yes, it was. If you decide to do the custom-file redirection above,
you should move this code into ~/.config/emacs/custom.el.

  -- (



Guix SD and Emacs

2022-11-23 Thread Gottfried

Hi Guixers,

---
I have got 4 questions:
---
1.question

I created a "init.el" file for Emacs.

Where should it go in Guix SD?

I have got a hidden directory (or should I say "folder"?) in my user 
directory: .emacs.d

and a hidden file: .emacs

David Wilson proposed:
~/.config/emacs/init.el - Follows Linux desktop environment guidelines 
(recommended on Linux!)

This means to create a directory "emacs" in /.config directory
--

2.question

If I have questions about emacs where can I ask?
Guix help is for Guix, but where can I ask for emacs questions?

There won't be probably not many, but when I have time, I am working on 
setting up my emacs and am starting to use it more often.

--

3. question

in my created init.el file which I put into the directory /.emacs.de

for learning I added:

;; Display line numbers in every buffer
(global-display-line-numbers-mode 1)

When I press C+M x with the cursor between these lines there appear the 
line numbers immediately.


When I close emacs and open it again the lines don't appear.
This means that my init.el file is not read.
How can I configure this, so that everything I put into my init.el file 
will be recognised, when starting emacs?




4.question

To start with the right order structure,
( I like order without disorder)
I would like to put everything in my "init.el" file.

I choose the "misteriose-theme.el (on the startup screen: "customize 
startup")

it created a "misterios-theme.el" file in my /.emacs.d directory.
I thought it should go to the init.el file, which I have created later.
Can I copy the content of this file into the init.el file?

(deftheme misterioso
  "Predominantly blue/cyan faces on a dark cyan background.")

(custom-theme-set-faces
 'misterioso
 '(cursor class color) (min-colors 89)) (:background "#415160"
 '(fringe class color) (min-colors 89)) (:background "#2e3748"
 '(highlight class color) (min-colors 89)) (:background "#338f86" 
:foreground "#e1e1e0"
 '(region class color) (min-colors 89)) (:background "#2d4948" 
:foreground "#e1e1e0"
 '(isearch class color) (min-colors 89)) (:background "#fcffad" 
:foreground "#00"
 '(lazy-highlight class color) (min-colors 89)) (:background 
"#338f86"
 '(trailing-whitespace class color) (min-colors 89)) (:background 
"#ff4242"
 '(mode-line class color) (min-colors 89)) (:background "#212931" 
:foreground "#ec"
 '(mode-line-inactive class color) (min-colors 89)) (:background 
"#878787" :foreground "#ec"
 '(header-line class color) (min-colors 89)) (:background "#808080" 
:foreground "#33"
 '(minibuffer-prompt class color) (min-colors 89)) (:foreground 
"#729fcf" :weight bold
 '(font-lock-builtin-face class color) (min-colors 89)) 
(:foreground "#23d7d7"
 '(font-lock-comment-face class color) (min-colors 89)) 
(:foreground "#74af68"
 '(font-lock-constant-face class color) (min-colors 89)) 
(:foreground "#008b8b"
 '(font-lock-function-name-face class color) (min-colors 89)) 
(:foreground "#00ede1" :weight bold
 '(font-lock-keyword-face class color) (min-colors 89)) 
(:foreground "#ffad29" :weight bold
 '(font-lock-string-face class color) (min-colors 89)) (:foreground 
"#e67128"
 '(font-lock-type-face class color) (min-colors 89)) (:foreground 
"#34cae2"
 '(font-lock-variable-name-face class color) (min-colors 89)) 
(:foreground "#dbdb95"
 '(font-lock-warning-face class color) (min-colors 89)) 
(:foreground "#ff4242" :weight bold

 '(button class color) (min-colors 89)) (:underline t
 '(link class color) (min-colors 89)) (:foreground "#59e9ff" 
:underline t
 '(link-visited class color) (min-colors 89)) (:foreground 
"#ed74cd" :underline t
 '(ediff-even-diff-A class color) (min-colors 89)) (:background 
"#1d2430"
 '(ediff-even-diff-B class color) (min-colors 89)) (:background 
"#1d2430"
 '(ediff-even-diff-C class color) (min-colors 89)) (:background 
"#1d2430"
 '(ediff-odd-diff-A class color) (min-colors 89)) (:background 
"#415160"
 '(ediff-odd-diff-B class color) (min-colors 89)) (:background 
"#415160"
 '(ediff-odd-diff-C class color) (min-colors 89)) (:background 
"#415160"
 '(gnus-group-news-1 class color) (min-colors 89)) (:foreground 
"#ff4242" :weight bold
 '(gnus-group-news-1-low class color) (min-colors 89)) (:foreground 
"#ff4242"
 '(gnus-group-news-2 class color) (min-colors 89)) (:foreground 
"#00ede1" :weight bold
 '(gnus-group-news-2-low class color) (min-colors 89)) (:foreground 
"#00ede1"
 '(gnus-group-news-3 class color) (min-colors 89)) (:foreground 
"#23d7d7" :w

Re: ./pre-inst-env with extra channels

2022-11-23 Thread (
On Wed Nov 23, 2022 at 11:11 AM GMT, EuAndreh wrote:
> How can I use the Guix version of my Git clone, alongside its packages, 
> services, etc. while still using extra channels?

You'll need to add the channels to the load path manually.

 ./pre-inst-env guix home reconfigure ~/conf/home.scm -L 
~/.config/guix/current/share/guile/site/3.0

works for me.

-- (



./pre-inst-env with extra channels

2022-11-23 Thread EuAndreh
How can I use the Guix version of my Git clone, alongside its packages, 
services, etc. while still using extra channels?


Sample run: a build of my current system works:

$ guix system build /etc/guix/configuration.scm
/gnu/store/gfn6hpim1njlnr0d3p6mmvc4zgqmgqw6-system

But when trying to use the code from my clone, it fails to recognize the 
extra channels, available in the system-wide /etc/guix/channels.scm file:


$ ./pre-inst-env guix system build /etc/guix/configuration.scm
guix system: error: failed to load '/etc/guix/configuration.scm':
ice-9/boot-9.scm:3330:6: In procedure resolve-interface:
no code for module (xyz euandreh queue)



Re: build all dependents?

2022-11-23 Thread zimoun
Hi,

On Tue, 22 Nov 2022 at 20:55, Tobias Geerinckx-Rice  wrote:
>> This sometimes requires some manual fiddling
>
> Thanks for highlighting that.  I've never encountered it.
>
> This is similar to another recent bug report, where ‘guix show’
> listed something as depending on a hidden package.  Or something
> like that.

If you are referring to bug#59278, the bug is on the package definition
side.  As explained here [1], the ’hidden’ properties is dropped out at
one ’inherit’.

1: http://issues.guix.gnu.org/msgid/87h6yz46wp@gmail.com


> Two possible solutions:
>
> - Hide hidden packages.  This makes the most sense to me.  You'd
>   still report accurate[0] numbers for ‘guix refresh -l’.
>
> - Allow referring to hidden packages in some contexts, or maybe
>   all contexts, and keep listing them in ‘advanced’ tools like
>   ‘guix refresh -l’.

I agree that what is hidden is not clear.  Maybe a marker could be added
when displaying the hidden packages in “guix refresh -l”.  It would
allow to filter them out.

Or we could separate the regular packages to the hidden one,

--8<---cut here---start->8---
$ guix refresh -l guile-ssh
Building the following 19 packages would ensure 26 dependent packages are 
rebuilt: emacs-guix@0.5.2-6.cf5b7a4 guile-imanifest@0.0.0-0.ccd5a21 
cl-ospm@0.0.1 gwl@0.5.0 guix-jupyter@0.2.2 guix-build-coordinator@0-65.26fe4a7 
guix-build-coordinator-agent-only@0-65.26fe4a7 gwl-next@0.5.0-1.706a089 
nar-herder@0-9.5acfcc0 guix-modules@0.1.0 hpcguix-web@0.2.0 
guix-data-service@0.0.1-33.ee73d2c numix-gtk-theme@2.6.7 arc-theme@20220405 
gnome-shell-extension-gsconnect@50 gnome-terminal@3.44.1 gnome@42.4 
cuirass@1.1.0-11.9f08035 '(@@ (gnu packages package-management) guix-daemon)'
--8<---cut here---end--->8---

Well, maybe a rework of the submission #58824 [1].

1: 


Cheers,
simon