Org mode time sheet - emacs

I'd like to get a custom "timesheet" report.
Curently, I do have the following:
(add-to-list 'org-agenda-custom-commands
'("r" "Weekly Timesheet"
((agenda ""))
((org-agenda-overriding-header "Weekly timesheet")
(org-agenda-span 'week)
(org-agenda-start-on-weekday 1)
(org-agenda-start-with-clockreport-mode t)
(org-agenda-time-grid nil))) t)
It works as expected, except that I'm not interested in seeing the agenda views for the 7 days: I just want the clockreport, nothing more.
How can I achieve that?

Check out the clocktable block. I use this to see a weekly recap of where I spent my time. You can setup a simple one like the following:
#+BEGIN: clocktable :scope agenda-with-archives :block lastweek
#+END:
Put your cursor on the BEGIN or END and hit the trusty C-cC-c to evaluate the clock table in-place. It will list the file, headline and time spent on the tasks.
In my example above, the scope defines where to look for the clocked items. In this case, I chose the agenda files and associated archives. For the block of time, I used lastweek to get the last 7 days.
There are many more options for configuring just what you need. Read more at
http://orgmode.org/manual/The-clock-table.html

I am not sure if this helps, but you may want to check out Tom Marble's timesheet.el. You should be able to install it from MELPA. Although it does not integrate with org agenda, this seems like the most thorough way to generate timesheet reports.
http://emacslife.com/emacs-chats/chat-tom-marble.html
https://github.com/tmarble/timesheet.el
The sample org file: https://raw.githubusercontent.com/tmarble/timesheet.el/master/share/yoyodyne.org

Related

How can I treat certain patterns as web-site links, that can be followed with org-open-at-point?

At work I frequently deal with support issues that my company keeps track of in a web-based bug tracker.
Each issue has an URL that looks like https://mycompany.com/support/SUPPORT-12345, but of course I don't want to spell this out every time I mention a support issue in my Org-mode file. I would like set up Org-mode in such a way that the pattern SUPPORT-(\d+) is treated as a hyperlink to https://mycompany.com/support/SUPPORT-\1.
I would like to be able to place my cursor over the SUPPORT-2345, type C-c C-o, and have Emacs point my browser to https://mycompany.com/support/SUPPORT-2345. Ideally, SUPPORT-2345 would behave no different than a hyperlink.
Can Org-mode be configured in this way? If not, what is the best alternative?
You should be able to do this with org-link-abbrev-alist. For example, see the below for some I use. You can then put [[Support:1234]] in your Org-mode file and have it treated as the expanded link.
(setq org-link-abbrev-alist
'(
("DOI" . "http://dx.doi.org/")
("FreshDesk" . "https://xyz.freshdesk.com/support/tickets/")
("JIRA" . "https://jira.apps.monash.edu/browse/")
("Support" . "https://support.xyz.com/helpdesk/tickets/")
("ISBN" . "http://isbn.nu/")))
I don't know whether Org-mode have this feature, but there is a bug-reference-mode for it.
Here is sample org file:
;; Local Variables:
;; eval: (bug-reference-mode)
;; bug-reference-bug-regexp: "\\(\\(?:\\(?:SUPPORT\\|support\\)-\\)\\([0-9]+\\)\\)"
;; bug-reference-url-format: "https://mycompany.com/support/SUPPORT-%s"
;; End:
* SUPPORT-123
* support-1234
And you can move point on support-* and press C-c RET (bug-reference-push-button) to open it.
For more detail about Bug Reference, please refer to C-h r g Bug Reference

org-mode - no refile targets

I am trying to use the refile function but don't understand why I get the error
no refile targets after hitting the Cc Cw key.
Here is the content of org-refile-targets variable :
Its value is (("~/gtd/gtd.org" :maxlevel . 3) ("~/gtd/someday.org" :level . 1) ("~/gtd/tickler.org" :maxlevel . 2))
Original value was nil and defined through this function in .emacs
(setq org-refile-targets '(("~/gtd/gtd.org" :maxlevel . 3)
("~/gtd/someday.org" :level . 1)
("~/gtd/tickler.org" :maxlevel . 2)))
All those files exist in the gtd folder. I can capture elements that I are stored into the ~/gtd/inbox.org file.
I am relatively new to the emacs/org-mode world, the error might be quite stupid.
It seems like you're following along with Nicolas Petton's Orgmode for GTD article; I ran into the same issue this morning.
org-refile searches for headings within the files in org-refile-targets, up to the level specified. So in your example, org-refile will find headings up to level 3 in ~/gtd/gtd.org, level 2 in ~/gtd/tickler.org, and only level 1 in ~/gtd/someday.org. These will then be offered as targets for your refile operation.
To fix this error, simply create some headings in one or more of those files.
I had a similar problem which I managed to solve after reading this, so I thought I'd add that solution as well in case it helps others.
I'm currently, through no fault of my own, using Windows. Therefore, I had my paths in my org-refile-targets set up like this:
"C:\Path\to\orgfile.org"
I wasn't thinking properly - those backslashes are interpreted. So the solution was to switch from backslashes to slashes (which works in Emacs even in Windows):
"C:/Path/to/orgfile.org"
I'm guessing that double backslashes would also have worked.

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 view the taken "Notes" in a new buffer in Emacs Org Mode?

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)

Custom Agenda View in Org Mode: Combining Dates and Tags

I would like to create a custom agenda in org mode that will show me all the TODO items with a particular tag that are either overdue or due today.
However, I can't find any search function that will allow me to combine the two. Am I missing something, or am I trying to use the tool incorrectly?
You can use org-agenda-filter-apply. In addition, I found it useful to hide tags in the agenda for current day or week. As the result you have something like that.
(setq org-agenda-custom-commands
`(("o" "tasks with tag1"
((org-agenda-list)
(org-agenda-filter-apply ,(list "+tag1")))
((org-agenda-remove-tags t)))
("d" "tasks with tag2"
((org-agenda-list)
(org-agenda-filter-apply ,(list "+tag2")))
((org-agenda-remove-tags t)))
))
You show tasks with tag1 using Ctrl-a-o and tasks with tag2 using Ctrl-a-d
The org-agenda-list is meant to do this. You can invoke it with C-c a a. It displays the agenda for the week, which includes all tasks that are due in the week or are overdue. You can narrow it down to see all tasks scheduled today, due today and all tasks overdue by pressing d Further, if you only wish to see tasks with a particular tag, you can do so by pressing / and choosing the tag you want to see.
This way you'll get what you want.