Re: [O] auto-push to mobile (but only when editing org buffer)
On di 14-aug-2012 19:10 Ken Mankoff mank...@gmail.com wrote: How can I wrap that to only run when the active buffer is in Org Mode? (run-at-time 00:10 10 (lambda () (if (eq major-mode 'org-mode) (org-mobile-push That works well. After reading run-at-time documentation, the 00:10 isn't ideal. I now use the following, which syncs files every 60 seconds starting 1 minute after launching emacs: (run-at-time 1 min 60 (lambda () (if (eq major-mode 'org-mode)(org-mobile-push Perhaps you will find https://gist.github.com/3111823 interesting. It contains a bit of code to do the org-mobile-push asynchronously (and notify me about it when done). This makes the push work in the background, in my case it can take quite a while, and not interfere with normal usage. marcel -- Marcel van der Boom -- http://hsdev.com/mvdb.vcf HS-Development BV-- http://www.hsdev.com We use bitcoin! -- http://bitcoin.org smime.p7s Description: S/MIME cryptographic signature
Re: [O] org-read-date-prefer-future should prefer next week if the given time is before now
Hi Tom, Tom adatgyu...@gmail.com writes: I have (setq org-read-date-prefer-future 'time) in my .emacs, so if I give a time like 8am and it is before now then it is interpreted as tomorrow. This is good, because I never want to set times in the past. However if I give thu 8am (it is Thursday 11:50am here, so Thu 8am is before now) then org interpretes it as 8am today. You need to enter 8am thu in this case. HTH, -- Bastien
Re: [O] org-read-date-prefer-future should prefer next week if the given time is before now
Bastien bzg at gnu.org writes: You need to enter 8am thu in this case. It is a consistency bug then. If thu 8am works in other cases then it should not be the user's job to know which format to use to achieve to desired result. Org should treat both forms in the same way.
Re: [O] org-read-date-prefer-future should prefer next week if the given time is before now
Tom adatgyu...@gmail.com writes: It is a consistency bug then. If thu 8am works in other cases then it should not be the user's job to know which format to use to achieve to desired result. Org should treat both forms in the same way. Please try the attached patch and report other inconsistencies. Thanks, diff --git a/lisp/org.el b/lisp/org.el index f605443..bf9f1f6 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -15558,10 +15558,11 @@ user. (setq ans +0)) (when (setq delta (org-read-date-get-relative ans (current-time) org-def)) - (setq ans (replace-match t t ans) - deltan (car delta) - deltaw (nth 1 delta) -deltadef (nth 2 delta))) + (unless (save-match-data (string-match org-plain-time-of-day-regexp ans)) + (setq ans (replace-match t t ans) + deltan (car delta) + deltaw (nth 1 delta) + deltadef (nth 2 delta ;; Check if there is an iso week date in there ;; If yes, store the info and postpone interpreting it until the rest @@ -15714,7 +15715,6 @@ user. ((equal deltaw m) (setq month (+ month deltan))) ((equal deltaw y) (setq year (+ year deltan) ((and wday (not (nth 3 tl))) - (setq futurep nil) ;; Weekday was given, but no day, so pick that day in the week ;; on or after the derived date. (setq wday1 (nth 6 (decode-time (encode-time 0 0 0 day month year -- Bastien
[O] Collaborating on a shared project
Hello, After months, if not years, of insistence, I've convinced (even VI) colleagues to use Org as the format for keeping tracks of tasks to do, and of time spent on them. Now, as projects involve more people than me only, I'm a bit stuck because I'd like to get all tasks (of everybody) in _one unique_ file (currently, with tags for the assignee), and I require them to track time with Org. Doing so, that file being part of my `org-agenda-files', I have the following problems: - By default, I see *their* tasks in my basic agenda view. OK, that can be solved by filtering on tags, eventually making up a customized agenda view for me. Not a real problem, then. - I see *their* clock lines when checking the clocks (for gaps or overlaps). The workaround I had until now was to put all project information in one unique file, but the clock times (and the corresponding tasks) in personal (but public among us) files. That solved the problem of (much more) conflicts when committing updates to the Org project file as well. However, there is now good view of the tasks, even INCLUDE'ing those Org files in the project file, as everybody has made up its own structure for the tasks, and tasks about a same subject may be spread over multiple personal files. If I want a nice HTML project page, with tasks logically ordered, I must return to the one big file view. But what happens with the tasks done by others? If one task is begun by someone, then finished by another, do I need to create two tasks, as I use tags for setting the assignee? It does not make real sense, semantically, as we speak of the same task. Then, the clock lines should be owned by some user (identified by kind of a tag): they could be set under the same task, and the clock check functions should be improved to take into account some sort of identifier. That's, here, the current results of my thoughts about how to resolve the above problem. I'd be interested to hear other solutions or workaround, and I think we should have a way to upgrade Org to more than a *personal* organizer -- of course, it already is much more, but I'm emphasizing here over personal. Best regards, Seb -- Sebastien Vauban
Re: [O] Linking back to archive
Hi Marcelo, Marcelo de Moraes Serpa celose...@gmail.com writes: I tried opening gtd.org_archive and then pressing C-l on the * Project headline, then opening project.org and C-c C-l, and while it does paste the org link, that looks like: file:~/org/gtd/ gtd.org_archive::*Project, if I click it nothing happens. Mhh.. I tested this and it works fine here. I guess we need more information and a reproducible recipe with emacs -Q. Can you provide that? Thanks, -- Bastien
Re: [O] Feature that org mode needs most
Bastien b...@gnu.org: Steinar Bang s...@dod.no writes: I will pull and try the new functionality. Yes -- please let me know. The drawback of this functionality is that it changes things outside of sight, which I don't really like. You get a message, and the subtree of the (possibly distant) clock get unfolded, but perhaps the change can be made more visible -- or into control. My git version of org has commit d02eedc987ab73ae5de5dacf3825536c3252c6e5 as its newest commit. What happens here is that when I do S-M-down on minutes in the start time of the current clock, it adjust both the current clock and the previous clock with 5 minutes, but the cursor ends up in the end time of the previous clock and have to be moved back to do further adjustments. is this known, and has been fixed later than the above commit? If so, I can pull, and try again.
Re: [O] [ANN] Editable HTML export of Org-mode files
Eric Abrahamsen e...@ericabrahamsen.net writes: On Tue, Aug 14 2012, Eric Schulte wrote: Hi, I've recently put together a web server which runs in Emacs and exports local Org-mode files to HTML in such a way that they may be edited from within a web browser with the edits saved to local files on disk. The code is available from github. repository https://github.com/eschulte/org-ehtml README --- http://eschulte.github.com/org-ehtml This is a very thin Emacs Lisp and JavaScript wrapper around Nic Ferrier's elnode Emacs web server [1], and Nicolas Goaziou's structured Org-mode file representation and export engine. It requires Emacs 24 and the development versions of both Org-mode and elnode. The code is fairly new so there are likely some kinks to be worked out (backup your files before editing them with this web-server), but the implementation is very simple and should be easy to modify. See the README for information on how to make use of elnode's authentication system, or how to have web edits automatically committed to a local version control system. I gave this a very brief whirl, with the dev versions of emacs, org, elnode, and org-ehtml, and running the test server on simple.org as described in the README. Every time I edited a block and clicked save, it just deleted the whole block. I got these errors in ~/.elnodelogs/elnode-error: I'm not sure what could be causing this problem. Did the test suite run successfully for you? I'm betting it did if the problem didn't arise until you POSTed save data. Was the block deleted from the Org-mode file on disk, or just from the web page? What happens when you refresh the web page after an edit? I'd be happy to mess with this further if it would be helpful. This would be very helpful as I can't reproduce the problem locally. Please re-run with emacs -Q using the attached batch.el ELisp file. Instructions for re-running are included in the top of the file. This will re-run on your system with a minimal configuration, and will stifle the elnode warning (which are uniformly unhelpful). batch.el Description: application/emacs-lisp When I run this locally, I get the following output in my *Messages* buffer. ,[*Messages*] | -start-relevant-output- | Added to /home/eschulte/.elnodelogs/elnode-error [3 times] | Added to /home/eschulte/.elnodelogs/org-ehtml | OVERVIEW | Loading vc-git...done | Saving file /home/eschulte/.emacs.d/src/org-ehtml/test/examples/simple.html... | Wrote /home/eschulte/.emacs.d/src/org-ehtml/test/examples/simple.html | Added to /home/eschulte/.elnodelogs/elnode-error [13 times] | Added to /home/eschulte/.elnodelogs/org-ehtml | Saving file /home/eschulte/.emacs.d/src/org-ehtml/test/examples/simple.org... | Wrote /home/eschulte/.emacs.d/src/org-ehtml/test/examples/simple.org | Added to /home/eschulte/.elnodelogs/elnode-error | Saving file /tmp/org-11503Cdz... | Wrote /tmp/org-11503Cdz | OVERVIEW | Exporting... [2 times] | HTML export done, pushed to kill ring and clipboard | Added to /home/eschulte/.elnodelogs/elnode-error [5 times] ` If this doesn't solve the problem I can send a modified version of the attached batch.el file which will include more debug output. Thanks, E -- Eric Schulte http://cs.unm.edu/~eschulte
Re: [O] [ANN] Editable HTML export of Org-mode files
Bastien b...@gnu.org writes: Hi Eric, Eric Schulte eric.schu...@gmx.com writes: With respect to security, elnode has a simple authentication system which seems to work well in my local trials. It has no forms for setting passwords online, so users would have to generate a hash of their password locally, and then send the hash to someone who would manually add it to the elnode authentication database on orgmode.org. During authentication the hashed password is sent in plain text, so we would need to run the elnode server behind an https proxy server. I don't think this would be difficult to implement and is a good idea for any system with authentication. Thanks for those details. With respect to integration with the existing Worg, this system should work well in concert with the git backend. Git could still be used for offline edits as it is currently. The org-ehtml server could be configured to commit all web edits to git. A conflict checker would be needed, which could be added to the `org-ehtml-before-save-hook'. I think a page should be locked when a user is editing it through org-ehtml.el. This would prevent conflicts from concurrent editing from the web. As for conflicts between the .org to be written (from org-ehtml) and the .org that might have been pushed trough git, what would be the behavior? Discard this edit? Use org-merge-driver to help resolve the conflict? Let the user download the .org he has been editing, so that his changes are not lost? I haven't given this much thought, but my first instinct is to avoid any use of locking. I think the conflict resolution model used by version control systems could also be appropriate here. Namely, the first to commit an edit has their edit applied, and any subsequent out-of-date edits are merged. - if the backend VC system is able to automatically merge the edit, then this will be done automatically. The probability of a successful merge becomes more likely if the new org-merge engine is used by the backing VC system. - if such a merge is not possible, then the edited version should be saved in some way. maybe this data should be presented to the user in a plain text block or as a file download (depending on edit size). The user could then refresh the org page to get the new version and manually incorporate their edit. - if at some point in the hazy distant future someone builds a simple elnode web interface to ediff, then that could be used to perform live merges of files. Such a system would boast better conflict handling than any existing wiki system of which I'm currently aware. This is still quite unclear to me. In any case, we should first try this on a prototype for a while and see if this is robust enough. I absolutely agree, this is not yet ready for Worg. After we figure out good answers to the above we can try a test run in a sandbox, and then possibly migrate to Worg only after we're convinced this is stable. I view org-ehtml as an opportunistic integration of a confluence of developments in elnode and org-element. While I think it is an elegant design and has a lot of potential I wouldn't call it a production-ready system. Thanks -- Eric Schulte http://cs.unm.edu/~eschulte
Re: [O] Org Build System (aka Makefile)
Bastien writes: I'll stick to this: it is good to document all existing targets. The question is whether a target should be displayed by `make helpall' rather than just ̀make help'. As long as `make helpall´ was all the documentation that meant it had to look like it does. Regards, Achim. -- +[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+ Waldorf MIDI Implementation additional documentation: http://Synth.Stromeko.net/Downloads.html#WaldorfDocs
Re: [O] [GSoC] Org Merge Driver Update
Andrew Young younga...@gmail.com writes: Hello Everyone, I've been working on a merge driver for org-mode documents over the summer as a Google Summer of Code project. I just wanted to show everyone some progress on the merge driver. There are some new examples you can see at the project page [1][2], and instructions on how to build and use it. the source is available here: git clone git://orgmode.org/org-merge-driver.git I'd really appreciate if anyone could take the merge driver out for a test spin, and come back with any kind of feedback, such as: - file output - customization - the user interface - the merging rules - new features and element specific support - testing - neat ideas, etc. There is only about a week left in GSoC, but I'm planning to continue to develop the merge driver past the end of GSoC. Please take a look, and thanks, Andrew Young [1] project page: http://orgmode.org/worg/org-contrib/gsoc2012/student-projects/git-merge-tool/ [2] examples: http://orgmode.org/worg/org-contrib/gsoc2012/student-projects/git-merge-tool/examples.html I'm very excited to start using this merge driver. I've put together an Arch Linux User Repository (aur) package, which can be used by Arch Linux users to install the org-merge-driver with pacman. It is available at [1], if others find it useful and if Andrew doesn't object I'd be happy to push it into the official aur database. It is very simple and installs directly from git. I spent some time testing this locally and I've run into what appears to be an error. Namely when merging a tree with multiple new sub-headings the merge completes successfully, but the subheadings from the OTHER branch are deleted by the merge. Here [2] is a tarball of the entire git directory after the failed merge. Please let me know if there is any other debug information I can provide. Thanks, Footnotes: [1] http://cs.unm.edu/~eschulte/data/org-merge-driver-20120815-1.src.tar.gz [2] http://cs.unm.edu/~eschulte/data/fruit-test.tar.bz2 -- Eric Schulte http://cs.unm.edu/~eschulte
Re: [O] Org Build System (aka Makefile)
Bastien writes: [...] I hope you'll understand the choices above. You should know the answer from the previous discussion, but I've clearly failed to reach you. Given your obvious desire to take over direct control of the further development of the build system, I won't do any further development unless you ask. I'll see to complete the documentation on Worg in the next few weeks. Regards, Achim. -- +[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+ SD adaptations for Waldorf Q V3.00R3 and Q+ V3.54R2: http://Synth.Stromeko.net/Downloads.html#WaldorfSDada
Re: [O] Org Build System (aka Makefile)
Hi Achim, it is not a matter of taking over the build system, it is a matter of making it simple for the users and useful for the developers. At least two of the core developers here want `make compile-single' and don't want to edit local.mk to do so. The reverts I did were just for this to be the case. If a majority of developers want a _COMPILE_ variable or whatever, I'll happily let you implement it. The decision I took of getting rid of the elint targets is perhaps more controversial, but I think elint targets are more gadgets than anything else right now, and potentially disconcerting ones. You sound a bit angry at me, which I'm sorry to read. FWIW, I 100% acknowledge your sense of rigor and completeness and the way you can handle complex stuff -- but as a maintainer, I also try to focus on simplicity. Thanks, -- Bastien
Re: [O] Feature that org mode needs most
Hi Steinar, Steinar Bang s...@dod.no writes: is this known, and has been fixed later than the above commit? If so, I can pull, and try again. It should be fixed now, please confirm. Thanks, -- Bastien
Re: [O] Collaborating on a shared project
Hi Sébastien, Sebastien Vauban wxhgmqzgwmuf-genee64ty+gs+fvcfc7...@public.gmane.org writes: I think we should have a way to upgrade Org to more than a *personal* organizer -- of course, it already is much more, but I'm emphasizing here over personal. There is work under the way to make Org more collaboration-ready. See the org-merge-driver by Andrew: http://orgmode.org/w/org-merge-driver.git It helps merging possible conflicts when people use the same repo to store org files. Andrew asked for feedback -- if you have time to test this, that would be great. See also org-sync by Aurélien: http://orgmode.org/w/org-sync.git It helps synchronize local org files with a remote backend such as redmine, github, RememberTheMilk, etc. Here again, feedback is very welcome. Now, what I would do in your situation is to have one .org file per collaborator, then various views to get the information you want. This reduces possible merge conflicts, makes it easy to publish it as a web page -- even publishing agendas should be okay. I've never used Org in this way though, so this is not grounded on experience. Best, -- Bastien
[O] Bug: ob-ref.el table indexing broken [7.8.11 (release_7.8.11-515-g5f1fc2.dirty]
Hi, After updating my org-mode setup to 7.8.11 I noticed that row and column indexing no longer worked when accessing table data in a code block call. An example is: #+name: test-data | 10 | 20 | 30 | 40 | | 11 | 21 | 31 | 41 | | 12 | 22 | 32 | 42 | #+begin_src python :results output raw :var data=test-data[,0:1] print data #+end_src #+RESULTS: [[10, 20, 30, 40], [11, 21, 31, 41], [12, 22, 32, 42]] The correct result should be: #+RESULTS: [[10, 20], [11, 21], [12, 22]] I noticed that a change was recently made to the ob-ref.el file to remove org-flet usage. After some work with the elisp debugger I believe the problem occurs due to a mis-aligned closing parenthesis in the org-babel-ref-index-list function. The following patch appears to fix the problem (but I don't fully understand the function, so there may be some unintended consequences): diff --git a/lisp/ob-ref.el b/lisp/ob-ref.el index d223589..05f3ea0 100644 --- a/lisp/ob-ref.el +++ b/lisp/ob-ref.el @@ -240,8 +240,8 @@ to \0:-1\. (funcall wrap (string-to-number (match-string 2 portion))) (funcall wrap (string-to-number (match-string 3 portion (list (funcall wrap 0) (funcall wrap -1) - (list (nth (funcall wrap (string-to-number portion)) lis))) - lis) + (list (nth (funcall wrap (string-to-number portion)) lis)) + lis)) (defun org-babel-ref-split-args (arg-string) Split ARG-STRING into top-level arguments of balanced parenthesis. -- Thanks. Ivars Emacs : GNU Emacs 23.3.1 (x86_64-unknown-linux-gnu, X toolkit, Xaw3d scroll bars) of 2011-10-19 Package: Org-mode version 7.8.11 (release_7.8.11-515-g5f1fc2.dirty)
[O] Launch org-mode and it asks for a ftp password
Hi, I don't know what's going on, but when I launch org-mode in one of my machines in home it thinks I am at work. If I launch org-mode by M-x org-mode, it prompts with a ftp password for my machine at work. My .emacs config is synced via dropbox on these machines. Where is the option to disable this behavior. Thanks -- :.Humberto Pinheiro.:
[O] [PATCH v2 00/11] Takjuggler exporter improvements
Hi, here is a new version of the patch series. Changes are: - fixed commit messages format - added a few missing attributes in `org-export-taskjuggler-valid-resource-attributes' (1/11) and `org-export-taskjuggler-valid-report-attributes' (9/11) - added another milestone-related fix: attribute length prevents milestone creation (same as duration). Fix merged into 4/11 - added another patch (11/11) to make org-publish taskjuggler-capable. Feel free to reject this one if it's deemed undesirable. Thanks, Yann. Yann Hodique (11): org-taskjuggler: make task and resource properties customizable org-taskjuggler: properly install local variables at export time org-taskjuggler: make use of org properties org-taskjuggler: fix milestone definition org-taskjuggler: introduce a global header, for early macros org-taskjuggler: use project end date, if specified org-taskjuggler: make project umbrella task optional org-taskjuggler: disambiguate headline, as it's also a valid property org-taskjuggler: allow reports definition from within the org file org-taskjuggler: update doc to reflect latest changes org-taskjuggler: make taskjuggler compatible with org-publish doc/org.texi| 48 - lisp/org-publish.el | 6 ++ lisp/org-taskjuggler.el | 180 ++-- 3 files changed, 180 insertions(+), 54 deletions(-) -- 1.7.11.4
[O] [PATCH v2 01/11] org-taskjuggler: make task and resource properties customizable
* org-taskjuggler.el (org-export-taskjuggler-valid-task-attributes): new custom variable (org-export-taskjuggler-valid-resource-attributes): new custom variable --- lisp/org-taskjuggler.el | 26 -- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/lisp/org-taskjuggler.el b/lisp/org-taskjuggler.el index aa645d2..7d9d203 100644 --- a/lisp/org-taskjuggler.el +++ b/lisp/org-taskjuggler.el @@ -240,6 +240,24 @@ but before any resource and task declarations. :version 24.1 :type '(string :tag Preamble)) +(defcustom org-export-taskjuggler-valid-task-attributes + '(account start note duration endbuffer endcredit end + flags journalentry length limits maxend maxstart minend + minstart period reference responsible scheduling + startbuffer startcredit statusnote) + Valid attributes for Taskjuggler tasks. If one of these + appears as a property for a headline, it will be exported with + the corresponding task. + :group 'org-export-taskjuggler) + +(defcustom org-export-taskjuggler-valid-resource-attributes + '(limits vacation shift booking efficiency journalentry rate + workinghours flags) + Valid attributes for Taskjuggler resources. If one of these + appears as a property for a headline, it will be exported with + the corresponding resource. + :group 'org-export-taskjuggler) + ;;; Hooks (defvar org-export-taskjuggler-final-hook nil @@ -614,7 +632,7 @@ is defined it will calculate a unique id for the resource using (cdr (assoc ID resource)) (cdr (assoc unique-id resource) (headline (cdr (assoc headline resource))) - (attributes '(limits vacation shift booking efficiency journalentry rate))) + (attributes org-export-taskjuggler-valid-resource-attributes)) (insert (concat resource id \ headline \ {\n @@ -655,11 +673,7 @@ org-mode priority string. (cdr (assoc duration task)) (cdr (assoc end task)) (cdr (assoc period task))) -(attributes - '(account start note duration endbuffer endcredit end - flags journalentry length maxend maxstart minend - minstart period reference responsible scheduling - startbuffer startcredit statusnote))) +(attributes org-export-taskjuggler-valid-task-attributes)) (insert (concat task unique-id \ headline \ {\n -- 1.7.11.4
[O] [PATCH v2 03/11] org-taskjuggler: make use of org properties
* org-taskjuggler.el (org-taskjuggler-date): new function, produce a taskjuggler-compatible date (org-taskjuggler-components): make use of SCHEDULED/DEADLINE properties infer start and end date from SCHEDULED/DEADLINE information --- lisp/org-taskjuggler.el | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lisp/org-taskjuggler.el b/lisp/org-taskjuggler.el index 529cda0..93f0cc7 100644 --- a/lisp/org-taskjuggler.el +++ b/lisp/org-taskjuggler.el @@ -138,8 +138,6 @@ ;; :END: ;; * TODO -;; - Use SCHEDULED and DEADLINE information (not just start and end -;; properties). ;; - Look at org-file-properties, org-global-properties and ;; org-global-properties-fixed ;; - What about property inheritance and org-property-inherit-p? @@ -385,6 +383,10 @@ with the TaskJuggler GUI. (save-excursion (and (org-up-heading-safe) (org-entry-get (point) ORDERED +(defun org-taskjuggler-date (date) + (let ((time (parse-time-string date))) +(format %d-%02d-%02d (nth 5 time) (nth 4 time) (nth 3 time + (defun org-taskjuggler-components () Return an alist containing all the pertinent information for the current node such as the headline, the level, todo state @@ -396,6 +398,12 @@ information, all the properties, etc. (replace-regexp-in-string \ \\\ (nth 4 components) t t)) ; quote double quotes in headlines (parent-ordered (org-taskjuggler-parent-is-ordered-p))) +(let ((scheduled (assoc SCHEDULED props)) + (deadline (assoc DEADLINE props))) + (when scheduled + (push (cons start (org-taskjuggler-date (cdr scheduled))) props)) + (when deadline + (push (cons end (org-taskjuggler-date (cdr deadline))) props))) (push (cons level level) props) (push (cons headline headline) props) (push (cons parent-ordered parent-ordered) props))) -- 1.7.11.4
[O] [PATCH v2 10/11] org-taskjuggler: update doc to reflect latest changes
--- doc/org.texi | 48 ++-- 1 file changed, 30 insertions(+), 18 deletions(-) diff --git a/doc/org.texi b/doc/org.texi index 3fdb4ac..0f8b0d9 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -11898,9 +11898,9 @@ nodes of a document or strictly follow the order of the nodes in the document. Instead the TaskJuggler exporter looks for a tree that defines the tasks and -a optionally tree that defines the resources for this project. It then -creates a TaskJuggler file based on these trees and the attributes defined in -all the nodes. +optionally trees that define the resources and reports for this project. +It then creates a TaskJuggler file based on these trees and the attributes +defined in all the nodes. @subsection TaskJuggler export commands @@ -11909,7 +11909,8 @@ all the nodes. Export as a TaskJuggler file. @orgcmd{C-c C-e J,org-export-as-taskjuggler-and-open} -Export as a TaskJuggler file and then open the file with TaskJugglerUI. +Export as a TaskJuggler file and then open the file with TaskJugglerUI (only +for TaskJugglerUI 2.x). @end table @subsection Tasks @@ -11947,15 +11948,17 @@ time. @subsection Export of properties -The exporter also takes TODO state information into consideration, i.e.@: if a -task is marked as done it will have the corresponding attribute in -TaskJuggler (@samp{complete 100}). Also it will export any property on a task -resource or resource node which is known to TaskJuggler, such as -@samp{limits}, @samp{vacation}, @samp{shift}, @samp{booking}, -@samp{efficiency}, @samp{journalentry}, @samp{rate} for resources or -@samp{account}, @samp{start}, @samp{note}, @samp{duration}, @samp{end}, -@samp{journalentry}, @samp{milestone}, @samp{reference}, @samp{responsible}, -@samp{scheduling}, etc for tasks. +The exporter also takes TODO state information into consideration, i.e.@: if +a task is marked as done it will have the corresponding attribute in +TaskJuggler (@samp{complete 100}). Scheduling information is also taken into +account to set start/end dates for tasks. + +The exporter will also export any property on a task resource or resource +node which is known to TaskJuggler, such as @samp{limits}, @samp{vacation}, +@samp{shift}, @samp{booking}, @samp{efficiency}, @samp{journalentry}, +@samp{rate} for resources or @samp{account}, @samp{start}, @samp{note}, +@samp{duration}, @samp{end}, @samp{journalentry}, @samp{milestone}, +@samp{reference}, @samp{responsible}, @samp{scheduling}, etc for tasks. @subsection Dependencies @@ -12001,11 +12004,20 @@ examples should illustrate this: @vindex org-export-taskjuggler-default-reports TaskJuggler can produce many kinds of reports (e.g.@: gantt chart, resource allocation, etc). The user defines what kind of reports should be generated -for a project in the TaskJuggler file. The exporter will automatically insert -some default reports in the file. These defaults are defined in -@code{org-export-taskjuggler-default-reports}. They can be modified using -customize along with a number of other options. For a more complete list, see -@kbd{M-x customize-group @key{RET} org-export-taskjuggler @key{RET}}. +for a project in the TaskJuggler file. By default, the exporter will +automatically insert some pre-set reports in the file. These defaults are +defined in @code{org-export-taskjuggler-default-reports}. They can be +modified using customize along with a number of other options. For a more +complete list, see @kbd{M-x customize-group @key{RET} org-export-taskjuggler +@key{RET}}. + +Alternately, the user can tag a tree with +@code{org-export-taskjuggler-report-tag}, and define reports in sub-nodes, +similarly to what is done with tasks or resources. The properties used for +report generation are defined in +@code{org-export-taskjuggler-valid-report-attributes}. In addition, a special +property named @samp{report-kind} is used to define the kind of report one +wants to generate (by default, a @samp{taskreport}). For more information and examples see the Org-taskjuggler tutorial at @uref{http://orgmode.org/worg/org-tutorials/org-taskjuggler.html}. -- 1.7.11.4
[O] [PATCH v2 06/11] org-taskjuggler: use project end date, if specified
* org-taskjuggler.el (org-taskjuggler-open-project): use START - END as an alternative to START +Xd --- lisp/org-taskjuggler.el | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/org-taskjuggler.el b/lisp/org-taskjuggler.el index c997da7..7376302 100644 --- a/lisp/org-taskjuggler.el +++ b/lisp/org-taskjuggler.el @@ -615,9 +615,11 @@ specified it is calculated (start (cdr (assoc start project))) (end (cdr (assoc end project (insert - (format project %s \%s\ \%s\ %s +%sd {\n }\n + (format project %s \%s\ \%s\ %s %s {\n }\n unique-id headline version start -org-export-taskjuggler-default-project-duration + (or (and end (format - %s end)) + (format +%sd + org-export-taskjuggler-default-project-duration)) (defun org-taskjuggler-filter-and-join (items) Filter all nil elements from ITEMS and join the remaining ones -- 1.7.11.4
Re: [O] [GSoC] Org Merge Driver Update
Eric Schulte eric.schu...@gmx.com writes: I'm very excited to start using this merge driver. I've put together an Arch Linux User Repository (aur) package, which can be used by Arch Linux users to install the org-merge-driver with pacman. It is available at [1], if others find it useful and if Andrew doesn't object I'd be happy to push it into the official aur database. It is very simple and installs directly from git. Hey! That's nice -- ArchLinux user here. I installed the package correctly. +1 for adding it to AUR. Thanks! -- Bastien
[O] [PATCH v2 05/11] org-taskjuggler: introduce a global header, for early macros
* org-taskjuggler.el (org-export-taskjuggler-default-global-header): new custom variable (org-export-as-taskjuggler): insert global header before anything else --- lisp/org-taskjuggler.el | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/lisp/org-taskjuggler.el b/lisp/org-taskjuggler.el index a18cdf8..c997da7 100644 --- a/lisp/org-taskjuggler.el +++ b/lisp/org-taskjuggler.el @@ -221,6 +221,14 @@ with `org-export-taskjuggler-project-tag' :version 24.1 :type '(repeat (string :tag Report))) +(defcustom org-export-taskjuggler-default-global-header + + Default global header for the project. This goes before +project declaration, and might be useful for early macros + :group 'org-export-taskjuggler + :version 24.1 + :type '(string :tag Preamble)) + (defcustom org-export-taskjuggler-default-global-properties shift s40 \Part time shift\ { workinghours wed, thu, fri off @@ -332,11 +340,6 @@ defined in `org-export-taskjuggler-default-reports'. (setcar tasks (push (cons version version) task (with-current-buffer buffer (erase-buffer) - (org-clone-local-variables old-buffer ^org-) - (org-taskjuggler-open-project (car tasks)) - (insert org-export-taskjuggler-default-global-properties) - (insert \n) - (dolist (resource resources) (org-install-letbind) ;; create local variables for all options, to make sure all called ;; functions get the correct information @@ -345,6 +348,12 @@ defined in `org-export-taskjuggler-default-reports'. (plist-get opt-plist (car x org-export-plist-vars) + (org-clone-local-variables old-buffer ^org-) + (insert org-export-taskjuggler-default-global-header) + (org-taskjuggler-open-project (car tasks)) + (insert org-export-taskjuggler-default-global-properties) + (insert \n) + (dolist (resource resources) (let ((level (cdr (assoc level resource (org-taskjuggler-close-maybe level) (org-taskjuggler-open-resource resource) -- 1.7.11.4
[O] [PATCH v2 02/11] org-taskjuggler: properly install local variables at export time
* org-taskjuggler.el (org-export-as-taskjuggler): compute opt-plist, use `org-install-letbind' --- lisp/org-taskjuggler.el | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lisp/org-taskjuggler.el b/lisp/org-taskjuggler.el index 7d9d203..529cda0 100644 --- a/lisp/org-taskjuggler.el +++ b/lisp/org-taskjuggler.el @@ -285,7 +285,10 @@ defined in `org-export-taskjuggler-default-reports'. (message Exporting...) (setq-default org-done-keywords org-done-keywords) - (let* ((tasks + (let* ((opt-plist (org-combine-plists (org-default-export-plist) +(org-infile-export-plist))) +(org-export-opt-plist opt-plist) + (tasks (org-taskjuggler-resolve-dependencies (org-taskjuggler-assign-task-ids (org-taskjuggler-compute-task-leafiness @@ -336,6 +339,14 @@ defined in `org-export-taskjuggler-default-reports'. (insert org-export-taskjuggler-default-global-properties) (insert \n) (dolist (resource resources) + (org-install-letbind) + ;; create local variables for all options, to make sure all called + ;; functions get the correct information + (mapc (lambda (x) + (set (make-local-variable (nth 2 x)) + (plist-get opt-plist (car x +org-export-plist-vars) + (let ((level (cdr (assoc level resource (org-taskjuggler-close-maybe level) (org-taskjuggler-open-resource resource) -- 1.7.11.4
[O] [PATCH v2 11/11] org-taskjuggler: make taskjuggler compatible with org-publish
* lisp/org-publish.el (org-publish-org-to-taskjuggler): new function to publish taskjuggler projects * lisp/org-taskjuggler.el (org-export-as-taskjuggler): adapt signature to reflect standard interface, in particular allow export to buffer --- lisp/org-publish.el | 6 ++ lisp/org-taskjuggler.el | 33 +++-- 2 files changed, 29 insertions(+), 10 deletions(-) diff --git a/lisp/org-publish.el b/lisp/org-publish.el index ed2db3a..e78e2d4 100644 --- a/lisp/org-publish.el +++ b/lisp/org-publish.el @@ -649,6 +649,12 @@ See `org-publish-org-to' to the list of arguments. (org-publish-with-aux-preprocess-maybe (org-publish-org-to utf8 plist filename pub-dir))) +(defun org-publish-org-to-taskjuggler (plist filename pub-dir) + Publish an org file to TaskJuggler. +See `org-publish-org-to' to the list of arguments. + (org-publish-with-aux-preprocess-maybe + (org-publish-org-to taskjuggler plist filename pub-dir))) + (defun org-publish-attachment (plist filename pub-dir) Publish a file with no transformation of any kind. See `org-publish-org-to' to the list of arguments. diff --git a/lisp/org-taskjuggler.el b/lisp/org-taskjuggler.el index 49c24ff..1733fe8 100644 --- a/lisp/org-taskjuggler.el +++ b/lisp/org-taskjuggler.el @@ -298,7 +298,8 @@ but before any resource and task declarations. (defvar org-export-taskjuggler-old-level) ;;;###autoload -(defun org-export-as-taskjuggler () +(defun org-export-as-taskjuggler (optional arg hidden ext-plist + to-buffer body-only pub-dir) Export parts of the current buffer as a TaskJuggler file. The exporter looks for a tree with tag, property or todo that matches `org-export-taskjuggler-project-tag' and takes this as @@ -310,11 +311,12 @@ resources for the project. If no resources are specified, a default resource is created and allocated to the project. Also the taskjuggler project will be created with default reports as defined in `org-export-taskjuggler-default-reports'. - (interactive) + (interactive P) (message Exporting...) (setq-default org-done-keywords org-done-keywords) (let* ((opt-plist (org-combine-plists (org-default-export-plist) + ext-plist (org-infile-export-plist))) (org-export-opt-plist opt-plist) (tasks @@ -333,12 +335,20 @@ defined in `org-export-taskjuggler-default-reports'. (org-map-entries 'org-taskjuggler-components org-export-taskjuggler-report-tag nil 'archive 'comment)) -(filename (expand-file-name - (concat -(file-name-sans-extension - (file-name-nondirectory buffer-file-name)) -org-export-taskjuggler-extension))) -(buffer (find-file-noselect filename)) +(filename (if to-buffer + nil +(concat (file-name-as-directory + (or pub-dir + (org-export-directory :tj opt-plist))) +(file-name-sans-extension + (file-name-nondirectory buffer-file-name)) +org-export-taskjuggler-extension))) +(buffer (if to-buffer +(cond + ((eq to-buffer 'string) + (get-buffer-create *Org Taskjuggler Export*)) + (t (get-buffer-create to-buffer))) + (find-file-noselect filename))) (old-buffer (current-buffer)) (org-export-taskjuggler-old-level 0) task resource) @@ -399,10 +409,13 @@ defined in `org-export-taskjuggler-default-reports'. (if org-export-taskjuggler-keep-project-as-task 1 2)) (org-taskjuggler-insert-reports reports) - (save-buffer) + (or to-buffer (save-buffer)) (or (org-export-push-to-kill-ring TaskJuggler) (message Exporting... done)) - (current-buffer + (if (eq to-buffer 'string) + (prog1 (buffer-substring (point-min) (point-max)) + (kill-buffer (current-buffer))) + (current-buffer) ;;;###autoload (defun org-export-as-taskjuggler-and-open () -- 1.7.11.4
Re: [O] [GSoC] Org Merge Driver Update
Eric Schulte eric.schu...@gmx.com writes: I'm very excited to start using this merge driver. I've put together an Arch Linux User Repository (aur) package, which can be used by Arch Linux users to install the org-merge-driver with pacman. It is available at [1], if others find it useful and if Andrew doesn't object I'd be happy to push it into the official aur database. It is very simple and installs directly from git. you should add gnulib, it would seem (as a makedepends?). At least gnulib-tool isn't on my system. makedepends=('git' 'autoconf' 'gnulib') Also, installing local is kind of non-default (IMO). . . $ pacman -Ql org-merge-driver org-merge-driver /usr/ org-merge-driver /usr/local/ org-merge-driver /usr/local/bin/ org-merge-driver /usr/local/bin/org-merge-driver org-merge-driver /usr/local/share/ org-merge-driver /usr/local/share/doc/ org-merge-driver /usr/local/share/doc/org-merge-driver/ org-merge-driver /usr/local/share/doc/org-merge-driver/README Thus, conditional on my taste I'd build like: ## Build msg Building... cd $_gitname gnulib-tool --add-import autoreconf -i ./configure --prefix=/usr ## added prefix make It's also encouraged to use -git in the name, but I don't always follow it. . . I have a couple of local org `addons' that I never managed to push to the AUR, but I encourage you to push the merge drive. BTW: I would have never seen that I can use this for my hg had you not published the package here! –Rasmus -- Don't panic!!!
[O] [PATCH 04/10] org-taskjuggler: task with end-only is also a milestone (deadline)
--- lisp/org-taskjuggler.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/org-taskjuggler.el b/lisp/org-taskjuggler.el index 7974d1e..f668e7f 100644 --- a/lisp/org-taskjuggler.el +++ b/lisp/org-taskjuggler.el @@ -689,7 +689,8 @@ org-mode priority string. (and (assoc leaf-node task) (not (or effort (cdr (assoc duration task)) - (cdr (assoc end task)) + (and (cdr (assoc start task)) + (cdr (assoc end task))) (cdr (assoc period task))) (attributes org-export-taskjuggler-valid-task-attributes)) (insert -- 1.7.11.3
[O] [PATCH v2 04/11] org-taskjuggler: fix milestone definition
* org-taskjuggler.el (org-taskjuggler-open-task): task with end-only is also a milestone (deadline), task with length is not --- lisp/org-taskjuggler.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/org-taskjuggler.el b/lisp/org-taskjuggler.el index 93f0cc7..a18cdf8 100644 --- a/lisp/org-taskjuggler.el +++ b/lisp/org-taskjuggler.el @@ -689,8 +689,10 @@ org-mode priority string. (milestone (or (cdr (assoc milestone task)) (and (assoc leaf-node task) (not (or effort + (cdr (assoc length task)) (cdr (assoc duration task)) - (cdr (assoc end task)) + (and (cdr (assoc start task)) + (cdr (assoc end task))) (cdr (assoc period task))) (attributes org-export-taskjuggler-valid-task-attributes)) (insert -- 1.7.11.4
[O] [PATCH v2 09/11] org-taskjuggler: allow reports definition from within the org file
* org-taskjuggler.el (org-export-taskjuggler-report-tag): new custom variable (org-export-taskjuggler-valid-report-attributes): new custom variable (org-export-as-taskjuggler): compute reports (org-taskjuggler-open-report): generate report from org item (org-taskjuggler-insert-reports): insert default reports only if no explicit one is defined --- lisp/org-taskjuggler.el | 42 +- 1 file changed, 37 insertions(+), 5 deletions(-) diff --git a/lisp/org-taskjuggler.el b/lisp/org-taskjuggler.el index 33b111d..49c24ff 100644 --- a/lisp/org-taskjuggler.el +++ b/lisp/org-taskjuggler.el @@ -181,6 +181,13 @@ resources for the project. :version 24.1 :type 'string) +(defcustom org-export-taskjuggler-report-tag taskjuggler_report + Tag, property or todo used to find the tree containing all the +reports for the project. + :group 'org-export-taskjuggler + :version 24.1 + :type 'string) + (defcustom org-export-taskjuggler-target-version 2.4 Which version of TaskJuggler the exporter is targeting. :group 'org-export-taskjuggler @@ -264,6 +271,14 @@ but before any resource and task declarations. the corresponding resource. :group 'org-export-taskjuggler) +(defcustom org-export-taskjuggler-valid-report-attributes + '(headline columns definitions timeformat hideresource hidetask +loadunit sorttasks formats period) + Valid attributes for Taskjuggler reports. If one of these + appears as a property for a headline, it will be exported with + the corresponding report. + :group 'org-export-taskjuggler) + (defcustom org-export-taskjuggler-keep-project-as-task t Whether to keep the project headline as an umbrella task for all declared tasks. Setting this to nil will allow maintaining @@ -314,6 +329,10 @@ defined in `org-export-taskjuggler-default-reports'. (org-map-entries 'org-taskjuggler-components org-export-taskjuggler-resource-tag nil 'archive 'comment))) +(reports + (org-map-entries + 'org-taskjuggler-components + org-export-taskjuggler-report-tag nil 'archive 'comment)) (filename (expand-file-name (concat (file-name-sans-extension @@ -379,7 +398,7 @@ defined in `org-export-taskjuggler-default-reports'. (org-taskjuggler-close-maybe (if org-export-taskjuggler-keep-project-as-task 1 2)) - (org-taskjuggler-insert-reports) + (org-taskjuggler-insert-reports reports) (save-buffer) (or (org-export-push-to-kill-ring TaskJuggler) (message Exporting... done)) @@ -741,6 +760,16 @@ org-mode priority string. (org-taskjuggler-get-attributes task attributes) \n +(defun org-taskjuggler-open-report (report) + (let* ((kind (or (cdr (assoc report-kind report)) taskreport)) +(headline (cdr (assoc HEADLINE report))) +(attributes org-export-taskjuggler-valid-report-attributes)) +(insert + (concat + kind \ headline \ {\n + (org-taskjuggler-get-attributes report attributes) + \n}\n + (defun org-taskjuggler-close-maybe (level) (while ( org-export-taskjuggler-old-level level) (insert }\n) @@ -748,10 +777,13 @@ org-mode priority string. (when (= org-export-taskjuggler-old-level level) (insert }\n))) -(defun org-taskjuggler-insert-reports () - (let (report) -(dolist (report org-export-taskjuggler-default-reports) - (insert report \n +(defun org-taskjuggler-insert-reports (reports) + (if reports + (dolist (report (cdr reports)) + (org-taskjuggler-open-report report)) +(let (report) + (dolist (report org-export-taskjuggler-default-reports) + (insert report \n) (provide 'org-taskjuggler) -- 1.7.11.4
[O] how do you I export holidays into an iCal file
How do you I export this into an iCal file (C-c C-e i) (only events get exported): * New Year's Day %%(diary-anniversary 1 1) - Enda
[O] [PATCH v2 08/11] org-taskjuggler: disambiguate headline, as it's also a valid property
--- lisp/org-taskjuggler.el | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lisp/org-taskjuggler.el b/lisp/org-taskjuggler.el index 3c97e03..33b111d 100644 --- a/lisp/org-taskjuggler.el +++ b/lisp/org-taskjuggler.el @@ -329,7 +329,7 @@ defined in `org-export-taskjuggler-default-reports'. (unless resources (setq resources `(((resource_id . ,(user-login-name)) - (headline . ,user-full-name) + (HEADLINE . ,user-full-name) (level . 1) ;; add a default allocation to the first task if none was given (unless (assoc allocate (car tasks)) @@ -427,7 +427,7 @@ information, all the properties, etc. (when deadline (push (cons end (org-taskjuggler-date (cdr deadline))) props))) (push (cons level level) props) -(push (cons headline headline) props) +(push (cons HEADLINE headline) props) (push (cons parent-ordered parent-ordered) props))) (defun org-taskjuggler-assign-task-ids (tasks) @@ -601,7 +601,7 @@ The id is derived from the headline and made unique against UNIQUE-IDS. If the (downcased) first token of the headline is not unique try to add more (downcased) tokens of the headline or finally add more underscore characters (\_\). - (let* ((headline (cdr (assoc headline item))) + (let* ((headline (cdr (assoc HEADLINE item))) (parts (split-string headline)) (id (org-taskjuggler-clean-id (downcase (pop parts) ; try to add more parts of the headline to make it unique @@ -627,7 +627,7 @@ attributes from the PROJECT alist are inserted. If no end date is specified it is calculated `org-export-taskjuggler-default-project-duration' days from now. (let* ((unique-id (cdr (assoc unique-id project))) -(headline (cdr (assoc headline project))) +(headline (cdr (assoc HEADLINE project))) (version (cdr (assoc version project))) (start (cdr (assoc start project))) (end (cdr (assoc end project @@ -678,7 +678,7 @@ is defined it will calculate a unique id for the resource using (or (cdr (assoc resource_id resource)) (cdr (assoc ID resource)) (cdr (assoc unique-id resource) - (headline (cdr (assoc headline resource))) + (headline (cdr (assoc HEADLINE resource))) (attributes org-export-taskjuggler-valid-resource-attributes)) (insert (concat @@ -703,7 +703,7 @@ org-mode priority string. (defun org-taskjuggler-open-task (task) (let* ((unique-id (cdr (assoc unique-id task))) -(headline (cdr (assoc headline task))) +(headline (cdr (assoc HEADLINE task))) (effort (org-taskjuggler-clean-effort (cdr (assoc org-effort-property task (depends (cdr (assoc depends task))) (allocate (cdr (assoc allocate task))) -- 1.7.11.4
[O] [PATCH v2 07/11] org-taskjuggler: make project umbrella task optional
* org-taskjuggler.el (org-export-taskjuggler-keep-project-as-task): new custom variable (org-export-as-taskjuggler): optionally drop the topmost task (project) (org-taskjuggler-assign-task-ids): adapt path computation by optionally dropping the topmost component (project) introduce `org-export-taskjuggler-keep-project-as-task' as a flag to toggle the behavior. Keep old behavior as default. --- lisp/org-taskjuggler.el | 23 --- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/lisp/org-taskjuggler.el b/lisp/org-taskjuggler.el index 7376302..3c97e03 100644 --- a/lisp/org-taskjuggler.el +++ b/lisp/org-taskjuggler.el @@ -264,6 +264,14 @@ but before any resource and task declarations. the corresponding resource. :group 'org-export-taskjuggler) +(defcustom org-export-taskjuggler-keep-project-as-task t + Whether to keep the project headline as an umbrella task for + all declared tasks. Setting this to nil will allow maintaining + completely separated task buckets, while still sharing the same + resources pool. + :group 'org-export-taskjuggler + :type 'boolean) + ;;; Hooks (defvar org-export-taskjuggler-final-hook nil @@ -350,7 +358,10 @@ defined in `org-export-taskjuggler-default-reports'. (org-clone-local-variables old-buffer ^org-) (insert org-export-taskjuggler-default-global-header) - (org-taskjuggler-open-project (car tasks)) + (org-taskjuggler-open-project + (if org-export-taskjuggler-keep-project-as-task + (car tasks) +(pop tasks))) (insert org-export-taskjuggler-default-global-properties) (insert \n) (dolist (resource resources) @@ -365,7 +376,9 @@ defined in `org-export-taskjuggler-default-reports'. (org-taskjuggler-close-maybe level) (org-taskjuggler-open-task task) (setq org-export-taskjuggler-old-level level))) - (org-taskjuggler-close-maybe 1) + (org-taskjuggler-close-maybe + (if org-export-taskjuggler-keep-project-as-task + 1 2)) (org-taskjuggler-insert-reports) (save-buffer) (or (org-export-push-to-kill-ring TaskJuggler) @@ -446,7 +459,11 @@ a path to the current task. (push unique-id (car unique-ids)) (setcar path unique-id))) (push (cons unique-id unique-id) task) - (push (cons path (mapconcat 'identity (reverse path) .)) task) + (push (cons path + (mapconcat 'identity + (if org-export-taskjuggler-keep-project-as-task + (reverse path) +(cdr (reverse path))) .)) task) (setq previous-level level) (setq resolved-tasks (append resolved-tasks (list task))) -- 1.7.11.4
[O] Tab to indent plain lists
Hi Folks, I take miscellaneous meeting notes using plain lists. It's usually a pretty hectic trying to take notes during a meeting, so I'm making up the structure as I go along. I often get to a point where I indented an item wrong: - item 1 - item 1.1 - item 2 I need to get up to item 1.1 and move it as a child of 1. I'd like [tab] to adjust the indentation. I discovered the 'org-cycle-include-plain-lists' variable. The documentation for the var states: If `org-cycle-include-plain-lists' has not been set, TAB fixes the indentation of the current line in a heuristic way. That sounds like what I want, but setting to nil doesn't do it, it just makes TAB a nop. Any thoughts? ...cj
Re: [O] Tab to indent plain lists
Hi Christopher, M-right and M-left on item 1.1 will promote / demote it, just as with headings. http://orgmode.org/manual/Plain-lists.html#Plain-lists Regards, .j. On Wed, Aug 15, 2012 at 05:49:52PM -0400, Christopher J. White wrote: I take miscellaneous meeting notes using plain lists. It's usually a pretty hectic trying to take notes during a meeting, so I'm making up the structure as I go along. I often get to a point where I indented an item wrong: - item 1 - item 1.1 - item 2 I need to get up to item 1.1 and move it as a child of 1. I'd like [tab] to adjust the indentation. I discovered the 'org-cycle-include-plain-lists' variable. The documentation for the var states: If `org-cycle-include-plain-lists' has not been set, TAB fixes the indentation of the current line in a heuristic way. That sounds like what I want, but setting to nil doesn't do it, it just makes TAB a nop.
Re: [O] Linking back to archive
* Marcelo de Moraes Serpa celose...@gmail.com wrote: Hi list, Hi Marcelo! I have a gtd.org with my projects and next actions as org items. When I'm done with them, I archive, and they go to gtd.org_archive. Sometimes, I create a new org file for a project, to keep notes and other reference material. Let's say I have this in my gtd.org: * Project :project: file://~/org/reference/project.org ** TODO Foo ** TODO Bar Not an answer to your direct question but a comment: I am linking entries in my Org files with IDs: * ProjectA :PROPERTIES: :ID: projA :END: ... will be linked as id:projA and this works in all of my (agenda?) files. You just have to make sure that the ID is unique. I am using datestamps as starting strings so that I only have to make them unique for one day :-) (like: 2012-08-16projA) HTH -- Karl Voit
Re: [O] [ANN] Editable HTML export of Org-mode files
Every time I edited a block and clicked save, it just deleted the whole block. I got these errors in ~/.elnodelogs/elnode-error: I'm not sure what could be causing this problem. Did the test suite run successfully for you? I've now added a POST test to the test suite. So if your problem persists you should now see a failing test, and conversely if you are now passing the test suite this problem should be eliminated. -- Eric Schulte http://cs.unm.edu/~eschulte
Re: [O] [ANN] Editable HTML export of Org-mode files
Hi Eric, Sounds really cool, I'd love to try it out. But when I run (ert org-ehtml) I get errors like Selector: org-ehtml Passed: 0 Failed: 5 (5 unexpected) Total: 5/6 Started at: 2012-08-15 22:00:20-0400 Finished. Finished at: 2012-08-15 22:00:50-0400 FFQFFF F org-ehtml-elnode-serve-all-editable (void-function cl-flet) F org-ehtml-elnode-serve-complex (void-function cl-flet) Q org-ehtml-elnode-serve-simple (quit) F org-ehtml-export-file (void-variable org-export-with-LaTeX-fragments) F org-ehtml-post-request (error Shell command in progress) F org-ehtml-simple-export (void-variable org-export-with-LaTeX-fragments) This is with the git version of org and emacs 24.1.1 Any ideas what I might have missed? Thanks, Ista On Mon, Aug 13, 2012 at 6:28 PM, Eric Schulte eric.schu...@gmx.com wrote: Hi, I've recently put together a web server which runs in Emacs and exports local Org-mode files to HTML in such a way that they may be edited from within a web browser with the edits saved to local files on disk. The code is available from github. repository https://github.com/eschulte/org-ehtml README --- http://eschulte.github.com/org-ehtml This is a very thin Emacs Lisp and JavaScript wrapper around Nic Ferrier's elnode Emacs web server [1], and Nicolas Goaziou's structured Org-mode file representation and export engine. It requires Emacs 24 and the development versions of both Org-mode and elnode. The code is fairly new so there are likely some kinks to be worked out (backup your files before editing them with this web-server), but the implementation is very simple and should be easy to modify. See the README for information on how to make use of elnode's authentication system, or how to have web edits automatically committed to a local version control system. Comments and patches are welcome. Cheers, Footnotes: [1] https://github.com/nicferrier/elnode -- Eric Schulte http://cs.unm.edu/~eschulte
[O] new tag query parser (re)introduction
At Bastien's urging, I'm (re)posting about my new tag query parser implementation in what I hope are clearer, more digestible, and more actionable pieces. My next few posts will be: 1. The motivating issues . 2. Some bugs/limitations in the current parser. 3. The new code and how to use/test it. [code attached] 4. A few illuminating examples. 5. A (very) brief guide to the code. I'll keep them each brief. Please let me know if you have any questions, comments, or problems. The code has been updated a bit from what I posted earlier. The test interface (separate from the main code) has one command to run all the tests and display the results nicely and a command to switch between new and original parsers to make it easier for people to try and compare them. But more on that in Part 3. Thanks for your help. Regards, Christopher
[O] new tag query parser [1/5] -- the motivating issues
My proposed changes in the tag query parser are motivated by the need and/or desire to do the following. (The example strings work with the new parser.) 1. Combine and modify tag queries programmatically. The leading case is that a function is given a tag query string and needs to *exclude* lines matching that query. To do this, we can transform query strings like so: foo+bar+zap/TODO -- -(foo+bar+zap/TODO) foo|bar|zap -- -(foo|bar|zap) The key is that we want to do this programatically while still using the mapping or agenda search command.^* I use this a lot in my GTD layer for org; other combinations and transformations come up as well. 2. Write complex queries as simply as possible (i.e., using parens). Parentheses aren't always necessary, but they can make things nicer. (xyz|{^a}-abc) LEVEL 1 versus xyzLEVEL1|{^a}-abcLEVEL1 3. Make *fast* heading and priority searches That information is *already matched* in the current code but access is not given (or is slow in the case of PRIORITY). LEVEL == 2 HEADING {.*} PRIORITY \A\ 4. Include braces in regular expression matches. +{abc\\{{3,7\\}}} - regex abc\\{3,7\\} {[A-Z]+\\S-+{{template}}.*$} - regex [A-Z]+\\S-+{template}.*$ Because \ escapes are used so heavily in regexex and because strings require doubling them, using additional \'s would be messy, ambiguous, and hard to read. Instead, exploit that we only need to protect {}'s by *doubling* them: {{ - { and }} - }. This is simple, readable, fast, and parity makes correctness clear at a glance.^** 5. Allow spaces in query strings for readability. Not a big deal, but easy. See the above examples 6. Get helpful error messages at parse time when there is a problem. ^* It is of course possible to create a matcher from the string and do the search directly with lower level functions, but that ends up being a clunky solution. ^** The doubling strategy is also familiar from the doubling of \'s in quoted strings.
[O] new tag query parser [2/5] -- some bugs/limitations in the current parser
1. Property names with -'s are not handled properly Specifically, the escapes are not removed. Ex: (org-make-tags-matcher PROP\\-WITH\\-HYPHENS=2) produces (PROP\\-WITH\\-HYPHENS=2 and (progn (setq org-cached-props nil) (= (string-to-number (or (org-cached-entry-get nil PROP\\-WITH\\-HYPHENS) )) 2)) t) The property name in the matcher should be PROP-WITH-HYPHENS. The original code /does/ instead remove -'s from tag names, which shouldn't have them anyway. I suspect that this was intended for property names rather than tag names. 2. Incorrect comparison operators allowed, produce bad matchers. The regular expression [=]\\{1,2\\} is used to detect the comparison operators. But this can produce bad matchers that fail opaquely at match time rather than giving an appropriate error message at parse time. Ex: (org-make-tags-matcher P2) produces (P2 and (progn (setq org-cached-props nil) (nil (string-to-number (or (org-cached-entry-get nil P) )) 2)) t) 3. A faulty test for todo matcher in org-make-tags-matcher The current code uses (string-match /+ match) to detect the presence of the shortcut /!? style todo matchers. But this is insufficient. Ex: (org-make-tags-matcher PROP={^\\s-*// .*$}) produces an erroneous matcher: (PROP={^\\s-*// .*$} progn (setq org-cached-props nil) (member PROP tags-list)) We want to find the first slash that is not enclosed in {}'s or 's; if found, a todo match is needed. A simple pattern will not be enough for this. As a side note, org allows arbitrary characters in TODO keywords, (For instance, both PROP={/!} and PROP=/!{/!} are valid TODO keywords (it works!) *and* valid property comparisons.) The assumption of the current version is that {}'s and 's are excluded. I also exclude ()'s from TODO keywords in the new version for reasons we can discuss later. Neither seems like a big loss. If you are using {}'s, 's, or ()'s in your TODO keywords, use a TODO= match rather than a /!? match. 4. Regexp matchers in todo queries fail when no TODO for an item. Ex: (org-make-tags-matcher /{\\S-}) produces (/{\\S-} and t (string-match \\S- todo)) This will raise an error when todo is nil (no todo keyword on a scanned item) when doing an org-map-entries, say. The todo should be replaced with a (or todo ) as it is for tag-style TODO queries. 5. A minor consistency issue At line 7179 in org.el (v 7.8.11), missing an org-re call in a regex that uses posix classes. The org-re is used elsewhere, for xemacs compatibility, I think. [FWIW, all of these are problems eliminated or made moot in the new parser.]
[O] new tag query parser [4/5] -- a few ``illuminating'' examples
#+TITLE: New Tag Query Parser: A Few Illuminating Examples This post is structured as an org file with the example commands listed within. Copy this to a buffer and try the commands below on that buffer. * Preliminaries Point 207 The Point # labels on the headings give the point values for the beginning of the heading. To make this accurate, we need to standardize tag placemnet. Using M-: or equivalent means, execute the following in this buffer: #+begin_src emacs-lisp (set (make-local-variable 'org-tags-column) -80) (set (make-local-variable 'org-todo-keywords) '((sequence TODO WAIT DONE))) #+end_src If necessary, do C-u C-c on a headline to realign the tags. * Parenthesized Expressions Point 714 :feature: Fully parenthesized expressions are allowed in the tag query strings. A - selector before the parenthesized expression acts as a logical not. These expressions can include an old-style /!? todo-query string as well, which extends to the closing paren. ** TODO Paren Examples Point 1057 :example:paren: + (org-map-entries 'point (exampleHEADING={^Paren}/TODO)) + (org-map-entries 'point HEADING={Paren} -(extra | LEVEL = 1)) + (org-map-entries 'point (feature | LEVEL == 2)({^p}/WAIT|TODO)) The first two should give 1057, the third (1057 1492). * Another Point 1411 :extra: ** WAIT This is not a feature example Point 1492 :pretend: ** We can manipulate and combine whole expressions Point 1573 + (org-map-entries 'point -(featureLEVEL=2)) + (org-map-entries 'point -(feature|LEVEL==2)|{^$}) Note that inheritance can affects the tag matches; it might be nice to be able to distinguish this in searches. Note also that the original matcher fails silently here. * Braces and Spaces AAA Point 1921 :feature: ** DONE Just a marker AA Point 2002 ** TODO Simple Examples Point 2042 :example:syntax: + (org-map-entries 'point example TODO \DONE\) + (org-map-entries 'point example/!) + (org-map-entries 'point example | HEADING = { A\\{{3,4\\}}[^A]}) + Allows = or == for equality operator. ** [#A] Ok Point 2338 ** [#B] This is fast Point 2360 + (org-map-entries 'point PRIORITY=\B\) Many more examples are available in the test suite. Do C-u M-x run-tag-query-tests to see them.
[O] new tag query parser [5/5] -- a (very) brief guide to the code
A few comments that might help navigate the new parser code in org-tag-query-parse.el. All diffs are relative to the 7.8.11 org.el. Let me know if you have any questions. * High Level Changes Two existing org functions are altered: 1. org-make-tags-matcher 2. org-scan-tags The changes to the latter are minor, only defining two new let-bindings to capture information already grabbed, and a slightly modified regex. A unified diff between the new and old org-scan-tags is given in the comments preceding the function in the new code. * Low Level Entry Points 1. org-tag-query-parse -- the workhorse function 2. org-todo-query-parse -- handles /!? style todo components Tag style and /!? todo style queries are handled in a unified way; org-tag-query-parse delegates the latter to org-todo-query-parse but manages the overall parsing. Note that /!? style matches must either end the query string or end the current parenthesized expression. For instance, -(foo+bar/!{^T}-TODO)|LEVEL==5 is a valid query. * Utilities 1. org-match-cond 2. org-read-balanced-string 3. org-read-quoted-string-in-query 4. org-tquery-error 5. org-defhash-at-compile The first is a macro that lets the parser be expressed in very readable terms. It does much of its work at compile-time, and produces code that is optimized in several ways. This makes it beneficial to byte-compile org-tag-query-parse.el. The second and third parse delimited strings, the first with balanced delimiters and doubling for escape, the second using standard string semantics. The fourth handles errors, giving useful information in messages. The fifth is a macro that makes it pleasant to define literal hash tables that will be defined at both compile and load time. See examples of use in the code.
Re: [O] full parser implementation for tag queries (parentheses, fast heading match, and more)
You have really dived into this. I think it's excellent to allow more flexibility in searches. Just a brainstorm question, but having just modified the code, how difficult do you think it would be to provide a sexp syntax? Despite all of your obvious hard work, I'd find sexp easier to look up, make sense of, and remember. I favor identifiers-like-this over single-character symbols, and (expressions (like this)) over precedence rules. Maybe just me though. :) Samuel -- The Kafka Pandemic: http://thekafkapandemic.blogspot.com
Re: [O] [ANN] Editable HTML export of Org-mode files
On Thu, Aug 16 2012, Eric Schulte wrote: Every time I edited a block and clicked save, it just deleted the whole block. I got these errors in ~/.elnodelogs/elnode-error: I'm not sure what could be causing this problem. Did the test suite run successfully for you? I've now added a POST test to the test suite. So if your problem persists you should now see a failing test, and conversely if you are now passing the test suite this problem should be eliminated. So yes, I did run the tests the first time, and you're right that, without the post test, they went just fine. The documents were also altered on-disk (ie, the chunks really were deleted). I updated org-ehtml to get the new tests, and the post test failed thusly: --8---cut here---start-8--- F org-ehtml-post-request (ert-test-failed ((should (string-match ifoo/i html)) :form (string-match ifoo/i #(\npemfoo/em\n/p 0 17 (fontified t front-sticky (field inhibit-line-move-field-capture) rear-nonsticky t field output inhibit-line-move-field-capture t) 17 21 (fontified t front-sticky (field inhibit-line-move-field-capture) rear-nonsticky t field output inhibit-line-move-field-capture t))) :value nil)) --8---cut here---end---8--- This is still with my regular emacs environment. Then I restarted emacs -Q and used your batch.el file. I'm still getting the same problem, unfortunately: the editable blocks disappear when I hit save. I realized I don't actually know whether this is supposed to edit the simple.org or simple.html files: anyway, the text disappears from the org file, but not from the html file. Here's the output of *Messages*: --8---cut here---start-8--- For information about GNU Emacs and the GNU system, type C-h C-a. Mark set [2 times] deleting server process Added to /home/eric/.elnodelogs/elnode-error found the server process - NOT deleting Added to /home/eric/.elnodelogs/elnode-error -start-relevant-output- Added to /home/eric/.elnodelogs/elnode-error [5 times] Added to /home/eric/.elnodelogs/org-ehtml Added to /home/eric/.elnodelogs/elnode-error [11 times] Added to /home/eric/.elnodelogs/org-ehtml Added to /home/eric/.elnodelogs/elnode-error [9 times] Added to /home/eric/.elnodelogs/org-ehtml OVERVIEW Loading vc-git...done Saving file /home/eric/.emacs.d/org-ehtml/test/examples/simple.org... Wrote /home/eric/.emacs.d/org-ehtml/test/examples/simple.org Added to /home/eric/.elnodelogs/elnode-error Saving file /tmp/org-22133iXI... Wrote /tmp/org-22133iXI OVERVIEW Exporting... [2 times] HTML export done, pushed to kill ring and clipboard Added to /home/eric/.elnodelogs/elnode-error [8 times] Added to /home/eric/.elnodelogs/org-ehtml OVERVIEW Saving file /home/eric/.emacs.d/org-ehtml/test/examples/simple.org... Wrote /home/eric/.emacs.d/org-ehtml/test/examples/simple.org Added to /home/eric/.elnodelogs/elnode-error Saving file /tmp/org-22133vhO... Wrote /tmp/org-22133vhO Exporting... [2 times] HTML export done, pushed to kill ring and clipboard Added to /home/eric/.elnodelogs/elnode-error [5 times] Making completion list... deleting server process ; here I called (elnode-stop ) explicitly) Added to /home/eric/.elnodelogs/elnode-error found the server process - NOT deleting Added to /home/eric/.elnodelogs/elnode-error nil --8---cut here---end---8--- And the elnode error file: --8---cut here---start-8--- 20120816123716: elnode--sentinel 'deleted.' for process *elnode-webserver-proc* with buffer *elnode-webserver* 20120816123716: Elnode server stopped 20120816123751: elnode--sentinel 'open from 127.0.0.1.' for process *elnode-webserver-proc* 127.0.0.1:41647 with buffer nil 20120816123751: Elnode status: *elnode-webserver-proc* 127.0.0.1:41647 open from 127.0.0.1 20120816123751: elnode--sentinel 'open from 127.0.0.1.' for process *elnode-webserver-proc* 127.0.0.1:41649 with buffer nil 20120816123752: Elnode status: *elnode-webserver-proc* 127.0.0.1:41649 open from 127.0.0.1 20120816123752: filter: calling handler on *elnode-webserver-proc* 127.0.0.1:41647 20120816123752: starting HTTP response on *elnode-webserver-proc* 127.0.0.1:41647 20120816123752: Elnode-child-process init *elnode-webserver-proc* 127.0.0.1:41647 20120816123752: filter: handler returned on *elnode-webserver-proc* 127.0.0.1:41647 20120816123752: Elnode-child-process-filter http state: open data length: 4096 on *elnode-webserver-proc* 127.0.0.1:41647 20120816123752: Elnode-child-process-filter http state: open data length: 4096 on *elnode-webserver-proc* 127.0.0.1:41647