OrgMode show schedules in calendar for date selection - emacs

I have the following problem/question: I am using OrgMode in emacs to schedule all my appointments. I usually do this in the following way:
* Some Headline
** Appointment 1
<2016-10-27 09:00--10:00>
** Appointment 2
<2016-10-28 10:00--12:00>
.... and so on
This works great so far and I see all my appointments in the agenda popping up as they are supposed to. I also use calfw (https://github.com/kiwanami/emacs-calfw) which produces a pretty nice overview.
However now my question: When I use the orgmode shortcut for inserting a timestamp at an entry in the org-file, the emacs-calendar pops up, where I can navigate through the calendar and set the date. However, I cannot see the scheduled entries for the dates during navigation. Is there some easy way to setup the calendar to show the appointments from the OrgMode-file (and also the emacs diary) in this calendar? In the ideal case, another buffer should open and provide a brief overview of the appointments for the day under the cursor.
Thank you very much for your help!

Related

org-agenda-span to display the 3 days of yesterday, today and tomorrow

I am reading The Org Manual: Weekly/daily agenda
and customized the variable org-agenda-span as 3
The agenda then displayed the three days of today and the next two days.
I think it better to display the 3 days as "yesterday, today and tomorrow`.
Is it possible to achieve it?
I achieved the same by setting the variable org-agenda-start-day to -1 in one of my custom agenda commands.
Hope this helps.

How to sort/search by property value in emacs orgmode and/or agenda view?

I have org-mode TODO items and I am using property to enter the entry-date via org-capture-templates. This is date of entry and not scheduled date. I have...
:PROPERTIES:
:Entered: [2015-08-12 Wed 17:07]
:END:
Now I need to search all the item that were entered on or after certain dates.
I can also use the sorting by entry timestamp.
Thanks.
I suggest using org-sparse-tree (C-c /). It won't work with timestamps in a property, but you can put timestamps in the headline or on the line below and org-sparse-tree will find it.
You can try swiper - it's a command that works similarly to isearch. It will automatically reveal any hidden outlines that match. The input 15 8 12 will actually match 2015-08-12 since single spaces act as wild cards.
Example screenshot:
(source: oremacs.com)
Use C-c a m
then enter:
Entered>="<2016-06-01>"
This will search items with property "Entered" with date values exactly equals or after [2016-06-01]. It will not sort the items by newest or oldest.
For sorting by property... Use M-x org-sort-entries [RET] r. Change r to R for reversing order. For more on org-sort-entries, use C-h f org-sort-entries.

Matlab GUIDE Display Current Date in Edit Text box

I am making my very first GUI using GUIDE and I am running into a problem with one of my Edit Text boxes. The Edit Text box will require the user to enter a date using the mm/dd/yyyy format. I expect that the user will be entering the current date 99% of the time, so I would like to have the current date (in mm/dd/yyyy format) already entered in the text box for the user.
I was able to achieve something like this in Matlab's Command Window using
datestr(date, 'mm/dd/yyyy')
However, I am unsure where/how to implement this code into my GUI to get it to display the date. Any help would be greatly appreciated. Thanks!
If edit1 is the tag to the editbox, add this to OpeningFcn for the GUI -
set(handles.edit1,'String',cellstr(datestr(date, 'mm/dd/yyyy')));
Thus, today's date would show up in the editbox, once the GUI loads up.
If I understood your question right, you need to use the "String" property of your edit box with the output from datestr(date, 'mm/dd/yyyy').
For instance:
set(handles.EditBox,'String',datestr(date, 'mm/dd/yyyy'));
and that should do it. You can put this line in the Create Function of the edit box, so that when the user will open the GUI the text will already be there.
Hope that's what you meant!

Org-mode: how to convert date format?

I'm using Emacs org-mode's agenda feature.
When I put a timestamp on an item in my gtd.org file, with C-c . , it will show up in my agenda for the week. The date is in this format: <2011-12-25 Sun>
If I use M-x holidays to get a list of holidays, the dates are in this format:
Sunday, December 25, 2011: Christmas
How can I add holidays to my gtd.org file, in a format that shows up in the agenda?
I've looked through the Emacs manual and the org-mode manual, for either a way to change the date formats in 'holidays', or a way to convert a date into org-mode's format.
You can add them to the calendar by adding the following SEXP to your org file:
%%(org-calendar-holidays)
See: Calendar/Diary Integration
The specifc entry in your org file could be as follows (This works just like this):
* Holidays
:PROPERTIES:
:CATEGORY: Holiday
:END:
%%(org-calendar-holidays)
If you want a different category or different name for the headline, you can do so. But as a generic entry it will provide the information you want. (It matches what my org-file has)

How to display the full context of the entries in org-mode agenda tree view

In org-mode's daily/weekly agenda view, is there a way to display the full context of the entries?
My reading of the code is that it finds the first heading above the timestamp and displays that. However, in my case, that heading is often 3-4 levels deep and doesn't make sense without the bullets above it. It also doesn't seem like there are hooks to easily change that. Filtering is trivial, but not changing the fundamental presentation format.
There is no way to display all the context directly in the agenda view, but you can right click on the headline in agenda view and it will show you that headline in the main window in a sparse tree context.
You may have to collapse everything in the main window in order for the right-click-locating to show the sparse-tree view.
That seems pretty close to what you're looking for. To check, do this:
Create desired agenda view.
In main document window collapse everything to just first level headlines.
Right-click on the desired headline in the agenda view. It should show the headline in sparse tree context in the main document window.
There are several things you can do to get better information about context in agenda views, short of using the right-click function described above.
First, you can arrange your headlines themselves so that they give you more context information. It would be possible, e.g., to have numerous 4th level headlines labeled 'Tasks', each which includes tasks related to the headings above in each tree. That's not going to give good context info in agenda view, though, since each line's headline text would be the same (i.e., 'Task') and have no info in context. A simple solution would simply be to make the headlines more specific, e.g., 'Project xxxx Tasks' and 'Project yyy Tasks'.
A different way of getting more context in agenda view would be by using 'categories'. The first column in agenda view is the filename containing the headline by default, but if the headline has a category the category will be shown. To assign a category to a headline and all of its subtree you can add a category property to the main headline, like this:
:PROPERTIES:
:CATEGORY:Project xxx Stuff
:END:
Now agenda view will show 'Project xxx Stuff' in the first column for each of the agenda lines that are gathered from that headlines subtree.
Maybe an agenda is not really what you need. I would use this:
`M-x org-sparse-tree RET D'
then select the date range and navigate through the results.
HTH
Follow-mode (S-f) gets pretty close to what the OP is looking for. Credit to #armando.sano in a comment on another answer.