org-mode

Syntax highlighting within #+begin_src block in emacs orgmode not working

假如想象 提交于 2019-11-28 19:40:14
问题 I have tried many different languages and copied various examples, but none of my code blocks within orgmode get syntax highlighting. Here is what I'm trying: #+begin_src python def main(): print "Hello %s" % ("what's the problem") #+end_src #+begin_src c++ for (int i = 0; i < 30; i++) { cout << "Hello" << endl; } #+end_src When exported to HTML, it shows up in a source code block, but with no highlighting there either. I am using the newest org (7.8.10). Am I missing something here? 回答1: Do

Completely hide the :PROPERTIES: drawer in org-mode

情到浓时终转凉″ 提交于 2019-11-28 17:57:29
Could someone please give me some assistance to completely hide the :PROPERTIES: drawer, including the line that says :PROPERTIES: . * TASKS (with deadines) ** Next Action [#A] Ask the geniuses how to do this. :lawlist: DEADLINE: <2013-07-04 Thu > :PROPERTIES: :ToodledoID: 330686790 :ToodledoFolder: TASKS :Hash: afa88f17317bbe2ce0ce661333cdcfb4 :END: This line is for notes, which appears underneath the properties drawer. * UNDATED (without deadlines) ** Someday [#A] Close but no cigar -- keep trying. :lawlist: :PROPERTIES: :ToodledoID: 330686680 :ToodledoFolder: TASKS :Hash:

How to make all org-files under a folder added in agenda-list automatically?

喜你入骨 提交于 2019-11-28 17:05:12
问题 I am using org-mode to write notes and org-agenda to organize all notes, especially to search some info. by keyword or tag. C-c a m can search some files by tag inputed, C-c a s by keyword ,those functions from org-agenda are well to utilize, however, I need to add org-file into the agenda-list by hand. I added some codes into .emacs , such as (setq org-agenda-files (list "path/folder/*.org")) or (setq org-agenda-files (file-expand-wildcards "path/folder/*.org")) but, both failed to add files

How to make emacs org-mode open links to sites in Google Chrome

梦想与她 提交于 2019-11-28 16:50:40
Chrome is set as default browser, however it opens links in Firefox, which is undesired. Googling this doesn't reveal anything useful, so do you have any ideas? Emacs 23.2 doesn't directly support chrome, but it does support a "generic" browser, and something like this should work: (setq browse-url-browser-function 'browse-url-generic browse-url-generic-program "chromium-browser") You don't mention your OS, but if it's Windows or Mac, you can try: (setq browse-url-browser-function 'browse-url-default-windows-browser) (setq browse-url-browser-function 'browse-url-default-macosx-browser) And, if

How can I make Org-mode export to LaTeX with a specific preamble?

安稳与你 提交于 2019-11-28 16:02:45
问题 When I do C-c C-e l to export an Org file to LaTeX it produces a document with a particular preamble. Instead of this particular preamble I would like it to use a preamble of my choice. Say that I want it to use the following preamble: % Don't forget to qpdf --linearize the final copy \RequirePackage[l2tabu,orthodox]{nag}% Old habits die hard. All the same, there are commands, classes and packages which are outdated and superseded. nag provides routines to warn the user about the use of those

Disabling underscore-to-subscript in Emacs Org-Mode export

老子叫甜甜 提交于 2019-11-28 15:57:20
When I export to PDF via org-mode (C-c C-e d), any words with underscores end up being partially converted to subscript. How can I prevent this from happening? I found this article on the subject: Disabling Underscore subscript in Emacs Tex Mode However, I either wasn't able to figure out the correct elisp or it simply didn't work. Note, I don't want to change any global font options. I only want this fix to apply to tex/latex/org-mode. I also found this post, though it didn't work either: disable subscript superscript raise/lower? You can disable super/subscripting within an org file by

How to archive all the DONE tasks using a single command

佐手、 提交于 2019-11-28 15:19:32
To archive the DONE tasks i am using C-c C-x a command. The draw back is i have to manually move over the DONE tasks one by one and then archive it. How to archive all the DONE tasks using a single command. You can write a function using org-map-entries: (defun my-org-archive-done-tasks () (interactive) (org-map-entries 'org-archive-subtree "/DONE" 'file)) You can bulk archive (or refile/change todo etc) from within the Agenda view. http://orgmode.org/manual/Agenda-commands.html#Agenda-commands If you call Org-Agenda from within the buffer you want to archive you can temporarily restrict it to

Orgmode: A report of tasks that are done within the week

橙三吉。 提交于 2019-11-28 11:27:22
Is it possible to ask org mode to report a list of TODO items that I worked on over a period of time? We can assume that for each Todo entry I have a time tag, e.g. <2014-03-13 Thu 17:04> A quick way is to look at the logbook in the Agenda. You can look at the agenda (see Agenda Views in Org Mode docs). Move the agenda to the time period you want - day, week, month, year. Put it in logbook mode (via the 'l' key, described in section 10.5 Commands in the agenda buffer ). This will show for that time period which tasks you worked on and when. You can also use a clock table (see section 8.4.2 The

How does one send S-RET to Emacs in a terminal?

社会主义新天地 提交于 2019-11-28 09:56:49
In org-mode , pressing M-S-RET (meta-shift-return) will create a new TODO on a new line. This key sequence sends M-RET to emacs through my terminal. I've checked this with C-h c ESC-S-RET , which returns M-RET is undefined in the mini-buffer. I'm using Snow Leopard with Emacs 23.2.1 running in Terminal.app. There is no option to define a RET sequence in the terminal keyboard preferences. Any idea what's causing the missing SHIFT ? Workarounds? You can get Emacs to pretend that it got S-RET with C-x @ S RET (note uppercase S ). This also works for adding control, meta, alt, hyper or super

How to escape double quote?

拥有回忆 提交于 2019-11-28 04:34:38
问题 In org mode, if I want to format text a monospace verbatim, i.e. ~...~ , if it is inside quotes: ~"..."~ , it is not formatted (left as is). Also, are quotes a reserved symbol, if so, what do they mean? (they don't seem to affect the generated HTML / inside Emacs display). 回答1: The culprit in this case is the regular expression in org-emph-re org-verbatim-re , responsible for determining if a sequence of characters in the document is to be set verbatim or not. org-verbatim-re is a variable