Numbered Headings in Org-Mode, Emacs - emacs

I was wondering if you can get automatic numbering for headings in org-mode,something similar than the one used for simple lists. For example I can have this list:
one
two
three
And I can reorder it to
1. two
2. three
3. one
The list items change but the list numbers stay the same. How can I do something similar with headings so that I can reorder the headings in a similar way.
1 One
2 Two
3 Three
To
1 Two
2 three
3 One

Orgmode now has a built-in minor mode for this, contributed by Nicolas Goaziou.
Simply do M-x org-num-mode to activate the display of dynamic headline numbering.

If you are looking for a way to show this in Org itself, then I'm afraid this is not possible. However you can do this easily in the exported document. Look at the exporting chapter in the manual.
You can provide an option like this: #+options: num:2. Then all headlines at the 2nd level or above will be exported with a number. You could then adjust the headlines as you wish in Org, without affecting the numbers in the exported document.

Related

When exporting orgmode doc to freemind how to specify unlimited number of levels?

I use M-x then org-freemind-export-to-freemind in order to export an org-mode doc to freemind. However, when I open it I see that it's exporting up to 3 levels and levels 4 and on becoming notes. Is it possible to specify to export all levels as nodes? (except for actual unleveled standard text notes).

How to display all TODO items from a single file

I am still new to org-mode and emacs, so please forgive me for asking such a simple question.
I organise my org-mode files one per area of interest: so I have one for work, one for personal projects, etc. These files contain both notes and TODO entries, so it's really hard to see all the TODO items in the given file...
So here is my question:
Is there an easy way to easy filter all the todo items in agenda view by file they are in?
The only way I can think of right now is by using a special tag per file, but this will require me to update all files and all entries it's quite a lot of work I would prefer to avoid.
Thanks!
See the Basic TODO functionality section in the manual: C-c / t constructs a "sparse tree" of all TODO items in a single file; C-c a t constructs a global TODO list out of all files that have been added to the agenda.
You can also use a per-file tag in a "FILETAGS" header for the file, so although you'd need to edit each file it's only one line per file. I use three, "#work" "#home" "#personal". Can then filter on tags in agenda views.
#+FILETAGS: #work

emacs package for working with tagged regions?

I'd like to be able to apply tags to regions of code and text and to be able to use these to narrow visibility to navigate - ideally across multiple files. So for example if I was researching C16th European history I could tag insert and and zoom around around cromwellish stuff quickly, limit my searches to cromwellish regions, etc. It's important that tags pairs shouldn't have to be "well-formed" because I might want to start an region inside of a but end first. And, obviously, I'd to be able to list all my tags, and to search or narrow on combinations of them.
I can't find anything like this. Org-mode comes closest, but its tags are headline based, which makes stopping one tag while continuing other painful - plus I need headlines as headlines, and I'd like to be able to tag code this way too.
Is there anything like this? Or any toolkit that would be a good start to write this?
Library Bookmark+ provides what you are asking for, I think. It enhances standard Emacs bookmarking in several ways, including some that respond to your request.
You can bookmark locations of all sorts, and the recorded bookmark information can include the region limits/context. (If the region is active when you set the bookmark then the region info is recorded.)
When you jump to the bookmark, the region is re-activated (if the region was recorded).
If the content of the destination file (or whatever) has been modified since the bookmark was last updated, so that the text around the recorded region has changed, the bookmark and region are automatically relocated (assuming that the new destination and limits are recognizable and thus locatable).
Bookmark+ also lets you tag any bookmark (or file), in multiple ways. Tags are arbitrary, free-form strings (but you can also optionally associate arbitrary Lisp values with them.)
And you can list all tags, search and narrow on tag combinations (unions, intersections, etc.). Tags are one of the most important Bookmark+ features.
Library Icicles provides additional enhancements regarding the use of Bookmark+ bookmarks and tags.

Org-Mode Tags inside text instead of Headline

I have a half-made latex presentation in a org-mode file. I want to insert tags in paragraphs which are incomplete. Something along these lines,
* Related Work
Prior work was done by ... :incomplete:
Is this possible?
The solution might be in transforming your plain lists or lines to headlines
* Prior work was done by ... :incomplete:
and use following line into the .org file header
#+OPTIONS: H:2 num:2
that describes to which level headlines are enumerated and included into table of contents.

How can one hide some text from being published by the org-publish-* functions?

I would like to put some text into an org file that will not be published when I export the content to one of the target types (HTML in this case). Is there a way I can accomplish this goal?
You likely want to use the :noexport: tag as described in the manual under Selective Export.
The only real limitation here is that you have to have the (sub)heading as the last one at that level.
Alternately you could use inline tasks ( (require 'org-inlinetask) ) and then mark the task and the end-of-task with :noexport: (I tested and with only one it might not properly omit the end of the task).
COMMENT lines dont get exported. They also display purple in the emacs with default config.