Re: [O] Bug: Org column view, property edit bug [7.8.11]
Nicolas Goaziou [2012-10-16 22:19:40 +0200] wrote: > Teemu Likonen writes: >> Org's column view has "e" key for editing fields such as property >> values. Properties are messed up if user tries to clear the >> property's value with "e". See the following example. >> Package: Org-mode version 7.8.11 > Thanks for the report. > > For what it's worth, though, I cannot reproduce it on Org mode 7.9.2. I'm sorry for being lazy and not trying the newest version before reporting this bug. I installed the latest version from Git repository's "master" branch. Indeed, it seems that this bug is gone. Thanks.
[O] Select a region and archive
I am trying to select a region and archive it. At the moment it only archives where the cursor is. This is what I am doing: - select a region - ctrl- and C-e to go the end of the line. - archive - C-c C-x C-x Thanks.
Re: [O] [BUG] [ODT] ODT export (old) fails with wrong-type-argument
On 10/16/12 10:25 AM, Christian Moe wrote: Hi, When I try to export to ODT (without invoking the new exporter or anything), I get: OpenDocument export failed: Wrong type argument: stringp, (org-export-odt-preprocess-latex-fragments) Hi again, Actually, this only happens on export-to-odt-and-open. The file is exported just fine, but org-lparse-and-open fails to locate the exported file and open it. I've had a look at the code, but failed to nail down the reason. Yours, Christian
[O] Patch: org-agenda-skip-deadline-prewarning-if-scheduled prior to scheduled date
Hi, I have scratched an itch: I would like not to be bothered with TODOs that have a scheduled date in the future. However, as of that scheduled date I would like their deadline prewarnings to appear in the agenda, just like non-scheduled TODOs. I do not see how to achieve this behavior using the existing org-mode facilities (I run the org shipped with Emacs 24.2.1). I solved this by adding an option to org-agenda-skip-deadline-prewarning-if-scheduled that behaves like setting it to an integer value (custom deadline warning lead time), but sets it to the number of days between scheduled and deadline dates. As a result, deadline warnings prior to the scheduled date are eliminated. I attach two diffs: presched-24.2.1.diff reflects the change against org-agenda.el from Emacs 24.2.1 I developed and tested; presched-latest.diff (almost identical) reflects the same change against today's org-agenda.el from the org-mode git. The latter is untested, but I'm fairly confident it works since the changes are very localized and do not appear to interact with differences between the two original org-agenda.els. Please review the patch carefully: - In org-agenda-get-deadlines, I moved the relevant form ("(setq suppress-prewarning ...)") down into the middle of a long (setq ...) because it builds on values computed above and provides values used below. - I split the long (setq ...) into three separate (setq ...)s for readability because all other assignments are compact while this one is long and complex. - Because of this complexity I added some comments which hopefully makes things readable. However, a more experienced lisp programmer may be able to rewrite the code such that it is crystal clear even without comments. - Instead of the lead-time logic described above, a different way to achieve a similar effect would be to add a condition that checks whether the scheduled date is in the future, in which case the prewarning is removed unconditionally. This would presumably be done by setting suppress-prewarning to 0. I have not tried to implement this. As far as I can see, this would likewise involve computing the difference between two dates, and the resulting code would be of about the same complexity, but setting the max. lead to the scheduled date (instead of to 0) appears more sound to me. Here's a suggested commit message: org-agenda: New option: skip deadline prewarning if scheduled in the future * lisp/org-agenda.el (org-agenda-skip-deadline-prewarning-if-scheduled): Add an option to skip the deadline prewarning if the scheduled date is in the future. Comments? Justus --- org-agenda-24.2.1.el 2012-09-08 23:58:12.0 +0200 +++ org-agenda-24.2.1-presched.el 2012-10-17 09:12:01.020184803 +0200 @@ -789,9 +789,10 @@ This will apply on all days where a prewarning for the deadline would be shown, but not at the day when the entry is actually due. On that day, the deadline will be shown anyway. -This variable may be set to nil, t, or a number which will then give -the number of days before the actual deadline when the prewarnings -should resume. +This variable may be set to nil, t, the symbol `pre-scheduled', +or a number which will then give the number of days before the actual +deadline when the prewarnings should resume. The symbol `pre-scheduled' +eliminates the deadline prewarning only prior to the scheduled date. This can be used in a workflow where the first showing of the deadline will trigger you to schedule it, and then you don't want to be reminded of it because you will take care of it on the day when scheduled." @@ -800,6 +801,7 @@ :version "24.1" :type '(choice (const :tag "Alwas show prewarning" nil) + (const :tag "Remove prewarning prior to scheduled date" pre-scheduled) (const :tag "Remove prewarning if entry is scheduled" t) (integer :tag "Restart prewarning N days before deadline"))) @@ -5206,23 +5208,13 @@ (regexp org-deadline-time-regexp) (todayp (org-agenda-todayp date)) ; DATE bound by calendar (d1 (calendar-absolute-from-gregorian date)) ; DATE bound by calendar - d2 diff dfrac wdays pos pos1 category org-category-pos + ds d2 diff dfrac wdays pos pos1 category org-category-pos tags suppress-prewarning ee txt head face s todo-state show-all upcomingp donep timestr) (goto-char (point-min)) (while (re-search-forward regexp nil t) - (setq suppress-prewarning nil) (catch :skip (org-agenda-skip) - (when (and org-agenda-skip-deadline-prewarning-if-scheduled - (save-match-data - (string-match org-scheduled-time-regexp - (buffer-substring (point-at-bol) - (point-at-eol) - (setq suppress-prewarning - (if (integerp org-agenda-skip-deadline-prewarning-if-scheduled) - org-agenda-skip-deadline-prewarning-if-scheduled - 0))) (setq s (match-string 1) txt nil pos (1- (match-beginning 1)) @@ -5233,8 +5225,31 @@ d2
Re: [O] #+LATEX_CLASS: IEEEtran
Dear Dokos, It is working perfectly. Thank you very much for your incessant helps. - *Sanjib Sikder *Ph.D. Fellow Chemical Engineering IIT Bombay* * On Tue, Oct 16, 2012 at 3:51 PM, Nick Dokos wrote: > Sanjib Sikder wrote: > > > Hi, Dokos, > > > > Thanks again. > > > > After incorporating those lines, I am getting following error. > > > > File error: Cannot open load file, org-e-latex > > > > If it is complex (as I am new in orgmode), then I will go for normal > latex instead of orgmode for > > this particular task as I have a template for IEEEtran but I would love > to do the job in orgmode. > > > > Eagerly waiting for your comments > > > > Two options: > > o if you are not going to use the new exporter, just delete the two lines: > > (require 'org-e-latex) > (add-to-list 'org-e-latex-classes ieeetran-class t) > > o alternatively, teach emacs where to find org-e-latex by augmenting the > load-path: > > (add-to-list 'load-path "/path/to/org/mode/contrib/lisp") > > This needs to be done before the (require 'org-e-latex) and of course, > the path needs to be modified for your particular setup. > > Nick >
Re: [O] org-end-of-line
Hello Nicolas, Nicolas Goaziou wrote: > "Sebastien Vauban" writes: > >> When pressing `C-e' to go to the last char of a looong sentence, such as: >> >> azroiu zrouz eruzepr ozeioru zoepru >> zoeruozieuriozerusdjflsdfjsdksjfsdfs df sdjf sdf sdsd fklsdjf sdj >> sdjlksdjf sqfjsdjf sdfklsjdjsdsdjlkmskfjsldkjfsdjfoizeoi xcsdf zerfze >> ze rrz zer ze sdf sd d g erg ry er fscvf dsr yh yt re gfsd f er gt z'y >> reg er fsd cf,sk jfshfsdc kle eozifsdnc sslk kzdjf dsl jfsdljf sdilkj >> fzefoizejfsdlkf sklqjfoiezrfoi >> >> it goes up to the last char of the visual line, would that line be truncated. >> >> In every other mode I've looked at (Message, Emacs Lisp, etc.), `C-e' does go >> to the end of the physical line, _with the same untouched settings_ for >> `line-move-visual' (set to `t' in `simple.el'). >> >> Why does Org behave differently? See line 21613 in org.el: > > It should be fixed. Thanks for the report. It works like a charm. Thanks! Best regards, Seb -- Sebastien Vauban
Re: [O] latex export: document fails to compile
Hello, asdfsadfmcxd...@safe-mail.net writes: > create a new empty org-mode file containing this text > > * test > $\text{asdf}$ > > export to latex, build pdf from tex > > error > > ERROR: Undefined control sequence. > > --- TeX said --- > \text > > l.38 $\text >{asdf}$ IIRC, \text command is defined in amsmath package. Do you require it in your header? Regards, -- Nicolas Goaziou
Re: [O] Patch: org-agenda-skip-deadline-prewarning-if-scheduled prior to scheduled date
Hello, justus-...@piater.name writes: > I would like not to be bothered with TODOs that have a scheduled date in > the future. However, as of that scheduled date I would like their > deadline prewarnings to appear in the agenda, just like non-scheduled > TODOs. I do not see how to achieve this behavior using the existing > org-mode facilities (I run the org shipped with Emacs 24.2.1). I'm not sure if that's already possible either. Could someone confirm it isn't? > Here's a suggested commit message: > > org-agenda: New option: skip deadline prewarning if scheduled in the future > > * lisp/org-agenda.el (org-agenda-skip-deadline-prewarning-if-scheduled): > Add an option to skip the deadline prewarning if the scheduled date is > in the future. > > Comments? Since you provide both the patch and the commit message, what about providing it completely as an attachement (with i.e. git format-patch)? A few minor comments about the code. > - d2 diff dfrac wdays pos pos1 category category-pos level > + ds d2 diff dfrac wdays pos pos1 category category-pos level I wouldn't define the "ds" variable here, since it's local to suppress-prewarning computation. It's clearer to let-bind it around the (if (and org-agenda-skip-deadline-prewarning-if-scheduled )). > + (setq ds (save-match-data > + (if (string-match > + org-scheduled-time-regexp item) > + (match-string 1 item)) Since it is setq'ed only once, it can be let-bound. Also, about style: (if (string-match org-scheduled-time-regexp item) (match-string 1 item)) => (and (string-match org-scheduled-time-regexp item) (match-string 1 item)) > + ;; If prewarnings of scheduled items are to be skipped > + ;;and the current item has a scheduled date (in ds), > + ;; calculate prewarning lead time: Small mistake in comments indentation. > + (if (integerp > +org-agenda-skip-deadline-prewarning-if-scheduled) > + ;; use prewarning-restart lead time: Please capitalize comments and end them with a period. > + org-agenda-skip-deadline-prewarning-if-scheduled > + (if (eq org-agenda-skip-deadline-prewarning-if-scheduled > + 'pre-scheduled) > + ;; show first prewarning no earlier than scheduled date: Ditto. > + (min (- d2 (org-time-string-to-absolute > + ds d1 'past show-all (current-buffer) pos)) > + org-deadline-warning-days) > + ;; set prewarning to deadline: Ditto. Also, since your contribution is more than 20 lines long, did you sign the FSF papers? Thanks for your work. Regards, -- Nicolas Goaziou
[O] Patch: HTML body onload/onunload attribute support for new exporter
Hallo, I created a patch for the new exporter, so I can adding onload and onunload attributes to the body tag in HTML export. I'm rather new to emacs lisp, please check if this is to be included in org-mode. Best regards Robert -- Robert Klein - Max Planck-Institut für Polymerforschung Ackermannweg 10 55128 Mainz diff --git a/contrib/lisp/org-e-html.el b/contrib/lisp/org-e-html.el index fcdf006..78582a5 100644 --- a/contrib/lisp/org-e-html.el +++ b/contrib/lisp/org-e-html.el @@ -132,7 +132,9 @@ (:html-table-tag nil nil org-e-html-table-tag) (:xml-declaration nil nil org-e-html-xml-declaration) (:LaTeX-fragments nil "LaTeX" org-export-with-LaTeX-fragments) - (:mathjax "MATHJAX" nil "" space))) + (:mathjax "MATHJAX" nil "" space) + (:html-body-onload nil nil org-e-html-body-onload) + (:html-body-onunload nil nil org-e-html-body-onunload))) @@ -996,6 +998,33 @@ CSS classes, then this prefix can be very useful." :type 'string) + Template :: body-onload + +(defcustom org-e-html-body-onload nil + "Additional onload attribute for HTML body tags. +The value of this variable is inserted in a onload attribute of +the body tag in the HTML buffer. Use this variable to include +script code to be executed after loading the HTML page." + :group 'org-export-e-html + :type '(choice + (const :tag "No preamble" nil) + ((string ) :tag "Custom string"))) + + + Template :: body-onunload + +(defcustom org-e-html-body-onunload nil + "Additional onunload attribute for HTML body tags. +The value of this variable is inserted in a onunload attribute of +the body tag in the HTML buffer. Use this variable to include +script code to be executed when leaving the HTML page." + :group 'org-export-e-html + :type '(choice + (const :tag "No preamble" nil) + ((string ) :tag "Custom string"))) + + + ;;; Internal Functions @@ -1422,7 +1451,16 @@ holding export options." (org-e-html--build-style info) (org-e-html--build-mathjax-config info) "\n" - "\n" + "\n" (let ((link-up (org-trim (plist-get info :link-up))) (link-home (org-trim (plist-get info :link-home (unless (and (string= link-up "") (string= link-up ""))
Re: [O] Patch: HTML body onload/onunload attribute support for new exporter
Hello, Robert Klein writes: > I created a patch for the new exporter, so I can adding onload and > onunload attributes to the body tag in HTML export. > > > I'm rather new to emacs lisp, please check if this is to be included > in org-mode. Before reviewing the patch, I'd like to know if the onload and onunload attributes are common enough to justify the creation of a variable. Indeed, it's already quite easy to achieve the same using personal filters. I.e.: #+begin_src emacs-lisp (defun my-html-body-onload-filter (output backend info) "Add my onload attribute to tag, if any." (when (and (eq backend 'e-html) (string-match "\n" output)) (replace-match "\n" nil nil output))) (add-to-list 'org-export-filter-final-output-functions 'my-html-body-onload-filter) #+end_src If you think it's still worth adding variables in order to make it a tad bit easier, I'll review the patch. Thanks for your work. Regards, -- Nicolas Goaziou
Re: [O] Patch: org-agenda-skip-deadline-prewarning-if-scheduled prior to scheduled date
Nicolas, Many thanks for your comments, I will heed them all. But first one more request for comments that I forgot to include in my original message: Computing the difference between two dates in the presence of repeating dates is a subtle affair. Here, in computing the difference between deadline (d2) and scheduled date (ds), (min (- d2 (org-time-string-to-absolute ds d1 'past show-all (current-buffer) pos)) org-deadline-warning-days) I simply followed the time-to-deadline computation of the current TODO item from a few lines above: (setq ... d2 (org-time-string-to-absolute (match-string 1) d1 'past show-all (current-buffer) pos) diff (- d2 d1)) I sort-of see what this org-time-string-to-absolute call does, but I do not fully understand its implications. It would be good for someone who does to verify that my code indeed rightly follows the same logic. It appears to work for me with various repeating and non-repeating TODOs with dates in past and future, but I certainly did not exhaustively test all possible combinations of sensible and nonsensical combinations of non/repeating scheduled and deadline dates, show-all, and so on. Cheers, Justus -- Intelligent and Interactive Systems https://iis.uibk.ac.at/ Institute of Computer Science, University of Innsbruck, Austria
Re: [O] [PATCH] Babel: add results value support to Scala
Hi, Could someone please review this patch? On Oct 15, 2012 4:39 PM, "Asrail" wrote: > * lisp/ob-scala.el (org-babel-scala-wrapper-method): Use an scala > block enclosing the submitted code > > The string representing an well formed block was not an Scala > code. I put the string from the user into an block, surrounded by an > call to replace the default output stream. >
Re: [O] [PATCH] Babel: add results value support to Scala
Asrail writes: > * lisp/ob-scala.el (org-babel-scala-wrapper-method): Use an scala > block enclosing the submitted code > > The string representing an well formed block was not an Scala > code. I put the string from the user into an block, surrounded by an > call to replace the default output stream. > Hi Asrail, Perhaps you can contact the author of ob-scala (Andrzej Lichnerowicz) directly if he is not reading the mailing list every day. Best, -- Eric Schulte http://cs.unm.edu/~eschulte
Re: [O] #+LATEX_CLASS: IEEEtran
Sanjib Sikder wrote: > It is working perfectly. > > Thank you very much for your incessant helps. > :-) You are welcome.
Re: [O] [new exporter] latex: why does {{}} become \{\{\}\} ?
Hello, "Sebastien Vauban" writes: > Hello Nicolas, > > Nicolas Goaziou wrote: >> "Myles English" >> writes: >> >>> Can anyone tell me please why (in the examples below) {} exports fine >>> but {{}} exports as \{\{\}\} ? Am I meant to wrap these in >>> #+begin_latex blocks? >> >> You're writing LaTeX code in an Org buffer. This is only possible to >> a limited extent. In particular, these lines should indeed go within >> a LaTeX block. > > Within a LaTeX block (#+begin_latex) or within a Babel block for LaTeX > language (#+begin_src latex)? Do you make a difference? There's a big difference. #+begin_latex means "paste this code unmodified in the latex back-end, and only in the latex back-end". Nothing is evaluated. With a #+begin_src latex block, depending on :exports parameter, you can produce something (in this case, probably an image file) and create a link valid in any back-end, as long as it supports the file format. Both are possible. Regards, -- Nicolas Goaziou
[O] org back up
Hi, I wanted to set a cron job for backing up all my org files as suggested by Suvayu Ali. #!/bin/bash mkdir -p ~/org/backup && \ find $HOME -type f -name '*\.org' ! -path "$HOME/org/backup/*" \ -exec cp -t ~/org/backup/ \{\} \; In Ubuntu I have put the bash file in cron.daily but it seems it is not working. A little googling says I need to give full path for directories. may I modify it like this ? I am not sure about the "find $HOME" part and guess rest of the paths are correct. #!/bin/bash mkdir -p /home/USERNAME/org/backup && \ find $HOME -type f -name '*\.org' ! -path "/home/USERNAME/org/backup/*" \ -exec cp -t /home/USERNAME/org/backup/ \{\} \; Can anybody confirm the correctness of this code? Thanks - *Sanjib Sikder *Ph.D. Fellow Chemical Engineering IIT Bombay* *
Re: [O] Error reloading Org features
Thomas S. Dye writes: > Then, reloading Org mode: > ... > Loading /Users/dk/.emacs.d/src/org-mode/lisp/ob-tangle...done > Loading /Users/dk/.emacs.d/src/org-mode/contrib/babel/langs/ob-tcl.el > (source)...done > Had to fall back onto load-path, something is not quite right... > ... > Loading /Users/dk/.emacs.d/src/org-mode/lisp/org...done > Some error occured while reloading Org features > (ob-tcl) > Please check *Messages*! > > I searched the list for this and didn't find anything, but I haven't > been paying close attention to the discussions of the current > configuration issues, so I might have missed it. I've changed org-reload to not report a (possible) error in this case. However since the fallback to load-path might still be problematic if load-path shadows exist, all features that are not in the org or contrib directories will be reported (only in *Messages*) so that they are more easily found and checked if necessary. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ SD adaptation for Waldorf microQ V2.22R2: http://Synth.Stromeko.net/Downloads.html#WaldorfSDada
Re: [O] org back up
Sanjib Sikder [2012-10-17 23:55:12 +0530] wrote: > #!/bin/bash > > mkdir -p /home/USERNAME/org/backup && \ > find $HOME -type f -name '*\.org' ! -path "/home/USERNAME/org/backup/*" \ > -exec cp -t /home/USERNAME/org/backup/ \{\} \; How about this: #!/bin/sh target=$HOME/org/backup mkdir -p "$target" && \ find "$HOME" -type f -name '*.org' ! -path "$target/*" \ -exec cp -t "$target" {} +
Re: [O] org back up
Hi, No it is not working. I copied the code in the backup.sh file and put into /etc/cron.hourly --- #!/bin/sh target=$HOME/org/backupOrg mkdir -p "$target" && \ find "$HOME" -type f -name '*.org' ! -path "$target/*" \ -exec cp -t "$target" {} + echo "Daily Org Files Backup Successful: $(date)" >> /home/USERNAME/mybackupOrg.log --- And then changed the crontab hourly setting to 26. /etc/crontab # m h dom mon dow usercommand 26 ** * *rootcd / && run-parts --report /etc/cron.hourly --- Even after 26th minute, there is no sign of the code in work. Is it that $HOME is not allowed and I need to give full path ? Thanks - *Sanjib Sikder *Ph.D. Fellow Chemical Engineering IIT Bombay* * On Thu, Oct 18, 2012 at 12:11 AM, Teemu Likonen wrote: > Sanjib Sikder [2012-10-17 23:55:12 +0530] wrote: > > > #!/bin/bash > > > > mkdir -p /home/USERNAME/org/backup && \ > > find $HOME -type f -name '*\.org' ! -path "/home/USERNAME/org/backup/*" \ > > -exec cp -t /home/USERNAME/org/backup/ \{\} \; > > How about this: > > > #!/bin/sh > > target=$HOME/org/backup > mkdir -p "$target" && \ > find "$HOME" -type f -name '*.org' ! -path "$target/*" \ > -exec cp -t "$target" {} + >
Re: [O] org back up
Sanjib Sikder [2012-10-18 00:32:00 +0530] wrote: > Even after 26th minute, there is no sign of the code in work. Is it that > $HOME is not allowed and I need to give full path ? Ah, I thought that you'd run it from your personal crontab. So yes, write paths from root's point of view.
Re: [O] org back up
Sanjib Sikder writes: > I wanted to set a cron job for backing up all my org files as > suggested by Suvayu Ali. Please don't. If you consider this a viable backup strategy, you might just as well have no backup at all. You should use a VCS like Git to be able to revert to an earlier version of your files. If necessary, make Org a sub-project (that's specific to Git of course) so that not only your files but also Org will move back in time when you request that. Defending against loss of data is only really possible if you copy them to a different medium in a different location. Again, Git would help you do that by allowing you to use a remote repository on some server you can access. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Factory and User Sound Singles for Waldorf Blofeld: http://Synth.Stromeko.net/Downloads.html#WaldorfSounds
Re: [O] org back up
Hi, I do not find personal crontab file. how do I create it ? crontab -e says my personal file is not there If I want to run it as root then how do modify the following code as it is nor working .. --- #!/bin/bash mkdir -p /home/USERNAME/org/backup && \ find $HOME -type f -name '*\.org' ! -path "/home/USERNAME/org/backup/*" \ -exec cp -t /home/USERNAME/org/backup/ \{\} \; echo "Daily Org Files Backup Successful: $(date)" >> /home/USERNAME/mybackupOrg.log - Thanks - *Sanjib Sikder *Ph.D. Fellow Chemical Engineering IIT Bombay* * On Thu, Oct 18, 2012 at 12:38 AM, Teemu Likonen wrote: > Sanjib Sikder [2012-10-18 00:32:00 +0530] wrote: > > > Even after 26th minute, there is no sign of the code in work. Is it that > > $HOME is not allowed and I need to give full path ? > > Ah, I thought that you'd run it from your personal crontab. So yes, > write paths from root's point of view. >
Re: [O] org back up
Teemu Likonen wrote: > Sanjib Sikder [2012-10-18 00:32:00 +0530] wrote: > > > Even after 26th minute, there is no sign of the code in work. Is it that > > $HOME is not allowed and I need to give full path ? > > Ah, I thought that you'd run it from your personal crontab. So yes, > write paths from root's point of view. > [I replied to Sanjib privately on the grounds that it's OT for the list, but let me add a couple of notes to this thread before we shut it off as completely OT: cron issues are hardly germane to org.] o Adding personal items to root-owned crontabs is a *bad idea* indeed. o One should try the script by hand before trying to incorporate it into cron: much easier to debug. o cron operates in a restricted environment: just run `env' as a cron job to find out what it knows (hint: not much). o Quite apart from cron issues, the backup method in the script is fundamentally flawed in my opinion: iiuc, it flattens the hierarchy, so if you have org files with the same name in different directories, only *one* will be saved into the backup directory - hardly a reliable backup. Nick
Re: [O] org back up
Hi, Thanks a lot. - *Sanjib Sikder *Ph.D. Fellow Chemical Engineering IIT Bombay* * On Thu, Oct 18, 2012 at 1:06 AM, Nick Dokos wrote: > Teemu Likonen wrote: > > > Sanjib Sikder [2012-10-18 00:32:00 +0530] wrote: > > > > > Even after 26th minute, there is no sign of the code in work. Is it > that > > > $HOME is not allowed and I need to give full path ? > > > > Ah, I thought that you'd run it from your personal crontab. So yes, > > write paths from root's point of view. > > > > [I replied to Sanjib privately on the grounds that it's OT for the list, > but let me add a couple of notes to this thread before we shut it off > as completely OT: cron issues are hardly germane to org.] > > o Adding personal items to root-owned crontabs is a *bad idea* indeed. > > o One should try the script by hand before trying to incorporate it into > cron: > much easier to debug. > > o cron operates in a restricted environment: just run `env' as a cron job > to > find out what it knows (hint: not much). > > o Quite apart from cron issues, the backup method in the script is > fundamentally flawed in my opinion: iiuc, it flattens the hierarchy, > so if you have org files with the same name in different directories, > only *one* will be saved into the backup directory - hardly a reliable > backup. > > Nick >
Re: [O] org back up
Sanjib Sikder [2012-10-18 00:56:46 +0530] wrote: > I do not find personal crontab file. how do I create it ? crontab -e says > my personal file is not there With "crontab -e" in Debian system. > If I want to run it as root then how do modify the following code as > it is nor working .. You should probably read the manual page of "find" and learn all the relevant options. But here's my new version which uses full paths. #!/bin/sh dir=/home/USERNAME target=$dir/org/backup mkdir -p "$target" && \ find "$dir" -type f -name '*.org' ! -path "$target/*" \ -exec cp -t "$target" {} +
Re: [O] org back up
I second using a VCS instead. I have my Org files in a Bazaar repo, and a cron job setup to commit hourly if changes occur. On Wed, Oct 17, 2012 at 09:25:15PM +0200, Achim Gratz wrote: > Sanjib Sikder writes: > > I wanted to set a cron job for backing up all my org files as > > suggested by Suvayu Ali. > > Please don't. If you consider this a viable backup strategy, you might > just as well have no backup at all. You should use a VCS like Git to be > able to revert to an earlier version of your files. If necessary, make > Org a sub-project (that's specific to Git of course) so that not only > your files but also Org will move back in time when you request that. > Defending against loss of data is only really possible if you copy them > to a different medium in a different location. Again, Git would help > you do that by allowing you to use a remote repository on some server > you can access. > > > Regards, > Achim. > -- > +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ > > Factory and User Sound Singles for Waldorf Blofeld: > http://Synth.Stromeko.net/Downloads.html#WaldorfSounds > > -- Russell Adamsrlad...@adamsinfoserv.com PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/ Fingerprint:1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3
Re: [O] GTD - Natural Planning Model properties - add automatically
On Sat, Oct 13, 2012 at 6:06 PM, Chris Henderson wrote: > If I create a project (C-c c and press 'p' for Project) in the > project.org file, I would like the project to automatically inherit a > few properties like: Purpose, Outcome, Todo's and also date when the > project was added to the list. > > How can I configure my .emacs file to achieve this? > > I currently have: > > (setq org-capture-templates >'(("t" "Todo" entry (file+headline "~/org/gtd.org" "Tasks") > "** TODO %?\n %i Added:%U") > ("j" "Journal" entry (file+datetree "~/org/journal.org") > "* %?\nEntered on %U\n %i\n %a"))) > > Also: I would be interested to see how others implement natural > planning model in org-mode (I am currently reading Charles Cave's > write-up on this) > I do something similar; I used to use a nearly full David Allen Natural Planning but now have simplified it and use the “As , I want so ” Mad-Libs style. I have the following as my Project capture: ("P" "Proposed Project" entry (file "~/Documents/OrgMaster/org/refile.org") "* PROPOSED %?\n%U\n** Project Definition\n%U\n- Summary\n + As , I want so \n- Completion Criteria (Don't do too much)\n + \n" :clock-in t :clock-resume t) The key point is that you can put “\n” into the string for new lines, and spaces after the “\n” for indentation. Mike
Re: [O] org back up
Hello Sanjib and others, Sorry to continue with this terribly off-topic thread, but as the person who wrote that snippet I felt I should clarify. On Wed, Oct 17, 2012 at 03:36:42PM -0400, Nick Dokos wrote: > Teemu Likonen wrote: > > > Sanjib Sikder [2012-10-18 00:32:00 +0530] wrote: > > > > > Even after 26th minute, there is no sign of the code in work. Is it that > > > $HOME is not allowed and I need to give full path ? > > > > Ah, I thought that you'd run it from your personal crontab. So yes, > > write paths from root's point of view. > > > > o Quite apart from cron issues, the backup method in the script is > fundamentally flawed in my opinion: iiuc, it flattens the hierarchy, > so if you have org files with the same name in different directories, > only *one* will be saved into the backup directory - hardly a reliable > backup. > If you look at the original thread, my solution was a suggestion for the specific case[1] of the original poster of that thread. This is _not_ a reliable way to back up your files. As others have mentioned, a distributed version control system like git, mercurial or bazar would be well suited. However I personally believe in redundancy being the best backup and use at least 3 ways to backup my org files: git, dropbox and rsync to a different physical drive. Footnotes: [1] The OP wanted to aggregate all org files in his home area to a specific backup directory. -- Suvayu Open source is the future. It sets us free.
[O] org-anywhere
I've been catching up on the mailing list, and thinking about my personal use case versus other typical patterns. I thought I would share a thought with the group. I would divide use cases into three main cohorts: - /org-planning/: org files consist mostly of planning and tracking content (lets call this =flow=). What is being worked on in this type of usage (lets call this =stuff=) exists predominantly outside the org-mode environment. - /org-everywhere/: both the =stuff= and the =flow= exist within an org file. Org-mode is everywhere (and that's how we like it, oi!). - /org-anywhere/: where the =flow= gets applied to the =stuff= by making the =stuff= an org file. But it's more about the =stuff= then the =flow=. I'm in the /org-anywhere/ category. I use org-mode as a plain-text content creation tool utilising headers, plain lists, tables, babel and export technology (=stuff=) and, sometimes, I use scheduling, deadlines, =todo= state tracking and the agenda (=flow=). As a result, I - don't like the visual clutter of dates outside of drawers, or drawers - love column view and header cycling - often find myself stripping an org file completely of org =flow= guff and not just to export but because seeing a deadline way in the past is bad for morale (just saying). - I can and do ignore the agenda for weeks at a time. So, for the way my brain thinks, there are a few org-mode design features that get in the way. - a =blank= =todo= state is implicitly seen as not a state at all. I see it as a state (which often is =done=). - scheduled and deadline dates cannot be stored in drawers - drawers cannot be completely hidden - I would like a org-remove-all-(flow)-guff option Does anyone have similar issues? I'd like to have a go at fixing some of this but would like to know if it would be generally useful to others, and what priorities may be. Tony
Re: [O] GTD - Natural Planning Model properties - add automatically
On zo 14-okt-2012 09:06 Chris Henderson wrote: >I would like the project to automatically inherit a >few properties like: Purpose, Outcome, Todo's and also date when the >project was added to the list. For the last bit I use org-expiry.el with a little glue. The idea I wanted to implement was that when a TODO/PROJECT item was created, a property with the current date should be inserted automatically. The main feature I was looking for was creating a list of incomplete items sorted or grouped by that date. org-expiry.el contains the function, 'org-expiry-insert-created', to insert a 'created' property. To have that work the way I wanted it I added an advice to two functions. One to 'org-insert-todo-heading' to have the created property inserted when creating an new todo heading. The other advices 'org-capture' to do the same when capturing new todo items. The snippet which does the above is here: https://gist.github.com/3910203 marcel -- Marcel van der Boom -- http://hsdev.com/mvdb.vcf HS-Development BV-- http://www.hsdev.com We use bitcoin! -- http://bitcoin.org