I have a file whose contents I would like to view dynamically from a generic Org-mode buffer.

For example, suppose I have a file called data.csv, and I'd like to display some of its contents when I visit study.org. To make up one way that this might look, study.org might appear as follows:

# -*- mode: Org; coding: utf-8; -*-
#+INCLUDE: "data.csv" :head 5

I see that someone has asked this question in the context of the Org-mode export mechanism (How to embed external file contents in org file?), but I don't see a way to include external file content in an Org buffer.

Does Org-mode support this sort of thing?


1 Answer 1


you can use a shell source code block

#+BEGIN_SRC sh :results output drawer
head -n 5 data.csv

Then you hit C-c C-c inside the block and run the source code which will show below the first five lines of the file in a results block


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.