Org-mode features You May Not Know

栏目: IT技术 · 发布时间: 4年前

内容简介:When I meet fellow orgers, I occasionally use some of the features below and quite often, my interlocutor does not know some of them.Do you know them all?If you think of a secret Org weapon that is not listed here, please send mean email, I will consider a

When I meet fellow orgers, I occasionally use some of the features below and quite often, my interlocutor does not know some of them.

Do you know them all?

If you think of a secret Org weapon that is not listed here, please send mean email, I will consider adding it to the list.

(The features listed below are all available with Org 9.3 and later. Check your version with M-x org-version RET .)

...

C-c C-M-l to insert all stored links with

Let's say you have harvested a dozen of links to various emacs buffers (emails, files, etc.)

C-c C-M-l will insert all the links as a list.

The related command is org-insert-all-links .

C-u C-c C-c on a list to make it a checklist

It will turn the list into a checkbox list.

Contextual capture templates

(setq org-capture-templates-contexts
      '(("r" ((in-mode . "gnus-summary-mode")
	      (in-mode . "gnus-article-mode")
	      (in-mode . "message-mode")))))

Here the capture template associated with the r key will only be displayed in gnus-summary-mode , gnus-article-mode and message-mode .

Use agenda* as a custom view to match appointments

Quoting the Org manual:

The agenda* view is the same as agenda except that it only considers appointments , i.e., scheduled and deadline items that have a time specification [h]h:mm in their time-stamps.

(setq org-agenda-custom-commands
      '(("%" "Appointments" agenda* "Today's appointments"
	 ((org-agenda-span 1)
          (org-agenda-max-entries 3)))))

See the example above.

Very useful when defining agenda views dedicated to appointments.

C-h v org-agenda-max-entries RET

"Here is another neat trick. The sample code above also sets ~org-agenda-max-entries~:

(setq org-agenda-custom-commands
      '(("%" "Appointments" agenda* "Today's appointments"
	 ((org-agenda-span 1)
          (org-agenda-max-entries 3)))))

The use of org-agenda-max-entries will limit the agenda view to the first three entries of today's tasks.

C-h v org-agenda-max-entries RET to know more about this variable.

C-x C-w agenda.org RET in an agenda view

It will store the displayed list of tasks in a new agenda.org file.

Hit = in agenda views to filter by a regex

Very useful to (export and) share your current list of tasks with someone.

Hitting = in the agenda buffer will limit to headlines matching a regular expression.

You can remove all filters by hitting | .

. in a the calendar to jump to today

Use - or + to set relative date and hours when planning

After C-c C-s on a headline scheduled in the past or the future, use ~.~ to jump to today's date.

After you hit C-c C-s on a headline to schedule it, enter e.g. +3d to plan in three days, or 10:00+1 to plan an meeting from 10am to 11am.

Use S-<up/down/left/right> to move a table cell

It will move the current cell up/down/left/right.

Summing durations in tables

Org tables are able to sum durations:

| 00:00:30 | 2:30 |
| 00:00:45 | 3:30 |
|----------+------|
| 00:01:15 | 6.00 |
#+TBLFM: @3$1=vsum(@1..@2);T::@3$2=vsum(@1..@-1);t

Hit s to (un)narrow to subtree

When org-use-speed-commands is set to t , hitting s at the beginning of a headline will narrow to the current subtree. Hitting s again will unnarrow the buffer.

Very useful when you need to hide the rest of your personal notes from your colleagues.

The related command is org-narrow-to-subtree .

Hit < to (de)activate restriction lock on current subtree

When org-use-speed-commands is set to t , hitting < at the beginning of a headline will activate the restriction lock on the current subtree. Hitting < again will deactivate it.

Very useful when you temporarily need to call agenda views while only considering tasks in the current subtree or when you need to undo things in the current subtree alone.

The related command is org-agenda-set-restriction-lock .

C-c C-^ to move to the root of the element

C-c C-^ (or C-c C-u ) while move the cursor up one element.

C-c - and C-c * to toggle headlines and items

C-c - on a headline will convert it into a list item.

C-c * on a list item will convert it into a headline.

You can also try on multiple headlines and list items.

C-c C-x - to start a list with a timer

- 0:00:00 :: Now I can start taking some notes.
- 0:00:02 :: If I hit ~M-RET~, a new list item is created.
- 0:00:06 :: And so on.

C-c C-x - will start a timer and create a list item displaying the timer like the example above.

Schedule multiple headlines in the region

When org-loop-over-headlines-in-active-region is set to t and the region is active on multiple headline, you can use C-c C-s to schedule all the headlines one after another.

M-h for mark-paragraph and org-mark-element

M-h will mark (and highlight) the paragraph at point.

In org-mode, M-h will mark (and highlight) the element at point.

Hitting M-h several times successively will mark the next elements too.

M-<up/down> and S-M-<up/down> to move elements and lines

Just hit M-<up/down> in an Org buffer. It moves elements.

Now hit ~S-M- ~: it moves the current line up/down.

S-<left/right> in column mode to cycle through property values

If a property can have multiple predefined values and the column view is active, you can use S-<left/right> in column mode to cycle through possible property values.

Using group tags to boost filtering

I use something like this in my configuration:

(setq org-tag-alist
      '((:startgroup)
	("Handson" . ?o) ;; The grouping tag
	(:grouptags)
	("Write" . ?w) ("Code" . ?c) ("Mail" . ?@)
	(:endgroup)
	(:startgroup)
	("Handsoff" . ?f) ;; The grouping tag
	(:grouptags)
	("Read" . ?r) ("View" . ?v) ("Listen" . ?l)
	(:endgroup)
	;; Off groups
	("Print" . ?P) ("Buy" . ?B) ("Patch" . ?p) ("Bug" . ?b)))

Then M-x org-agenda RET m +Handsoff will list all headlines with a Read , View or Listen tag.

Adjusting timestamps in CLOCK: lines

  • S-up/down on a timestamp in a CLOCK: line will adjust the timestamp.
  • C-S-up/down on a timestamp in a CLOCK: line will adjust both timestamp, the time you clocked in and the time you clocked out: the clock duration will not change.
  • M-S-up/down on a timestamp in a CLOCK: line will also adjust previous clocks timestamps, if any.

C-u C-u C-c c to jumb back to the last stored capture entry

C-u C-u C-c c will jump to the last captured note. The one you may actually want to update if you forgot something.

M-x org-num-mode RET to prefix headlines with numbers

M-x org-num-mode RET will prefix headlines with a number.

...

You can discuss these features on Hacker News .

If you want to explore more, please read Org's manual and browse Worg .


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Convergence Culture

Convergence Culture

Henry Jenkins / NYU Press / 2006-08-01 / USD 30.00

"Convergence Culture" maps a new territory: where old and new media intersect, where grassroots and corporate media collide, where the power of the media producer, and the power of the consumer intera......一起来看看 《Convergence Culture》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码