org-mode

Using org-capture-templates to schedule a TODO for the day after today

杀马特。学长 韩版系。学妹 提交于 2019-12-04 10:17:54
问题 In org-mode, I know how to create a todo and use the timestamp so that it is scheduled for today. How do I schedule it for tomorrow? Unfortunately I don't know Elisp and don't have time right now to learn it. Here is my .emacs file: (setq org-capture-templates '(("t" "Agenda Todo" entry (file+headline "c:/Org/agenda.org" "Agenda") "\n\n** TODO %?\nSCHEDULED: <%<%Y-%m-%d %a>>" :empty-lines 1) I would need to replace the %m-%d %a with a value incremented by one day. 回答1: Working off Juancho's

Interactively enter headline under which to place an entry using capture

独自空忆成欢 提交于 2019-12-04 04:43:00
Using capture templates like the one below, I can add entries to different headlines in a file. How can I manually enter a headline during capture, instead of setting up each headline to a key in the .emacs file like I am now doing? (setq org-capture-templates '( ("l" "Log" entry (file+headline "c:/Org/log.org" "Log") "\n\n** %?\n<%<%Y-%m-%d %a %T>>" :empty-lines 1)) I don't believe you can have it prompt for the headline on capture. You can however refile from within the capture window which should result in the desired behaviour. I would define a catch-all target headline/file so that if you

Emacs initialization as org file: how can I get the right version of org-mode?

断了今生、忘了曾经 提交于 2019-12-04 01:15:15
I've been experimenting with the org-babel tutorial that describes how to put the bulk of your emacs init.el file into an org file. However, I would like to use org-mode 8 (mainly for the new exporter) and I'm on gnu emacs 24.3.1 (for windows) which comes with org-mode 7.9 built-in, so I have org-mode installed from the elpa package manager instead of using the built-in version. My problem is that emacs loads the org-mode that comes with emacs rather than the one I have installed in elpa. Is there a way to load the elpa org-mode? Here is my init.el, modified from the org-babel tutorial to

in org-mode, how to make code blocks folded by default?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-04 00:22:32
In Emacs org-mode, how would I instruct org-mode to make HTML code blocks folded by default? So that when I open an org file they are folded? org-mode provides this feature out of the box. You can set it globally by customizing the variable org-hide-block-startup . To set this for a single file, add #+STARTUP: hideblocks To the header. Here's the relevant section of the manual 来源: https://stackoverflow.com/questions/21540593/in-org-mode-how-to-make-code-blocks-folded-by-default

Emacs Org Mode: How To Stop Total in Column View Showing Number of Days?

醉酒当歌 提交于 2019-12-03 23:52:36
I'm using Emacs 23.4.1 and Org-Mode 8.0.6 In my org file I have the estimated number of hours that a task will take using the Effort property of the associated heading. For example: * My Tasks ** TODO Read a book... ** TODO Watch a film... ** TODO Learn org-mode :PROPERTIES: :Effort: 2:00 :END: Then I can switch to column view and view the total time estimated for all of "my tasks". I do this by adding the following line to my org file: #+COLUMNS: %55ITEM(Details) %5Effort(Time){:} When the total number of hours is greater than 24, then the total is displayed in terms of days and hours, e.g.

Define org mode macro with line breaks

百般思念 提交于 2019-12-03 23:20:33
It is possible to define a macro in an org file as follow: #+MACRO: macroname <here comes the body of the macro> Is it possible to define a macro that contains line breaks? I.e., something like: #+MACRO: macroname line 1 of macro line 2 of macro In particular, this macro will be expanded to line 1 of macro line 2 of macro My motivation is to have a macro that expands to a block of text which contains, for instance, two paragraphs. Not only is this possible, it's quite easy to do. You just need to be creative about how you insert the newline. I make use of Org Babel to hack the macros. The

Emacs org-mode file/viewer associations

拜拜、爱过 提交于 2019-12-03 22:24:28
In an Emacs org-mode file, when I click on a PDF the file opens in a PDF viewer. Similarly, when I click on a URL it opens in a web browser. But when I click on a path to an image file, the byte stream opens as text in the editor. How do I configure Emacs/org-mode to open images with a specified application, say an image editor or a browser? Jérôme Radix In org-mode, this is org-file-apps that control what to do when clicking on a URL-like text. It is configured by default to : ((auto-mode . emacs) ("\\.mm\\'" . default) ("\\.x?html?\\'" . default) ("\\.pdf\\'" . default)) As said in org-file

org--agenda-prefix-format %? does not work

戏子无情 提交于 2019-12-03 21:20:02
Currently, I have my global TODO list shown as follows thanks to erikstokes : (org-agenda-prefix-format " %i %?-12(concat \"[ \"(org-format-outline-path (list (nth 1 (org-get-outline-path)))) \" ]\") "))) which outputs: for org layout: However, as you can see, for Task A, even though there is nothing in the project, it still shows up on the list. describe-variable for org-agenda-prefix-format says : If the first character after `%' is a question mark, the entire field will only be included if the corresponding value applies to the current entry. This is useful for fields which should have

How can remove the <scheduled date> in the org agenda view quickly?

 ̄綄美尐妖づ 提交于 2019-12-03 19:13:52
问题 In the emacs org agenda view(today), I schedule some tasks with the <scheduled date> . But now I want to remove the <scheduled date> single task or mutli tasks together. (Don't want to schedule them to the other day). Now I have to <TAB> each tasks, and delete the <scheduled date> line. Is there any quick key (speed key?) to do it? 回答1: tl;dr : In the agenda, m on all these tasks, then C-u B s . This called for quite a bit of searching, but org-mode is powerful. According to the manual, C-c C

Emacs mode for Stack Overflow's markdown

末鹿安然 提交于 2019-12-03 18:18:09
问题 I am using Org-mode in Emacs to handle all my technical documentation. I would like to use Emacs to prepare questions that I have for Stack Overflow. Is there an Emacs mode for that, or even better, an extension for Org-mode to handle Stack Overflow formatting? Ideally it should include all formatting options supported by the markdown syntax used in the Stack Overflow question/comment buffers. 回答1: Integrating Emacs with Stack Overflow As mentioned you can use markdown-mode. To integrate