Re: [O] How to generate clock report for hours worked each day?
Thanks! This workflow works. I can't help but wonder, does my use case show that in org-mode philosophy, tasks are best filed under a plain entry, not within a datetree? On Sun, Sep 24, 2017 at 7:35 AM Matt Lundin wrote: > ConcreteVitamin writes: > > > Thanks, it does show the hours clocked on the current day. Is there > > something on top of this mode that allows me to specify the specific > > day? (Better, I just want to quickly show the to see the > > trend of my productivity :)). > > Yes, you can just move back and forward in the agenda with "b" and "f." > Or you can pick a day on the calendar with "j". And you can view your > aggregated time for the week with "vw". > > Best, > Matt > >
[O] org-after-todo-statistics-hook vs checkboxes
Hi, Some time ago, I wanted an item's TODO state to update automatically based on the [/] statistics cookie: (defun hjh-org-summary-todo (n-done n-not-done) "Switch entry to DONE when all subentries are done, to TODO otherwise." (let (org-log-done ; turn off logging org-log-states (neverTodo (cdr (assoc "NeverTODO" (org-entry-properties) (if (not neverTodo) (org-todo (if (= n-not-done 0) "DONE" (if (= n-done 0) "TODO" "INPROG")) (add-hook 'org-after-todo-statistics-hook 'hjh-org-summary-todo) E.g., [0/2] --> TODO, [1/2] --> INPROG, [2/2] --> DONE. It works for subtrees: * Tree 2 [0/0] ** Subtree 1 ** Subtree 2 If I set TODO on Subtree 1, I get: * TODO Tree 2 [0/1] ** TODO Subtree 1 ** Subtree 2 Somehow, on my old system, I had worked it out so that this would also happen for checkboxes underneath the tree. But that isn't happening anymore. * Tree [0/2] - [ ] Checkbox 1 - [ ] Checkbox 2 If I C-c C-c on either check box, I expect the statistics cookie to update to [1/2] (this works), AND the after-statistics hook to run and update Tree's todo state to INPROG. The latter is no longer working in my system. What do I have to do to make this work for checkboxes too? (I use checkboxes a lot because I also use mobileorg for android, which adds an ID property to everything that goes into an exported agenda view, including all TODOs. So, e.g., I have a task "Review e-mailed student work" and under this task will be a large number of short-duration subtasks. The subtasks do not need org-ids. So I would really prefer to use checkboxes for these, and I don't understand why the statistics hook doesn't work here.) Org 8.3.3 from Ubuntu packages. Thanks, James
Re: [O] [PATCH] Export of irc links in ox-html
Hi Nicolas, > Would you mind providing an ORG-NEWS entry about it? I need to stop forgetting to do this :). I've attached a patch which adds an entry to the 'Miscellaneous' section. Please let me know if you think anything is wrong with it. -Jay >From e321f926217460a506d6536ad494b1f25c247c4b Mon Sep 17 00:00:00 2001 From: Jay Kamat Date: Sun, 24 Sep 2017 21:30:39 -0400 Subject: [PATCH] ORG-NEWS: Add an entry for supporting export in org-irc.el --- etc/ORG-NEWS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index d2fb264b18..7c69efa89d 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -108,6 +108,12 @@ you should expect to see something like: ** Miscellaneous *** ~org-publish-resolve-external-link~ accepts a new optional argument. +*** ~org-irc.el~ now supports exporting =irc:= links properly + +Previously, irc links were exported by ~ox-md~ and ~ox-html~ as normal +file links, which lead to them being broken in web browsers. Now both +of these exporters will properly export to =irc:= links, which will +open properly in irc clients from web browsers. * Version 9.1 -- 2.11.0
Re: [O] Inline source does not evaluate when inserted insie a minipage environment
On 09/23/2017 10:02, Eric S Fraga wrote: On Friday, 22 Sep 2017 at 15:56, Charles Millar wrote: [...] However, when I C-c C-c the same code when inside a minipage, I get the message " 'C-c C-c' can do nothing useful here" \begin{minipage}[t]{4.0in} This is some text. Some more test with an inlineĀ src_sh[:results raw]{echo 1} a bit more \end{minipage} I solve this aspect, and more generally allow the use of org formatting directives within the text by doing: #+latex: \begin{minipage}[t]{4.0in} This is some text. Some more test with an inline src_sh[:results raw]{echo 1} a bit more #+latex: \end{minipage} Thank you.
Re: [O] [PATCH] Export of irc links in ox-html
Jay Kamat writes: > I've attached a second patch which adds a new function to org-irc.el, > which seems to handle export of irc links in ox-md and ox-html > properly. I'm very new to this system, so please make sure it's correct, > and I'll be happy to follow up with corrections if it isn't! Thank you! > Because I added support for md links in org-irc.el, I also removed the > workaround I added a while back for that in ox-md.el. Good catch. > +(defun org-irc-export (link description format) > + "Export an info link. I applied your patch with info changed into IRC above. Would you mind providing an ORG-NEWS entry about it? Regards,
Re: [O] [PATCH] Export of irc links in ox-html
Hi Nicolas, > The proper fix would be to patch "org-irc.el" and add an export function > there. "irc" links are not default links in Org, so there is no reason > to hard-code them in "ox-html.el". Thanks for pointing that out! I didn't even realize up until now org had support for custom link types. I've attached a second patch which adds a new function to org-irc.el, which seems to handle export of irc links in ox-md and ox-html properly. I'm very new to this system, so please make sure it's correct, and I'll be happy to follow up with corrections if it isn't! Because I added support for md links in org-irc.el, I also removed the workaround I added a while back for that in ox-md.el. -Jay >From e6c824f363bf6959f0eb35e4b8208a14d2cbffcb Mon Sep 17 00:00:00 2001 From: Jay Kamat Date: Sun, 24 Sep 2017 12:11:52 -0400 Subject: [PATCH] org-irc.el: Add proper export functions for irc * lisp/org-irc.el (org-irc-export): Add a new function, org-irc-export, which properly exports irc links to html and markdown * lisp/ox-md.el (org-md-link): Remove workaround to get irc links working properly in ox-md, and use org-irc's export functions instead --- lisp/org-irc.el | 20 +++- lisp/ox-md.el | 2 +- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/lisp/org-irc.el b/lisp/org-irc.el index 5889f6d2fe..eee71aef52 100644 --- a/lisp/org-irc.el +++ b/lisp/org-irc.el @@ -71,7 +71,10 @@ ;; Generic functions/config (extend these for other clients) -(org-link-set-parameters "irc" :follow #'org-irc-visit :store #'org-irc-store-link) +(org-link-set-parameters "irc" + :follow #'org-irc-visit + :store #'org-irc-store-link + :export #'org-irc-export) (defun org-irc-visit (link) "Parse LINK and dispatch to the correct function based on the client found." @@ -245,6 +248,21 @@ default." ;; no server match, make new connection (erc-select :server server :port port +(defun org-irc-export (link description format) + "Export an info link. +See `org-link-parameters' for details about LINK, DESCRIPTION and FORMAT." + (let* ((desc (or description link))) +(pcase format + (`html + (format "%s" + link + desc)) + (`md + (format "[%s](irc:%s)" + desc + link)) + (_ nil + (provide 'org-irc) ;; Local variables: diff --git a/lisp/ox-md.el b/lisp/ox-md.el index 5ba52e7faf..146956eedf 100644 --- a/lisp/ox-md.el +++ b/lisp/ox-md.el @@ -449,7 +449,7 @@ a communication channel." (t (let* ((raw-path (org-element-property :path link)) (path (cond - ((member type '("http" "https" "ftp" "mailto" "irc")) + ((member type '("http" "https" "ftp" "mailto")) (concat type ":" raw-path)) ((string= type "file") (org-export-file-uri (funcall link-org-files-as-md raw-path))) -- 2.11.0
[O] org-capture template; insert a Property named Category with autocompletion; How?
Sorry, forget to tell the usual things... Org 9.1.1 Emacs 25.1 Win 8.1 64 bit. Hello, i created the following template to insert a TODO item with inserting a Property named Category. Unfortunately i do not manage it to use autocompletion. here is the template: ("t" "ToDo" entry (file "~/org/Heldennotizen.org") "* TODO %? [/] %^G :PROPERTIES: :CATEGORY: %^{CATEGORY}p :TAGS: :ORDERED: t :END:" i read about using a using the variable org-global-properties for this, but helm does not provide any autocompletion. '(org-global-properties (quote (("CATEGORY" . "Garten") ("CATEGORY" . "Haus") ("CATEGORY" . "Ich") ("CATEGORY" . "Leben" How could i configure it? Best Regards Physiculus
Re: [O] How to generate clock report for hours worked each day?
ConcreteVitamin writes: > Thanks, it does show the hours clocked on the current day. Is there > something on top of this mode that allows me to specify the specific > day? (Better, I just want to quickly show the to see the > trend of my productivity :)). Yes, you can just move back and forward in the agenda with "b" and "f." Or you can pick a day on the calendar with "j". And you can view your aggregated time for the week with "vw". Best, Matt
Re: [O] Bug: org-emphasis-alist not fully applied [9.1.1 (9.1.1-1-g80cbf9-elpa @ x:/folder/user/.emacs.d/elpa/org-20170918/)]
Hello, Jens Lange writes: > I understand the dilemma. But then I must ask for a format enhancment. > Before crying out loud please read my argumentation. Why did I create my > own "fancy" markers? Because there is no default way to recreate the > "Textmarker-Experience" - or at least I couldn't find any. All default > emphasis markers recreate what I would call the "Ballpoint-Experience". > This puzzles me because marking text on a piece of paper is one of the most > basic things. Do I have a point here or not? I disagree. Note that I'm not crying out loud, either. Textmarker-Experience is but a fancy way to emphasize some text. It typographically has the same purpose as *bold*, /italic/, _underscore_, ... You can already tweak `org-emphasis-alist' to put, e.g., neon-yellow over bold (or italic, underscole...) text if you want. Just change the face associated to the marker. The point is that Org is, by default, limited to a set of 4 markers (I'm not counting the 2 verbatim markups), for good reasons. I still think this is enough for most purposes. If you have special requirements, e.g., 6 markers, both Org and Emacs provide other ways to add them. None of them should be achieved by tweaking `org-emphasis-alist', though. Regards, -- Nicolas Goaziou
Re: [O] [PATCH] ox-publish.el: Fix regexp `match' to be non-nil
Hello, Jens Lechtenboerger writes: > recursive publishing fails with base-extension any because a nil > regexp is passed. The attached patch fixes this. Thank you! I applied a slightly different patch, with a test. Regards, -- Nicolas Goaziou
Re: [O] Bug: Recursive publish with :base-extension any fails [9.1.1 (9.1.1-1-g80cbf9-elpaplus @ /Users/xxxx/.emacs.d/elpa/org-plus-contrib-20170918/)]
Hello, Keith Sutton writes: > When org-publish-project-alist has both :base-extension any and > :recursive t set, the publish fails with "(wrong-type-argument stringp > nil)" in a call to string-match in directory-files-recursively. > > It looks like org-publish-get-base-files should set match to "" rather > than nil when :base-extension is any. In my minimal testing this works > fine for me, but I'll leave it to the experts to figure out if that > would negatively affect other things. Fixed. Thank you. Regards, -- Nicolas Goaziou
Re: [O] [PATCH] Export of irc links in ox-html
Hello, Jay Kamat writes: > IRC links in ox-html are currently broken. They are not handled, which is slightly different. > There exists a special 'irc' > content handler on the web, telling browsers to open an irc link in an > external irc client. The format for such links seems identical to org > (irc:irc.freenode.net/user). > > Previously links such as: > > [[irc:irc.freenode.net/test][Irc link]] > > Would export to > > Irc link > > in ox-html. The proper fix would be to patch "org-irc.el" and add an export function there. "irc" links are not default links in Org, so there is no reason to hard-code them in "ox-html.el". You can look into `org-info-export' in "org-info.el", which is an example on how optional link types are handled. Thank you! Regards, -- Nicolas Goaziou