Display notes log with emacs org-mode - emacs

Here is the use case that I want to have in org-mode
I have next org-mode structure
Work.org file
* heading one
- Note taken on [2018-12-20 Fri 16:07] \\
Some note here
- Note taken on [2018-12-21 Fri 12:37] \\
Some note here
Personal.org file
* headin two
- Note taken on [2018-12-21 Fri 16:07] \\
some note here
- Note taken on [2018-12-22 Fri 12:37] \\
some note here
I want to see the log statistics for 2018-12-21 and as result have
* heading one
- Note taken on [2018-12-21 Fri 12:37] \\
Some note here
* headin two
- Note taken on [2018-12-21 Fri 16:07] \\
some note here
Any idea how I can implement it or use some existing features?
PS: Look like I can't use agenda features as the heading items doesn't have TODO

It should be possible to see your desired result via the agenda and some special commands in it:
when you press "v" while in Agenda you can see which additional commands are possible:
"[" will include the inactive timestamps
"E" will include the first few lines of your entry (the number of lines can be configred via: "org-agenda-entry-text-maxlines").
It is not exactly what you want, but quite close.

I see this question was asked quite some time ago so perhaps this is newer functionality, using org-version 9.1.14... I would have added this as a comment to #sanenr9 answer, but I do not have that wizard level yet <:-(
Note, this does not work in tag-type agenda buffers, so not what I'm looking for.
From Agenda day or week view use v and select L - "Log-all" which does then display all entries with updates and their logs within the selected date range.

Related

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.

Number of spaces in Tab - OpenEdge

In OpenEdge the tab can be configured to any number of spaces, usually is configured to 4 spaces.
To insert a tab in a text can be used: ~t.
What I want to find is how many spaces have the tab set.
For example, I am reading a file line by line, and for each line I want to see how many spaces are at the beginning.
I am using:
iNoOfBeginningSpaces = index (cLine, left-trim (cLine)) - 1.
But if the line begins with 3 tabs then it gives me 3, and not the number of the spaces: 3 * spaces from tab.
Is there a way to find the number of beginning spaces of a line, treating the tab as x numbers of spaces?
No. Spaces and tabs are not the same thing. You are getting confused by the fact that programming editors, word processors and printers convert tabs to spaces to get to tab stops. But in a data file no such conversion occurs (unless you are saving the file from an editor that does such conversions).
I will tell you how to check in your AppBuilder.
On the AppBuilder Menu you go to OPTIONS and then EDITING OPTIONS and there you can set how much "spaces" the editor uses for Tabs and Syntax indents. But this is basically for DISPLAY purposes within APPBUILDER.
Tom has given you the correct technical answer, a tab is a type of control character that can be interpreted differently by different apps. It has a different value than spaces.Below you can see the value of space and Horizontal Tab.
Char Oct Dec Hex Control-Key Control Action
HT 11 9 9 ^I Horizontal tab, move to next tab stop
=============================================
Char Octal Dec Hex Description
SP 40 32 20 Space

In emacs org-agenda clock report, the headline display as ... if it is a long hyperlinks?

In org-agenda, we can use clock report (org-agenda-clockreport-mode) for time spent. Now I encounter such issue:
1) A task header line with long hyperlink format, for example:
* TODO [[outlook:00000000D94CA2AC786588429B27FF9F5ADE02C207003CACBF968BF6D844ACDE08872A34BAA7000000236CFA0000641BF72F869D49499551670BAC68BD2600001BC8C6620000][Just a test email from outlook]]
2) Set the parameter-plist as this, note that I need the ':link t' parameter.
(setq org-agenda-clockreport-parameter-plist
(quote (:link t :maxlevel 5 :fileskip0 t :compact t :narrow 80)))
3) Generate the clock report in org-agenda (day/weekly), but the Headline only display '...' because it is too long.
How can it remove the [outlook:....] part in the org-agenda-clock-report mode?
The easiest solution would be to change your capture template or method of adding tasks to avoid links in headlines. Links in headlines can cause odd behaviour in the Agenda as well as in exports potentially.
If you change the example to:
* TODO Just a test email from Outlook
[[outlook:00000000D94CA2AC786588429B27FF9F5ADE02C207003CACBF968BF6D844ACDE08872A34BAA7000000236CFA0000641BF72F869D49499551670BAC68BD2600001BC8C6620000][Just a test email from outlook]]

Dired: don't show file permissions

