Emacs-200-使用一份org文件导出多个代码文件
2018-03-25 23:36
176 查看
其实,这个导出方式跟只导出鱼粉代码的方式没有太大的差异。只不过需要对每个不同的代码片段单独写tangle。
假设有如下的org文件:
* My first org-mode code.
** Here is the code
#+BEGIN_SRC python :tangle 1.py
def Demo():
print("org-mode")
#+END_SRC
** Here is the code
#+BEGIN_SRC python :tangle 2.py
def Demo():
print("org-mode")
#+END_SRC
** Here is the code
#+BEGIN_SRC python :tangle 3.py
def Demo():
print("org-mode")
#+END_SRC
** Here is the code
#+BEGIN_SRC python :tangle 4.py
def Demo():
print("org-mode")
#+END_SRC
C-cC-v t
查看org文件所在的目录会发现,导出了四份不同的代码文件。
因此,其实代码的导出其实只是做一部分文本信息的提取。而tangle也只是写明了提取写入的对象文件名称。
假设有如下的org文件:
* My first org-mode code.
** Here is the code
#+BEGIN_SRC python :tangle 1.py
def Demo():
print("org-mode")
#+END_SRC
** Here is the code
#+BEGIN_SRC python :tangle 2.py
def Demo():
print("org-mode")
#+END_SRC
** Here is the code
#+BEGIN_SRC python :tangle 3.py
def Demo():
print("org-mode")
#+END_SRC
** Here is the code
#+BEGIN_SRC python :tangle 4.py
def Demo():
print("org-mode")
#+END_SRC
C-cC-v t
查看org文件所在的目录会发现,导出了四份不同的代码文件。
因此,其实代码的导出其实只是做一部分文本信息的提取。而tangle也只是写明了提取写入的对象文件名称。
相关文章推荐
- Emacs-199-使用org-mode导出代码
- Emacs-202-org文件中把代码提取到指定目录的文件中
- ASP导出excel文件的代码(自己试验成功并且一直在使用的哟)
- django使用xlwt导出excel文件实例代码
- 用两种不同的方法导出ORACLE 查询数据为CSV 文件 (python 代码 与 使用 utl_file 包)
- 通过宏定义将__declspec(dllexport)与__declspec(dllimport)的转化,实现库代码和使用代码使用同一份头文件
- [原]RCP使用org.eclipse.osgi.util.NLS访问资源文件及自动将字符串导出至资源文件的方法
- 【代码实现】使用PHP导入和导出CSV文件
- Emacs-201-org文件中多份代码输入到同一个代码文件
- 从datagrid导出html代码,生成excel文件,给客户端下载
- 学习了老外的将MILKSHAPE文件导出成为一个类的东东,代码贴出来共享下,相信会有人用到
- Asp.net 2.0 GridView数据导出Excel文件(示例代码下载)
- MS-VC 使用MAP文件快速定位程序崩溃代码行
- Asp.net 2.0 GridView数据导出Excel文件(示例代码下载)
- 使用代码创建数据库文件
- 关于Asp.net中使用以下代码导出Excel表格的问题
- Asp.net 2.0 GridView数据导出Excel文件(示例代码下载)
- Asp.net 2.0 GridView数据导出Excel文件(示例代码下载)
- Control Study->AdRotator广告控件显示自定义配置文件中广告以及与DataGrid控件结合使用显示图片(示例代码下载)
- Control Study->AdRotator广告控件显示自定义配置文件中广告以及与DataGrid控件结合使用显示图片(示例代码下载)