org-mode

Can we make an Emacs buffer to be static/pinned?

蓝咒 提交于 2019-12-05 02:20:27
问题 I use an Org file to keep track of my activities, because it's often that I am loosing track of what actually I am aiming to do :) Now, I would like to reserved a top buffer window with only 5 lines tall and show the narrowed todo from that org file. All other window/buffer activites will not touch that static/pinned buffer. Is there a way to achieve that result??? Thanks! EDITED : Can we make that certain buffer to have different background Color? I pressume it's not, because all we have is

Make the source code from one code block the input to another code block in Emacs org-mode

泄露秘密 提交于 2019-12-05 01:31:49
I'm getting started with org-mode and there's something I'd like to do that seems like it should be possible, but I'm having trouble figuring out. Let me describe the scenario: I have some SQL code that I want to execute on a remote server. I currently have a python script that takes SQL code as a string and does this for me. Without org-mode, my work flow would be to start with a file like so: echo "SELECT name, grade FROM students" >> basic_query.sql and then I'd run: $ python run_query.py basic_query.sql To do this is in the org-mode setting, I could create a code block for the SQL: #+NAME:

How to add .org files under org-directory to agenda

一曲冷凌霜 提交于 2019-12-04 22:11:39
问题 I am facing the following problem: Org mode has the customizable variable org-agenda-files . The files listed by absolute path under this variable are used for building the org agenda window. If an element in the list is a directory, then all .org files matching the org-agenda-regex are processed to build the agenda view. On the other hand there is also another customizable variable: org-directory . Shockingly though, if org-agenda-files is undefined, the agenda view does not try to use the

org-capture and time clocking misbehaving

…衆ロ難τιáo~ 提交于 2019-12-04 21:05:51
问题 I am sure some of you may have gathered (from my recent barrage of questions) that I am setting up org-mode on emacs and walking through Brent Hansen's impressive org set up. He is a clocking fanatic, and I like a lot of the stuff he does to track time spent on projects. I (think) haven't messed up in setting things up, but whenever I try to clock in our out of a task I get an error with a lot of gibberish (reported below). I've tried to see if there are some patterns to how the error emerges

Org-Agenda: Show Weekend Days (only)

时光怂恿深爱的人放手 提交于 2019-12-04 20:45:01
I would like to have a custom agenda view in my org agenda, that shows only weekend days. For example, when I open [m]onth view (M-x org-agenda a v m), I see the current month. I would like to hide the work days and show weekend days only. How can I do that? Here is an interactive function that shows the agenda for the current or upcoming weekend: (defun org-next-weekend-agenda () "Produce an agenda view for the current or upcoming weekend from all files in variable `org-agenda-files'." (interactive) (let* ((day (string-to-number (format-time-string "%w"))) (offset (cond ((zerop day) -1) ; it

Emacs Org Mode: Executing simple python code

落花浮王杯 提交于 2019-12-04 20:00:50
问题 How can I execute very simple Python-Code in Emacs' Org Mode? The first example works fine, however I can't make it give me the result of simplest computations: ; works #+begin_src python def foo(x): if x>0: return x+10 else: return x-1 return foo(50) #+end_src #+RESULTS: : 60 ; does not work #+begin_src python 1+1 #+end_src #+RESULTS: : None ; does not work #+begin_src python print(1+1) #+end_src #+RESULTS: : None I set up Org Mode using the following lines: ;; enable python for in-buffer

How to evaluate all code blocks when exporting in emacs org-mode

无人久伴 提交于 2019-12-04 18:57:13
问题 I have an org-mode document with many different R source code blocks. Whenever I hit C-c C-e and export to PDF or HTML I get a different prompt asking to evaluate each code block. This wasn't a big deal, but now I have to type yes 20+ times. Is there an option to automatically evaluate all the code blocks? 回答1: I think this is what you want: (setq org-confirm-babel-evaluate nil) 回答2: Put the following line at the top of your file, that way you get asked one time upon opening it, and the safer

Export html from org-mode: custom date format

冷暖自知 提交于 2019-12-04 15:43:38
问题 I am exporting org files to html. I am using Org-mode 7.9.3f with Emacs 24. How can I get a custom time format in the postamble? I tried setting the variable org-export-html-postamble-format to (setq org-export-html-postamble-format '(("en" "<p class=\"date\">Date: %d</p>"))) Then the time format looks like this: 2013-07-16T21:20+0200 I would like to have only the date: 2013-07-16, i.e %y-%m-%d. 回答1: You should try: (setq org-export-html-date-format-string "%Y-%m-%d") 来源: https:/

How can I disable auto-fill mode in emacs?

China☆狼群 提交于 2019-12-04 15:14:01
问题 Today I got my new PC (win 7, 32 bit) and installed Vincelt Goulets Emacs. The only other thing I did was updating org-mode. Now, I am stuck with auto-fill-mode on every time I start emacs new, which I hate. I would like to turn auto-fill-mode off, for now and forever. I even deleted my .emacs file but auto-fill-mode was still turned on. The only solution that worked was (a) a nasty workaround or (b) always typing M-x auto-fill-mode everytime I start emacs anew. I would be really happy to

How to let Org-mode open a link like [[file://file.org]] in current window instead of default in other window?

妖精的绣舞 提交于 2019-12-04 13:31:20
问题 I hope to use [C-c C-o] to open a link like [[file://filename.org|filename]] in current window, instead of the default in other window. How to change this Org-mode default behavior ? Seems default [C-u C-c C-o] is force open link in other window. And there is a similar question at here: How do I keep Emacs org-mode from splitting windows? 回答1: You need to change the value of org-link-frame-setup . Default value contains the cons (file . find-file-other-window) . You may replace it by (file .