Re: [O] Data loss when working with agenda + x
Hello, Samuel Wales writes: > e.g. make changes in agenda then undo in the outline. undos are bunched up. > at least with undo-tree and org maint on 24.4. hm, interesting. But no undo here. In my first posting I said that I worked with the agenda and edited Org files directly. For the last event it is most likely that I manipulated (some of) the files only via the agenda view. Regards hmw
Re: [O] Data loss when working with agenda + x
e.g. make changes in agenda then undo in the outline. undos are bunched up. at least with undo-tree and org maint on 24.4.
Re: [O] Data loss when working with agenda + x
you can get data loss if you mix agenda and outline actions and undoes. On 8/24/16, Michael Welle wrote: > Hello, > > several times I experienced data loss when working with the agenda and > doing something else then, which is yet unknown. -- The Kafka Pandemic: http://thekafkapandemic.blogspot.com The disease DOES progress. MANY people have died from it. And ANYBODY can get it. Denmark: free Karina Hansen NOW.
[O] editing header at boh edits link
* [[link][label]] c-a insert text edits label my expectation was would insert header text to edit label i expected to do c-a right left or so maint -- The Kafka Pandemic: http://thekafkapandemic.blogspot.com The disease DOES progress. MANY people have died from it. And ANYBODY can get it. Denmark: free Karina Hansen NOW.
Re: [O] Capture template for datetree under existing headline
Hi Peter, Peter Sterner writes: > I want to have a capture template that generates a datetree under an > existing headline in an org file with existing headlines. I tried this: > > ("j" "Journal" entry (file+datetree "~/workspace/org/notes.org" "Journal") > "* %?\n Added %U\n %i\n%a") > > I tried creating the Journal headline before capturing. But org-mode > generates a 2016 headline not placed under Journal. This seems to work, by making a new capture target called 'file+headline+datetree'. Capture template: ("j" "Journal" entry (file+headline+datetree "~/workspace/org/notes.org" "Journal") Patch: diff --git a/lisp/org-capture.el b/lisp/org-capture.el index a89d171..1826d3e 100644 --- a/lisp/org-capture.el +++ b/lisp/org-capture.el @@ -923,6 +923,40 @@ Store them in the capture property list." (setq target-entry-p (and (derived-mode-p 'org-mode) (org-at-heading-p (error "No match for target regexp in file %s" (nth 1 target + ((eq (car target) 'file+headline+datetree) + ;; copied from sexp for file+headline + (set-buffer (org-capture-target-buffer (nth 1 target))) + (org-capture-put-target-region-and-position) + (widen) + (let ((hd (nth 2 target))) + (goto-char (point-min)) + (unless (derived-mode-p 'org-mode) + (error +"Target buffer \"%s\" for file+headline+datetree should be in Org mode" +(current-buffer))) + (if (re-search-forward + (format org-complex-heading-regexp-format (regexp-quote hd)) + nil t) + (goto-char (point-at-bol)) + (goto-char (point-max)) + (or (bolp) (insert "\n")) + (insert "* " hd "\n") + (beginning-of-line 0))) + (org-narrow-to-subtree) + (org-show-subtree) + ;; copied from the sexp for file+datetree + (funcall +#'org-datetree-find-date-create +(calendar-gregorian-from-absolute + (cond + (org-overriding-default-time + ;; use the overriding default time + (time-to-days org-overriding-default-time)) + (t + ;; current date, possibly corrected for late night workers + (org-today +'restrict)) + ((memq (car target) '(file+datetree file+datetree+prompt file+weektree file+weektree+prompt)) (require 'org-datetree) (set-buffer (org-capture-target-buffer (nth 1 target))) This results in: * Journal * 2016 unless the following property is set: * Journal :PROPERTIES: :DATE_TREE: :END: ** 2016 An improvement might be to prompt for the headline to put the datetree under. It might have been possible to do this as a 'function' target. Myles
Re: [O] Add org-bookmark-heading to Org proper?
Hello, Adam Porter writes: > I think I see what you mean, but at the same time, it seems like an > Org-specific feature since it calls org-tree-to-indirect-buffer. I > guess I think of Org as building on core Emacs features, so putting an > Org-specific feature in core bookmark.el seems...backwards? (Though I'm > not sure that's what you meant...) I'm not saying that Bookmark should call `org-tree-to-indirect-buffer', but provide a way for major modes to specify a jump function. In any way, you are right, it already exists through the `handler' mechanism. > That hook idea sounds interesting, but I'm not sure I understand how it > would be different than the built-in bookmark-handler feature. There is only one handler per major mode. Providing a "-function" (or a "-hook", it depends if it extends a default feature or replace it) variable could allow users to add their own "view" function (`org-tree-to-indirect-buffer' in your case, but not limited to it). > Or maybe something like an org-bookmark-jump-hook could be added to call > other functions after jumping to an Org bookmark. I guess this is what > you meant, I just had to talk myself through it. :) This is what I meant. > I went by the docstring for bookmark-make-record-function, which says > that modes can set it buffer-locally for locations that should be > treated specially, and that the function called should return a record > according to bookmark-alist. I guess the setters are intended for > modifying existing bookmarks...? It makes sense, indeed. Regards, -- Nicolas Goaziou
Re: [O] Data loss when working with agenda + x
Hello, Michael Welle writes: > Hello, > > happened again today. This time changes I made yesterday are gone this > morning (the changes are still in the backup file) or more precise, I I should get the terminology straight and add that by 'backup file' I mean auto-save file (this #.*#, not this .*~). Regards hmw