From mboxrd@z Thu Jan 1 00:00:00 1970 From: Max Flander Subject: Bug: Org-babel can't capture the output of rg/ag/pt with org-babel on OS X [9.2.6 (9.2.6-4-ge30905-elpaplus @ /Users/maxflander/.emacs.d/elpa/org-plus-contrib-20191014/)] Date: Tue, 29 Oct 2019 21:36:59 +0000 Message-ID: <17855F72-DCCD-48B3-BEF0-056A1267C270@squelch.io> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:42078) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPZAu-0000FV-2d for emacs-orgmode@gnu.org; Tue, 29 Oct 2019 17:37:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iPZAr-0003bt-Fj for emacs-orgmode@gnu.org; Tue, 29 Oct 2019 17:37:11 -0400 Received: from mail-eopbgr730106.outbound.protection.outlook.com ([40.107.73.106]:10416 helo=NAM05-DM3-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iPZAq-0003W6-UB for emacs-orgmode@gnu.org; Tue, 29 Oct 2019 17:37:09 -0400 Content-Language: en-US Content-ID: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: "emacs-orgmode@gnu.org" I'm trying to capture the output of rg but I'm getting no output (I'm getti= ng the message "Code block produced no output" in the minibuffer. =20 I've also tried ag and pt which don't work either. It works with grep but t= his is too slow for my use-case. Example: #+BEGIN_SRC shell mkdir -p myproject pushd myproject echo "something" > something.txt rg something popd #+END_SRC #+RESULTS: I've tried the solutions from these similar questions, but they're not work= ing here: * https://stackoverflow.com/questions/27304469/capturing-the-output-of-diff= -with-org-babel * https://stackoverflow.com/questions/12771642/capture-output-from-a-shell-= command-with-babel-in-org-mode?noredirect=3D1&lq=3D1 Emacs : GNU Emacs 26.3 (build 1, x86_64-apple-darwin18.5.0, NS appkit-1671= .40 Version 10.14.4 (Build 18E226)) of 2019-08-30 Package: Org mode version 9.2.6 (9.2.6-4-ge30905-elpaplus @ /Users/maxfland= er/.emacs.d/elpa/org-plus-contrib-20191014/) current state: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (setq org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-config= ure-edit-buffer) org-metadown-hook '(org-babel-pop-to-session-maybe) org-clock-out-hook '(org-clock-remove-empty-clock-drawer) org-html-format-inlinetask-function 'org-html-format-inlinetask-default-fun= ction org-odt-format-headline-function 'org-odt-format-headline-default-function org-imenu-depth 8 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default org-mode-hook '(org-indent-mode #[0 "\301\211\207" [imenu-create-index-func= tion org-imenu-get-tree] 2] #[0 "\300\301\302\303\304$\207" [add-hook change-major-mod= e-hook org-show-all append local] 5] #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-babel-show-result-a= ll append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes toc-o= rg-enable org-bullets-mode org-eldoc-load) org-odt-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"] org-archive-hook '(org-attach-archive-delete-maybe) org-confirm-elisp-link-function 'yes-or-no-p org-startup-with-inline-images t org-agenda-before-write-hook '(org-agenda-add-entry-text) org-metaup-hook '(org-babel-load-in-session-maybe) org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 "\n\n(= fn ENTRY)"] org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"] org-babel-pre-tangle-hook '(save-buffer) org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-ar= g-expand) org-babel-load-languages '((shell . t)) org-ascii-format-drawer-function #[771 "\207" [] 4 "\n\n(fn NAME CONTENTS W= IDTH)"] org-src-lang-modes '(("arduino" . arduino) ("redis" . redis) ("php" . php) = ("C" . c) ("C++" . c++) ("asymptote" . asy) ("bash" . sh) ("beamer" . latex) = ("calc" . fundamental) ("cpp" . c++) ("ditaa" . artist) ("dot" . fundamental) ("elisp" . e= macs-lisp) ("ocaml" . tuareg) ("screen" . shell-script) ("shell" . sh) ("sqlite" . = sql)) org-occur-hook '(org-first-headline-recenter) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-show-empty-line= s org-optimize-window-after-visibility-change) org-speed-command-hook '(org-speed-command-activate org-babel-speed-command= -activate) org-odt-format-inlinetask-function 'org-odt-format-inlinetask-default-funct= ion org-confirm-shell-link-function 'yes-or-no-p org-link-parameters '(("id" :follow org-id-open) ("eww" :follow eww :store = org-eww-store-link) ("rmail" :follow org-rmail-open :store org-rmail-sto= re-link) ("mhe" :follow org-mhe-open :store org-mhe-store-lin= k) ("irc" :follow org-irc-visit :store org-irc-store-li= nk :export org-irc-export) ("info" :follow org-info-open :export org-info-expor= t :store org-info-store-link) ("gnus" :follow org-gnus-open :store org-gnus-store-= link) ("docview" :follow org-docview-open :export org-docv= iew-export :store org-docview-store-link) ("bibtex" :follow org-bibtex-open :store org-bibtex-= store-link) ("bbdb" :follow org-bbdb-open :export org-bbdb-expor= t :complete org-bbdb-complete-link :store org-bbdb-store-link) ("w3m" :store org-w3m-store-link) ("file+sys") ("fil= e+emacs") ("orgit-rev" :store orgit-rev-store :follow orgit-re= v-open :export orgit-rev-export :complete orgit-rev-complete-link) ("orgit-log" :store orgit-log-store :follow orgit-lo= g-open :export orgit-log-export :complete orgit-log-complete-link) ("orgit" :store orgit-status-store :follow orgit-sta= tus-open :export orgit-status-export :complete orgit-status-complete-link) ("doi" :follow org--open-doi-link) ("elisp" :follow = org--open-elisp-link) ("file" :complete org-file-complete-link) ("ftp" :follow (lambda (path) (browse-url (concat "f= tp:" path)))) ("help" :follow org--open-help-link) ("http" :follow (lambda (path) (browse-url (concat "= http:" path)))) ("https" :follow (lambda (path) (browse-url (concat = "https:" path)))) ("mailto" :follow (lambda (path) (browse-url (concat= "mailto:" path)))) ("news" :follow (lambda (path) (browse-url (concat "= news:" path)))) ("shell" :follow org--open-shell-link)) org-latex-format-headline-function 'org-latex-format-headline-default-funct= ion org-link-translation-function 'toc-org-unhrefify org-latex-format-inlinetask-function 'org-latex-format-inlinetask-default-f= unction org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"] org-image-actual-width 400 org-html-format-headline-function 'org-html-format-headline-default-functio= n )