At my new job I'm using Emacs 24 on Windows, and its chief use for me in these particular circumstances is as a file manager.
I'd like to jettison everything from the Dired display except filename, size, and date. This question showed me how to use ls-lisp-verbosity to remove most of the detail that I don't want.
But I haven't found a way to keep from displaying the permissions. I've checked the documentation for ls and for dir, and there doesn't seem to be a flag for "don't show permissions". And so far I haven't found anything in Dired that will omit the permissions. Can this be done?
Your best option is to change the ls switches so that Dired does not list those fields. See M-x man ls for your particular platform, to see what ls switches are available to you.
dired-details.el (and dired-details+.el) are no longer needed if you have Emacs 24.4 (or a pre-release development snapshot). Just use ( to toggle between showing and hiding details.
And in that case you at least have two options to control whether symbolic-link targets or all lines except header and file lines are considered details to hide: dired-hide-details-hide-symlink-targets and
dired-hide-details-hide-information-lines.
If changing ls switches does not help in your case, then you would need to tweak function dired-details-make-current-line-overlay from dired-details.el. The details to be hidden are determined by the first cond clause, which is this (wrapped in ignore-errors):
(dired-move-to-filename t)
That moves point to the beginning of the file name. The next line is this:
(make-overlay (+ 2 bol) (point))
That creates the invisibility overlay from the beginning of the line (bol here) up to the beginning of the file name (point).
If you want something different then you need to get the limits that you want for the overlay. For example, if you want invisibility to start at the file size, then you would search forward with a regexp that finds the beginning of the file size.
You can come up with such a regexp by working from the regexp for dired-move-to-filename-regexp (in library dired.el). It is a very complex regexp that matches everything up to the file name. But you can use it to find the date+time portion, which is either the 7th matching regexp subgroup or the 2nd, depending on whether the date+time is expressed using a locale (western or eastern) or using ISO representation.
You can see how this is handled in the code defining variable diredp-font-lock-keywords-1 of library dired+.el.
But again, the best approach, if it does what you want, is to try to use ls switches to control which fields are listed in the first place. You can easily experiment with switches by using a prefix argument with C-x d - you are prompted for the switches to use.

How can I use other heading styles like twiki ---+ or mediawiki == h2 == in org-mode?

I really want to use org-mode.
But, I want to use org-mode to understand structured documents that have already been written using different heading syntax,
e.g. using twiki's ---+
---+ H1
Top level
---++ H2
Nested
---+ H1 #2
Second top level
Or mediawiki like
= H1 =
Top level
== H2 ==
Nested
= H1 #2 =
Second top level
I'd like to have all of the goodness of org-mode folding, etc., just using these different heading styles.
Actually, worse that that:
I would like, say, the twiki or mediawaiki headings to take priority over org mode asterisk headings. But I would like to have both in use.
= H1 =
Top level
* this is a list
** nested
* list
** nested
== H2 ==
Nested
= H1 #2 =
Second top level
--+ What I have tried so far
I have been able to use outline mode to handle twiki,
for example via
---+ Emacs stuff
# try (defvar twiki-outline-regexp "---+\\++ \\|\\(\\(?: \\)+\\)[0-9*] ")
Local Variables: ***
outline-regexp: "^---\\++" ***
org-outline-regexp: "^---\\++" ***
End: ***
However, org-outline-regexp doesn't do hwat I would hope.
emacs' outline-mode's out-level function looks almost exactly like what I want.
(defvar outline-level 'outline-level
"*Function of no args to compute a header's nesting level in an outline.
It can assume point is at the beginning of a header line and that the match
data reflects the `outline-regexp'.")
i.e. instead of regexps, a generic function.
But I have not managed to make it work with org-mode. It looks like org-mode does not really use this, or, rather, has other stuff.
;; In Org buffers, the value of `outline-regexp' is that of
;; `org-outline-regexp'. The only function still directly relying on
;; `outline-regexp' is `org-overview' so that `org-cycle' can do its
;; job when `orgstruct-mode' is active.
(defvar org-outline-regexp "\\*+ "
"Regexp to match Org headlines.")
(defconst org-outline-regexp-bol "^\\*+ "
"Regexp to match Org headlines.
This is similar to `org-outline-regexp' but additionally makes
sure that we are at the beginning of the line.")
(defconst org-heading-regexp "^\\(\\*+\\)\\(?: +\\(.*?\\)\\)?[ \t]*$"
"Matches an headline, putting stars and text into groups.
Stars are put in group 1 and the trimmed body in group 2.")
Failing this, well, the main thing that I want from org-mode is links, Asking another question here
How can I "linkify" a non-org-mode buffer in emacs
My frustration was simply that org-mode has different rules for what constitutes a new outline section than outline-mode does. It requires a space after the asterisks, so it doesn't work on my extensive collection of notes, which forgo those spaces.
I resolved that by removing the trailing space in the not-well-documented org-outline-regexp variable, which is used to initialize the buffer-local variable outline-regexp, and that seems to be working for me. E.g. (set-variable 'org-outline-regexp "\\*+")
As to your actual question, my guess is that other regexp's and code would have to change to handle radically different stuff like twiki or mediawiki headings.