org-mode

Org-Agenda: Show Weekend Days (only)

半城伤御伤魂 提交于 2019-12-06 15:07:56
问题 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? 回答1: 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'."

How to enable org-indent-mode by default?

寵の児 提交于 2019-12-06 10:47:41
问题 I am using Emacs 25.1.50.2 When I am using Org-mode, the org-indent-mode is off by default. So I have to enable it using M-x org-indent-mode everytime. I put the lisp below into my config file ~/.emecs.d/init.el with no effect. ;; Enable org-indent mode by default (org-indent mode 1) ;; Above line really should be (org-indent-mode 1) Thanks for your time :) 回答1: You can use the mode hook for the major mode to enable this buffer-local minor mode in org-mode buffers. For Emacs 24+ you can

Extract the second level headline

六眼飞鱼酱① 提交于 2019-12-06 08:08:24
For my global TODO list, I am showing breadcrumbs as suggested here : (concat \"[ \"(org-format-outline-path (org-get-outline-path)) \" ]\") ") to produce following: I would like to show only the second level of project breadcrumb. So in this case, I would only display [Project A] . I think if I can make a function that can extract the second level, I just need to prepend with %? so that [Tasks] does not appear for Tasks, but only project names would appear for Projects. What would be an ideal way of extracting the second level? All you have to do to get the second element of (org-get-outline

how to specify a property value of a variable in emacs lisp

和自甴很熟 提交于 2019-12-06 02:26:25
I use the following code in .emacs file to set default publish behavior. I put the org base directory in difference locations for difference computers: ;; define machine specific directories storing my org files (cond ((system-name-is-home) (setq org-dir "/data/org")) ((system-name-is-work) (setq org-dir "~/org"))) Thus I'd like to use a variable to specify :base-directory to org-dir instead of hard-coding it as "~/org" . How can I do that? (require 'org-publish) (setq org-publish-project-alist '( ("org-notes" :base-directory "~/org" :base-extension "org" :publishing-directory "~/tmp/"

Exporting inline code to html in org-mode

只谈情不闲聊 提交于 2019-12-06 01:54:22
问题 What I want in org-mode is like the inline code block syntax in Markdown language X <- 3 . I googled and attempted (reference): src_R{X <- 3} inline in org-mode, but exporting to html (with C-c C-e h ) did not show the inline code. Other code block like #+begin_src R stuff works fine, but anyhow there is a warning message while exporting: htmlize.el 1.34 or later is needed for source code formatting [14 times] Could that be the reason ? Update: Thanks for @LeVieuxGildas opinion, I installed

Emacs: Org-mode spreadsheet: targeting via hline

与世无争的帅哥 提交于 2019-12-05 19:42:00
I'm trying to log my hours in org mode: ** Bob Johnson, Bob's SEO | subject | time | minutes | total hours | |-----------------------------------------------+---------------------------+---------+-------------| | optimization report | 2011/07/11 8-10:00 PM PST | 120 | 2 | | phonecall to dicuss report and plan of action | 2011/07/13 5:41 PM | 43 | 0.71666667 | |-----------------------------------------------+---------------------------+---------+-------------| | | | 249 | 4.15 | #+TBLFM: $4=@0$-1/60::@6$3=vsum(@I..@II) The main problem is the expression above that sums up total hours: @6$3=vsum

how can I collapse all entries older than 3 months in my emacs org-mode journal file?

主宰稳场 提交于 2019-12-05 18:45:06
I have a large journal file with date entries like this: [2011-06-23 Thu] some text [2011-06-22 Wed] some more text [... 12MB of text later ...] [2000-01-01 Sat] first entry I would like to be able to configure org-mode so that only the last 3 months are visible, whereas older entries are collapsed, and are only expanded when I need to. Is there a way of setting this up automatically so that every new day makes the 3 month + 1 day old entry be collapsed next time? As it is now, it's impossible for me to use, because it takes more than a minute to load the document. phils With 12MB of text,

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

不打扰是莪最后的温柔 提交于 2019-12-05 16:11:41
问题 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? 回答1: 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-05 12:37:10
问题 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

Orgmode: how to filter the blocks to be tangle?

泪湿孤枕 提交于 2019-12-05 11:01:53
In Orgmode, is there a way to tangle just the blocks in subtree matching (or not matching) a specific tag ? For instance with the following code * A #+BEGIN_SRC c printf("Not exported"); #+END_SRC * B :D: #+BEGIN_SRC c printf("Exported"); #+END_SRC exporting along tag D , the tangle C file will only contains printf("Exported"); I'm using org-mode to organise my emacs config, and my goal is to derive different configs from the master one emacs-config.org . (for instance a lightconfig by marking just the specific) To achieve this behavior you can make use of the fact that aside from yes and no ,