How to view the taken "Notes" in a new buffer in Emacs Org Mode? - emacs

I use Emacs Org mode to deal with my daily staffs. Now I use Emacs to manage some research papers. When reading the papers, I would like to take some notes as the following using the shortcut key C-c C-z or only z in the Agenda View.
When taking a new note it looks like this:
However, after completing the note taking with C-c C-c, the note is stored in the LOGBOOK under where it was taken:
The first problem is that the note itself is not highlight. The second problem is that, if I would like to revise this note, I do not know how to display it as when it was taken(just as in the first picture above, in a new buffer with highlight). It seems that I could only revise this note under the "Note taken on ..." line with no highlight plain text.
However, I am not pleased with this editing method since it should be as the same as the first picture, i.e., when the note was first created.
Thanks for your attention and help.

In addition to using subtasks (as discussed in the comments underneath the initial question in this thread), here is an alternative approach that places the notes at the tail end of a task without any blank lines between sentences. The stock org-mode has the ability to handle this -- i.e., no modifications are required (other than keywords and priority settings)
** Active [#A] 0 # Ender's Game (Orson Scott Card). :lawlist:
DEADLINE: <2014-02-22 Sat 08:00> SCHEDULED: <2014-02-22 Sat>
:PROPERTIES:
:ToodledoID: 353081871
:ToodledoFolder: TASKS
:Hash: 680920196368d9f25c95c09063243a7f
:END:
• This novel was of particular interest because . . .
• Orson Scott Card has written other books . . .
• Compare and contrast Ender's brother and sister.
(source: lawlist.com)
(source: lawlist.com)

Related

org mode repeated task up to a certain date/after x number of occurrences

I am new to org-mode, and I am currently learning how to use the habit/TODO features. I would like to add a repeated task that will stop after a certain number of occurrences, or up to a certain date.
If I look here, it seems I can use :PROPERTIES: as in
** TODO Shave
SCHEDULED: <2009-10-17 Sat .+2d/4d>
:PROPERTIES:
:STYLE: habit
:LAST_REPEAT: [2009-10-19 Mon 00:36]
:END:
However, C-c C-x p does not give me LAST_REPEAT option, and I was wondering what I can do.
The "LAST_REPEAT" property records when the habit was last done, it isn't "repeat up to this date". AFAICT there isn't a way of specifying to repeat something N times or up until a specific date.
When you press TAB at the Property: prompt, you get a list of possible completions, but you are not limited to them. You can always type LAST_REPEAT at the Property: prompt (and it will add it to the completion list as well).

org-mode habit consistency graph not displaying

org-version 8.3.4 (elpa package, 20160530)
emacs 24.4.1 (Debian package, Installed: 24.4+1-4.1~bpo70+1)
When I started using org-mode from elpa, the habit consistency graph stopped showing. I was using a version of org-mode that comes with debian before, with emacs 23 and the graph showed.
I'm a beginner in emacs lisp, but anyway I tried stepping through the org-agenda-list function and found the org-agenda-finalize function where the org habit graph is supposed to be inserted via the org-habit-insert-consistency-graphs function. But it skips over that function, probably because this expression returns false:
(next-single-property-change (point-min) 'org-habit-p))
At this point, I don't know what to do to make habits show. This is the first time I've looked at org-mode code, I don't know what the above test is for.
Help, please?
UPDATE: 2016-06-25. I upgraded the org-mode package to elpa, 20160620 (still org-version 8.3.4). Still have the same behaviour. I am getting the package from elpa.gnu.org.
UPDATE 2: 2016-07-02: I did try pressing K (for org-habit-toggle-habits). It didn't change the contents of the buffer visibly. I also tried refreshing the buffer after typing K. And repeating the experiment, in case the K put emacs in the wrong mode the first time.
UPDATE 3: 2016-07-08: on the emacs-orgmode mailing list, I got advice to ensure that the structure of the entries with habits is:
headline
SCHEDULED
PROPERTIES
everything else
by using this function org-repair-property-drawers from this site:
http://orgmode.org/Changes.html
but that broke my weekly agenda display and also, once I fixed the entries, didn't make the habits work. Probably my entries were in worse shape than the function anticipated. But this method worked for Josiah who sent the advice. Including it here in case it helps someone else.
UPDATE 4: 2016-07-09: thanks Phil for the suggestion to make a minimal example of the problem. With the following .org file and no other, I see the problem:
** TODO daily customer meeting :SUPPORT:CUSTOMER:
:SCHEDULED: <2016-07-06 Wed 10:30 .+1d>
:PROPERTIES:
:LAST_REPEAT: [2016-07-05 Tue 12:00]
:STYLE: habit
:END:
:LOGBOOK:
- State "DONE" from "TODO" [2016-07-05 Tue 12:00]
- State "DONE" from "TODO" [2016-06-30 Thu 16:34]
- State "DONE" from "TODO" [2016-06-29 Wed 20:02]
- State "DONE" from "TODO" [2016-06-28 Tue 10:53]
- State "DONE" from "TODO" [2016-06-27 Mon 10:50]
- State "DONE" from "TODO" [2016-06-23 Thu 12:11]
- State "CANCELLED" from "TODO" [2016-06-21 Tue 13:43] \\
No meeting today, cancelled by Mmmm.
:END:
I'm using the minimal.emacs suggested in the link, namely:
(add-to-list 'load-path (expand-file-name "/home/bjb/.emacs.d/elpa/org-20160620"))
(add-to-list 'auto-mode-alist '("\\.\\(org\\ |org_archive\\|txt\\)$" . org-mode))
(setq org-agenda-files '("/home/bjb/.emacs.d/test/test.org"))
(require 'org-install)
(require 'org-habit)
;(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
;(global-set-key "\C-cb" 'org-iswitchb)
And showing the agenda with C-c a a.
I had added the leading colon to the SCHEDULED line... when I remove it, the graph shows up. However, I had added it (a while ago) because I was trying to solve other problems, which I don't remember what they were.
I will play with this, and see if I can get all my org files to load fully with habit-consistency-graphs. Thanks ... will report back with results.
Must note that when I looked at this particular item (which is a short version of an actual habit in my org-files) there were two PROPERTY drawers, one before LOGBOOK with just the LAST-REPEAT property, and one after LOGBOOK with the habit property. I merged the two property drawers to show you the failure, as I believe the PROPERTY drawer is supposed to be in one piece before the LOGBOOK drawer. So I have some maintenance to do on my org-files. I had tried to merge them into one piece in each habit before, but then agenda weekly view broke badly and I put it back the way it was. Will have to try harder.
UPDATE 5 2016-07-09: I had put in the leading colon before SCHEDULED: because I wanted to see when the 3-monthly items fell in the future ... I wanted to see them as scheduled items. That worked but when I upgraded org-mode the consistency graph went away. When I took off the leading colon on all the habits, the daily habits showed up, and I have confidence that the three-monthly items will show up when they fall on "today". But I won't get any notice of having to pay the interest ... it will just appear on the day it must be paid. Well that is for me to figure out.
Thanks everyone for considering and answering my question.
I had a similar problem today, and it turns out that somehow the habit module was turned off (but the recurrent tasks still stays in the agenda so I didn't make the connection). When I re-enable the module (M-x customize variable org-modules then tick on habit), the consistency graph displays as normal in the agenda's view.
This won't solve your issue but might help a bit:
http://orgmode.org/worg/org-faq.html#minimal-emacs
Maybe you have turned them off somehow? Does pressing 'K' in the agenda help?
I've had the same problem after upgrading org-mode from version 8.2.10 to 9.1.9 (because of this bug).
Here is what an entry was looked like (org-version = 8.2.10) :
** TODO Sleep in time
SCHEDULED: <2019-09-07 sam. 23:00 +1d>
- State "DONE" from "TODO" [2019-09-07 sam. 02:54]
- State "DONE" from "TODO" [2019-09-06 ven. 02:09]
- State "DONE" from "TODO" [2019-09-05 jeu. 00:29]
:PROPERTIES:
:STYLE: habit
:LAST_REPEAT: [2019-09-07 sam. 02:54]
:END:
... and what i've done so that the graph show up again (org-version = 9.1.9) :
** TODO Sleep in time
SCHEDULED: <2019-09-07 sam. 23:00 +1d>
:PROPERTIES:
:STYLE: habit
:LAST_REPEAT: [2019-09-07 sam. 02:54]
:END:
- State "DONE" from "TODO" [2019-09-07 sam. 02:54]
- State "DONE" from "TODO" [2019-09-06 ven. 02:09]
- State "DONE" from "TODO" [2019-09-05 jeu. 00:29]
As it's showed, I've swapped up the PROPERTIES drawer and the "log" list.
EDIT:
I just realised that this solution is exactly the same as #schmuu suggested (I don't use LOGBOOK drawer). I got the same conclusion by creating a repeating entry and marked it as done in the agenda view. The "log" item list had appeared after the PROPERTIES drawer.

emacs org-mode: completing a multi-line task

I am new to org-mode (using it under evil) and been using it as a very nice ASCII-based TODO with scheduled times and completion dates. I have a simple question - and in my case, I think an image is worth 1000 words...
Look at the image below, in the line that starts with "Merge button: ...." - i.e the one that I've split to two lines - with the continuation line starting with "click after..."
After hitting TAB to open the action tree node, the continuation line is colored in grey - as if it's not a part of the task in question:
This is further verified if I mark the task as DONE (shift-rightCursor): The DONE marker is placed below my task line, not below my continuation line - as if the continuation line is on its own:
I am probably missing something obvious - any help will be most appreciated.
In a word, it's the Design.
You could think like this:
The headline (first line) is the title of a task, the rest are contents/description or sub tasks.
The text at issue in the question of the original poster is what I generally refer to as the notes section of a task. By design, org-mode does not assign a particular highlighting of the notes section -- i.e., the default font for text will be used.
However, all is not lost. It is possible to change the default font for a particular buffer using the face-remapping-alist and setting it as a local variable. The following example uses a cyan foreground color, but it can be just about anything: http://www.gnu.org/software/emacs/manual/html_node/elisp/Face-Attributes.html I'm not certain when setq-local was introduced, but it is available in a current version of Emacs Trunk and may be available in earlier versions of Emacs.
(defun my-org-notes-face-function ()
(interactive)
(setq-local face-remapping-alist '(
(default (:foreground "cyan")))))
(add-hook 'org-mode-hook 'my-org-notes-face-function)

How to escape complicated headlines in org-mode links

I have a bunch of journaled pages that look like this:
** <2013-12-03 火 20:53> [[http://www.geek.com/science/nasa-funds-fuelless-laser-thruster-could-be-readying-for-test-launch-1573468/][NASA funds fuelless laser thruster, could be readying for test launch | Science! | Geek.com]] :euler:technical:space:
:PROPERTIES:
:ID: c064d0ae
:END:
The biggest problem for PLT is its limited range...
I would like to link to these from other org-mode documents, such as TODO lists. Normally what I do is click on the link, select Org->Hyperlinks->Store link to here(GLOBAL), and then use tab completion with C-l.
The resulting link, though, doesn't work and has different formatting:
[[file:~/orgs/webjournals.org::*%20%5B%5Bhttp:/www.geek.com/science/nasa-funds-fuelless-laser-thruster-could-be-readying-for-test-launch-1573468/%5D%5BNASA%20funds%20fuelless%20laser%20thruster,%20could%20be%20readying%20for%20test%20launch%20|%20Science!%20|%20Geek.com%5D%5D][<2013-12-03 火 20:53> {{http://www.geek.com/science/nasa-funds-fuelless-laser-thruster-could-be-readying-for-test-launch-1573468/}{NASA funds fuelless laser thruster, could be readying for test launch | Science! | Geek.com}}]]
How can I straighten this out? I tried setting simplified text search links like [[file:~/orgs/webjournals.org::*http:/www.geek.com/]], but didn't find any success.
You can cut the bad string with C-w and yank it back with
the following command:
(defun yank-and-unhex ()
(interactive)
(insert (url-unhex-string (current-kill 0))))

Can we make an Emacs buffer to be static/pinned?

I use an Org file to keep track of my activities, because it's often that I am loosing track of what actually I am aiming to do :)
Now, I would like to reserved a top buffer window with only 5 lines tall and show the narrowed todo from that org file. All other window/buffer activites will not touch that static/pinned buffer.
Is there a way to achieve that result???
Thanks!
EDITED : Can we make that certain buffer to have different background Color? I pressume it's not, because all we have is set-background-color... I hope I am wrong..
Maybe setting the variable special-display-buffer-names will set you in the right direction.
(setq special-display-buffer-names
'(("magic buffer" (width . 70)
(height . 7)
(background-color . "green"))
))
to test certainly made a buffer called "magic buffer" turn up in a small and very very green frame. (For real-life use, of course do go through the customize mechanism by all means.)
ETA: And then, there's also this question which might apply here.
If you clock in to the Org TODO item, that task will be displayed in the modeline of the current buffer; you might also find that helpful as a reminder of what you're working on.
The original part of the question is a duplicate. See How do I make this Emacs frame keep its buffer and not get resized? (which is slightly enhanced over the earlier Pin Emacs buffers to windows (for cscope)), and the set-window-dedicated-p function.
YOu can use org-todo-list to show TODO items and org-agenda will show you useful choices such as "M" that filters your TODO items by keyword.
I struggled with the same problem for a while. The best solution I came up with was creating a small Emacs frame (size: 80x13) for my Org-mode agenda and placing it in an always-visible portion of my screen. (Use "C-x 5 2" to create a new frame.)