bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#51454: Progress bar in Org source blocks


From: excalamus
Subject: bug#51454: Progress bar in Org source blocks
Date: Mon, 1 Nov 2021 03:03:33 +0100 (CET)


>
> Indeed, Emacs sets automatically this variable.  That’s why it is used
> by Guix. :-)
>
>
>> I understand this to mean that INSIDE_EMACS *is* being set and that
>> it's the guix command's responsibility to do something with it (if it
>> wants to).
>>
>
> Yes.
>
I was thinking there would be a catch-all, but it looks like I need to ensure 
that various environment variables are set.  It looks like we need to identify 
a few more.

>
> If you have not tried yet, then NO_COLOR=1 should do the job.  
>
>
It looks like NO_COLOR removes colors as expected (which is great). However, 
there are other characters which appear that are undesirable.  They are 
characters which copy correctly in email, but don't work within org or it's 
html export.  They render in Emacs as ^M^[[K and ^H.  Here's a kill-yank of a 
session (removed some progress bars, but I'm sure you get the point):

--8<---------------cut here---------------start------------->8---
(org-babel-do-load-languages 'org-babel-load-languages '((shell . t)))

#+begin_src sh :results output :session test
echo $TERM
#+end_src

#+RESULTS:
: 
: dumb

#+begin_src sh :results output :session test
echo $INSIDE_EMACS
#+end_src

#+RESULTS:
: 27.2,comint

#+begin_src sh :results output :session test
export NO_COLOR=1
#+end_src

#+RESULTS:

#+begin_src sh :results output :session test
echo $NO_COLOR
#+end_src

#+RESULTS:
: 1

#+begin_src sh :results output :session test
guix pull
#+end_src

#+RESULTS:
#+begin_example
Updating channel 'guix' from Git repository at 
'https://git.savannah.gnu.org/git/guix.git'...
[                                                      ]receiving objects   
2% [#                                                     ]receiving objects 
  5% [##                                                    ]receiving 
objects   7% [Kindexing objects  95% 
[####################################################   ]indexing objects  
98% [#####################################################  ]Authenticating 
channel 'guix', commits 9edb3f6 to f3d5d57 (3 new commits)...
########################                                                     
][###################################################                        
   
][##############################################################################]Building
 from this channel:
  guix      https://git.savannah.gnu.org/git/guix.git    f3d5d57
substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
#################] 100.0% compute-guix-derivation  1004B       132KiB/s 
00:00 [##################] 100.0%
Computing Guix derivation for 'x86_64-linux'...  
-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\
substitute: updating substitutes from 'https://ci.guix.gnu.org'...   
8.3%substitute: updating substitutes from 'https://ci.guix.gnu.org'...  
16.7%substitute: updating substitutes from 'https://ci.guix.gnu.org'...  
25.0%substitute: updating substitutes from 'https://ci.guix.gnu.org'...  
33.3%substitute: updating substitutes from 'https://ci.guix.gnu.org'...  
41.7%substitute: updating substitutes from 'https://ci.guix.gnu.org'...  
50.0%substitute: updating substitutes from 'https://ci.guix.gnu.org'...  
58.3%substitute: updating substitutes from 'https://ci.guix.gnu.org'...  
66.7%substitute: updating substitutes from 'https://ci.guix.gnu.org'...  
75.0%substitute: updating substitutes from 'https://ci.guix.gnu.org'...  
83.3%substitute: updating substitutes from 'https://ci.guix.gnu.org'...  
91.7%substitute: updating substitutes from 'https://ci.guix.gnu.org'... 
100.0%
The following derivations will be built:
   /gnu/store/6s9dsrraqil9h3c1y3wjsd03wl1vkms0-profile.drv
   /gnu/store/1giiiwjmj4wnqnss4snagrxc8q6dhhm9-guix-home-modules.drv
   /gnu/store/ar8pb4p6lgqyrhkqcj36vdpzxblz6879-guix-system-modules.drv
   /gnu/store/dj196mg5l18bfslkrmjnnx7bakhzr4m8-guix-system-tests-modules.drv
   /gnu/store/ibb6dqgfv5yzgyxhcnvljyh27qjvh4zr-guix-cli-modules.drv
   /gnu/store/jin7ydbcbrzzwz7h1z4fxlvic1qmj52n-guix-packages-base-modules.drv
   /gnu/store/lchb46366ydz2m54zi4i1v35z9clra05-guix-cli-core-modules.drv
   /gnu/store/ik9393vzwfa88hkvg7srddh0468y6yyj-guix-command.drv
   /gnu/store/is3f35mxggdcnlhqrlv7jz0hb0qj3bqr-guix-daemon.drv

44.7 MB will be downloaded
substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
  guix-package-cache                           1.2MiB/s 00:00 | 64KiB 
transferred guix-package-cache                          615KiB/s 00:00 | 
192KiB transferred guix-package-cache                          1.1MiB/s 
00:01 | 576KiB transferred guix-package-cache                          
1.2MiB/s 00:01 | 700KiB transferred
  guix-cli                                     444KiB/s 00:00 | 64KiB 
transferred guix-cli                                    635KiB/s 00:00 | 
253KiB transferred guix-cli                                    597KiB/s 
00:00 | 253KiB transferred
  guix-cli-core                                470KiB/s 00:00 | 64KiB 
transferred guix-cli-core                               637KiB/s 00:00 | 
256KiB transferred guix-cli-core                               1.0MiB/s 
00:01 | 640KiB transferred guix-cli-core                               
1.5MiB/s 00:01 | 1.1MiB transferred
#################] 100.0% guix-cli-modules  261B                89KiB/s 
00:00 [##################] 100.0%
#################] 100.0% guix-cli-core-modules  265B           84KiB/s 
00:00 [##################] 100.0%
  guix-home                                    437KiB/s 00:00 | 64KiB 
transferred guix-home                                   471KiB/s 00:00 | 
192KiB transferred guix-home                                   564KiB/s 
00:01 | 323KiB transferred
 guix-packages-base  11.9MiB          640KiB/s 00:00 [                  ]   
2.1% guix-packages-base  11.9MiB          1.3MiB/s 00:01 [#                 
]   6.3% guix-packages-base  11.9MiB          2.0MiB/s 00:01 [##             
   ]  13.6% guix-packages-base  11.9MiB          2.8MiB/s 00:01 [####        
      ]  23.6% guix-packages-base  11.9MiB          3.3MiB/s 00:01 [######   
         ]  33.5% guix-packages-base  11.9MiB          2.7MiB/s 00:02 
[######            ]  36.7% guix-packages-base  11.9MiB          2.9MiB/s 
00:02 [########          ]  45.1% guix-packages-base  11.9MiB          
3.2MiB/s 00:02 [#########         ]  55.0% guix-packages-base  11.9MiB       
   3.4MiB/s 00:02 [###########       ]  64.5% guix-packages-base  11.9MiB    
      3.6MiB/s 00:02 [#############     ]  74.4% guix-packages-base  11.9MiB 
         3.8MiB/s 00:03 [###############   ]  84.9% guix-packages-base  
11.9MiB          4.0MiB/s 00:03 [################# ]  94.8% 
guix-packages-base  11.9MiB          4.0MiB/s 00:03 [##################] 100.0%
#################] 100.0% guix-home-modules  265B               98KiB/s 
00:00 [##################] 100.0%
#################] 100.0% guix-packages-base-modules  270B      94KiB/s 
00:00 [##################] 100.0%
  guix-system                                  3.2MiB/s 00:00 | 64KiB 
transferred guix-system                                 2.8MiB/s 00:00 | 
640KiB transferred guix-system                                 3.9MiB/s 
00:00 | 1.7MiB transferred guix-system                                 
4.3MiB/s 00:01 | 2.7MiB transferred guix-system                              
   4.4MiB/s 00:01 | 3.7MiB transferred guix-system                           
      4.5MiB/s 00:01 | 4.7MiB transferred guix-system                        
         4.6MiB/s 00:01 | 5.8MiB transferred guix-system                     
            4.7MiB/s 00:01 | 6.8MiB transferred guix-system                  
               4.7MiB/s 00:01 | 7.0MiB transferred
  guix-system-tests                            488KiB/s 00:00 | 64KiB 
transferred guix-system-tests                           660KiB/s 00:00 | 
256KiB transferred guix-system-tests                          1018KiB/s 
00:01 | 559KiB transferred
#################] 100.0% guix-system-modules  264B             98KiB/s 
00:00 [##################] 100.0%
#################] 100.0% guix-system-tests-modules  270B       89KiB/s 
00:00 [##################] 100.0%
 guix-f3d5d572d-modules  22.8MiB      624KiB/s 00:00 [                  ]   
1.1% guix-f3d5d572d-modules  22.8MiB      944KiB/s 00:01 [                  
]   2.5% guix-f3d5d572d-modules  22.8MiB      1.5MiB/s 00:01 [               
   ]   5.5% guix-f3d5d572d-modules  22.8MiB      1.8MiB/s 00:01 [#           
      ]   8.5% guix-f3d5d572d-modules  22.8MiB      2.1MiB/s 00:01 [##       
         ]  11.5% guix-f3d5d572d-modules  22.8MiB      2.4MiB/s 00:01 [##    
            ]  15.4% guix-f3d5d572d-modules  22.8MiB      2.5MiB/s 00:02 
[###               ]  18.7% guix-f3d5d572d-modules  22.8MiB      2.6MiB/s 
00:02 
#################] 100.0% guix-f3d5d572d  14KiB                881KiB/s 
00:00 [##################] 100.0%
 building CA certificate bundle...
 listing Emacs sub-directories...
 building fonts directory...
 building directory of Info manuals...
 building database for manual pages...
[#########################################################################]100%
 
[#########################################################################]100%
 
[#########################################################################]building
 profile with 1 package...
 New in this revision:
  1 new package: binwalk
  1 package upgraded: pipe-viewer@0.1.5
#+end_example

#+begin_src sh :results output :session test
guix package -u
#+end_src

#+RESULTS:
#+begin_example
guix package: warning: package 'python-plover-python-dictionary' no longer 
exists
The following package will be upgraded:
   python-language-server (dependencies or package changed)

The following derivation will be built:
   /gnu/store/aa1096zp388n4xbxxw8ra7lp7c2pgbkm-profile.drv

 applying 30 grafts for 
/gnu/store/iw3ndz2qlim3f5a4qh86lm01gfvsgp14-python-language-server-0.36.2.drv 
...
 \building CA certificate bundle...
 listing Emacs sub-directories...
 building fonts directory...
 generating GLib schema cache...
 creating GTK+ icon theme cache...
 building cache files for GTK+ input methods...
 building directory of Info manuals...
 building database for manual pages...
[                                                                         ]  
0% [                                                                         
]  0% [                                                                      
   ]  1% [                                                                   
      ]  1% [                                                                
         ]  1% [                                                             
            ]  1% [#                                                         
               ]  2% [#                                                      
                  ]  2% [#                                                   
                     ]  2% [#                                                
                        ]  2% [#                                             
                           ]  3% [#                                          
                              ]  3% [##                                      
                                 ]  3% [##                                   
                                    ]  3% [##                                
                                       ]  3% [##                             
                                          ]  3% [##                          
                                             ]  4% [##                       
                                                ]  1% [                      
                                                   ]  4% [##                 
                                                      ]  4% [##              
                                                         ]  4% [###          
                                                            ]  4% [##        
                                                               ]  4% [###    
                                                                  ]  2% [#   
                                                                     ]  5% 
[#########################################################################]100%
 
[#########################################################################]building
 XDG desktop file cache...
 building XDG MIME database...
 building profile with 89 packages...
#+end_example
--8<---------------cut here---------------end--------------->8---

>
> Sorry to not have thought before. :-)
>
How dare you. /s (Seriously, thank you for your help. I've ready learned a lot 
and the output is looking much better.)






reply via email to

[Prev in Thread] Current Thread [Next in Thread]