From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 6BAuM++bgmFGgQAAgWs5BA (envelope-from ) for ; Wed, 03 Nov 2021 15:25:51 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 8GfdLu+bgmGhOQAAB5/wlQ (envelope-from ) for ; Wed, 03 Nov 2021 14:25:51 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5E852FD69 for ; Wed, 3 Nov 2021 15:25:51 +0100 (CET) Received: from localhost ([::1]:51014 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1miHD4-0007n3-3U for larch@yhetil.org; Wed, 03 Nov 2021 10:25:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49914) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1miH2d-0006BA-Ke for bug-guix@gnu.org; Wed, 03 Nov 2021 10:15:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:57406) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1miH2d-00081S-Ax for bug-guix@gnu.org; Wed, 03 Nov 2021 10:15:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1miH2d-0002CA-5w for bug-guix@gnu.org; Wed, 03 Nov 2021 10:15:03 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#51454: Progress bar in Org source blocks Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 03 Nov 2021 14:15:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51454 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: excalamus@tutanota.com Received: via spool by 51454-submit@debbugs.gnu.org id=B51454.16359488608327 (code B ref 51454); Wed, 03 Nov 2021 14:15:03 +0000 Received: (at 51454) by debbugs.gnu.org; 3 Nov 2021 14:14:20 +0000 Received: from localhost ([127.0.0.1]:40713 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1miH1v-0002AE-Ub for submit@debbugs.gnu.org; Wed, 03 Nov 2021 10:14:20 -0400 Received: from mail-qt1-f177.google.com ([209.85.160.177]:44769) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1miH1u-00029w-JA for 51454@debbugs.gnu.org; Wed, 03 Nov 2021 10:14:19 -0400 Received: by mail-qt1-f177.google.com with SMTP id d21so915411qtw.11 for <51454@debbugs.gnu.org>; Wed, 03 Nov 2021 07:14:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=523PEc2ZD2VZLeJ6jIvlglZDEWihx7im1D6o9Gi7IcU=; b=Jg/6IR1kjlTMmxSDnGD92youEjipQU6sKhLb9cAw0xWbEyX3QJd1E0W7dJhvy6++eO jEZE23bHRb/WQstoK0n1iO3EtFmwMZedht76/rhDovav8T+/N1KDHep41xGLc0H0aLeq gOee3sVqViIC9/NO81Kk8kus1kqJx0g71sRmfuon8bhYDkIauZHJFUyrO+UdUb+H2xb4 zv83UrL4YEYOU25YEgtOYl5rK210awmHdPip6h6Hozgh9cn/tRJhAfFMh/m8bvLA0DJL 6M/nBeR3YvGxVAEzEJp131OAW3a6v72CydEP7qaFK31VEgvAga/s5LdPRFxUM0qop9vN lWlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=523PEc2ZD2VZLeJ6jIvlglZDEWihx7im1D6o9Gi7IcU=; b=x8pf/LgN0uKwhwbji2buK0rIEGRueIfzzR1VRPyen9WUTZKpMm9wIX3FVcbSEYBD89 anDXZIA5808oapgvNdwImEiCqkKCVDBMBAOug2OhsVvrHwXoJm+YgrvAYEoUj7H7lijB 6PcRo3i0ocj4y1agf75yVLDY+e2DUj74xop5l7ylvga4ZEo/LiwuGO8P2Q6KOcO+Xo0M O1M0I0gDmKZzbVT6/T+LLZe3VjLPqe3w7BTu56W9KeKUCvzpn3iz9DCvTCbFrT7W4KiH Xj4s5M2EKhxRRQYGUF5JJxYB8K5yTlBd3it22z1QqjjNIvkQWgbIbu5397IotXzTUec6 ONmg== X-Gm-Message-State: AOAM533DqDCtbvu6ojgUlU87IiO7Cn27MLzRP/nl3jzf9QF2+9DUOOS0 wKPo8THKDGSY7xsbTEyuWaM1VpaBedjVJQKArm5NRJv26eM= X-Google-Smtp-Source: ABdhPJzTq0t9qakpXHtcjyBjWO8WHY9dQdZ+InC9OTZPTUqgP95wN0n4SWi7WqlG9Xo0XxG5hW1yQAWmHLXTlg356Is= X-Received: by 2002:ac8:1e1a:: with SMTP id n26mr46421751qtl.335.1635948852872; Wed, 03 Nov 2021 07:14:12 -0700 (PDT) MIME-Version: 1.0 References: <867ddujwee.fsf@gmail.com> In-Reply-To: From: zimoun Date: Wed, 3 Nov 2021 15:14:01 +0100 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 51454 <51454@debbugs.gnu.org> Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1635949551; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=523PEc2ZD2VZLeJ6jIvlglZDEWihx7im1D6o9Gi7IcU=; b=BRRkBX8MsFyQJJXSWNLmuvIV5Ck3W9Bf3FcbcWPFAhqvlR286HQiatGkJFWhaD5N13qcjB bRO52M0QiAaNkFgkwkTmePrLl9yH2I5IBgbQUPhEASEFXxmJxWDZViGqnAGwcadnGmHvpC GLnINn2hArfwFO1AHe2UeW4gCzP/lWsxvXKnAcNSVBbbKCPVo5pRYD5GmBF4nY6MpbJwoX ZdzTnfPU53uBACJTs0D6OVNRj6cyVY5GFDmdX69nSEpu+aIBdFzq5jasj3aqcVqeDUa7c6 nr6S/qcTqUFdAcxqpFpwIcUJbDwKu4v1ow0dOleZtWMrZPy2DcfrPcbAzZc04Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1635949551; a=rsa-sha256; cv=none; b=K7xhHe2lSRfE+2m+v99r1KDe7lo4DvXgLAtTprLdnudmjx/YEmaGOUgMuHwcpsJJb8oACM oXk15w0z1aEf5vWJYIG6KjlAcla1NaQJnJxEbyTyUfaG33QXQhCvx4LD3OL9sxEoiyo7jq HR8LWq27QQU9otzfIE4EdIgGocTpWr1fxzz4COWdl/KQxL76yqt5iin5Q3HOwdAYvoXQKI eeC0gDM/fju7eIU6hwOTRju+PoeIUj5LjxPh98U1BLjddTjBl4yx0M+68BZK+SA2HP1Ov7 jzfePjtr3axLCgF/qT9BCjaodvrLgFNuuiDwsXLGSKWPLDty4qwnpVPaEait0A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b="Jg/6IR1k"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -1.96 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b="Jg/6IR1k"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: 5E852FD69 X-Spam-Score: -1.96 X-Migadu-Scanner: scn0.migadu.com X-TUID: fniTO1d28THm Hi, On Mon, 1 Nov 2021 at 03:03, wrote: > It looks like NO_COLOR removes colors as expected (which is great). Howev= er, 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): I miss what you would like or what you are expecting. And I do not think it is an issue about Guix. Instead, it is an issue about dealing with outputs and Org-mode (Babel). The results should be formatted to be displayed correctly after being catched, for instance, something along these lines: --8<---------------cut here---------------start------------->8--- #+begin_src emacs-lisp :results none (defun color-region (start) (save-excursion (goto-char start) (when (looking-at org-babel-result-regexp) (let ((end (org-babel-result-end)) (ansi-color-context-region nil)) (ansi-color-apply-on-region beg end))))) (defun replace-region (start) (save-excursion (goto-char start) (when (looking-at org-babel-result-regexp) (let ((end (org-babel-result-end))) (while (re-search-forward " " end t) (replace-match " :")))))) (add-hook 'org-babel-after-execute-hook #'(lambda () (let ((beg (org-babel-where-is-src-block-result nil nil))) (when beg (mapc (lambda (f) (apply f (list beg))) (list 'color-region 'replace-region)))))) #+end_src #+begin_src sh :results output echo -e "\e[31mSomething\e[0m" #+end_src #+RESULTS: : -e Something #+begin_src sh :results output :session test guix environment --ad-hoc hello -- hello #+end_src #+RESULTS: : The following derivation will be built: : /gnu/store/wkhxrm33smq3mbc6f50fivyd1yc9kk6z-profile.drv : : 10.0 MB will be downloaded : #################] 100.0% : hello-2.10 51KiB 907KiB/s 00:00 [##################] 100.0% : :building database for manual pages... : [########################################################################= #] :100% [####################################################################= #####] :100% [####################################################################= #####] : :building profile with 1 package... : :Hello, world! :building database for manual pages... : [########################################################################= #] :100% [####################################################################= #####] :100% [####################################################################= #####] : :building profile with 1 package... : :Hello, world! --8<---------------cut here---------------end--------------->8--- For example, this part, --8<---------------cut here---------------start------------->8--- Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'... [ ] [Kreceiving objects 2% [# ] [Kreceiving objects 5% [## ] [Kreceiving objects 7% [Kindexing objects 95% [#################################################### ] [Kindexing objects 98% [##################################################### ] [KAuthenticating channel 'guix', commits 9edb3f6 to f3d5d57 (3 new commits)... --8<---------------cut here---------------end--------------->8--- is not managed by Guix but it comes from the dependency 'guile-git' and even probably libgit, Cheers, simon