[O] org-map-entries broken?

2012-03-19 Thread Charles Sebold
I think this patch may have broken org-map-entries for me:

e0072f79137bbfabdf848da6865d8e4de776a549 is the first bad commit
commit e0072f79137bbfabdf848da6865d8e4de776a549
Author: David Maus 
Date:   Sun Mar 18 18:38:50 2012 +0100

    Require one or more spaces (+) between keyword and headline

    * org.el (org-scan-tags): Require one or more spaces (+) between
    keyword and headline.

    Otherwise the re will match a line like:

    * TODO@ Foobar

    And assumes the @ to be part of the headline.

    This fixes a glitch reported by Simon Thum in
    <4f53def7.8080...@gmx.de>.

    > Hi all,
    >
    > I have found some irritating behaviour, potentially a bug. I have a
    > block agenda which goes like:
    >
    > tags-todo "@home&TODO=\"TODO\"
    >
    > and it displays a certain org line that reads
    >
    >  TODO_ state triggers
    >
    > Which is just a heading for dealing with TODO state triggers, and I
    > appended the _ as I don't want it to be a TODO.
    >
    > For example, the global TODO list and syntax highlighting does not
    > consider it a todo, but C-c a m TODO="TODO" does. TODO="T" does not,
    > so it's not very grave.
    >
    > Most likely, it's simply an inconsistency arising from not having a
    > real parser. I just wanted to report it here so it may get fixed.

:04 04 8f5974f2dd7cf5f0ad10db56d223ba09a6dbca80
624cee5569de7ef8f240ad75943be215bb823ccc M      lisp

-

Try the following before and after this patch was applied, for a test result:

-
* test one
* test two
* test three

  #+BEGIN_SRC emacs-lisp :results both
(org-map-entries 'org-get-heading nil nil)
  #+END_SRC
---------

The results ought to be the three test headings in a table output.
After the patch it's blank.
--
Charles Sebold
Ego delendus sum



Re: [O] Bug: org-mobile-push fails, org-agenda-filter not defined [7.8.03 (release_7.8.03.5.gd3a45)]

2012-01-04 Thread Charles Sebold
That did it!  I must have been too quick to hit "git pull".  Thanks.

On Wed, Jan 4, 2012 at 10:00 AM, Bastien  wrote:

> Charles Sebold  writes:
>
> > Emacs  : GNU Emacs 24.0.92.1 (i386-mingw-nt5.1.2600)
> >  of 2012-01-03 on CT-SEBOLDCR-T4C
> > Package: Org-mode version 7.8.03 (release_7.8.03.12.g5eb41)
>
> Please pull again and check you're on the 13nth commit since 7.8.03.
>
> Thanks,
>
> --
>  Bastien
>



-- 
Charles Sebold
Ego delendus sum


Re: [O] Bug: org-mobile-push fails, org-agenda-filter not defined [7.8.03 (release_7.8.03.5.gd3a45)]

2012-01-04 Thread Charles Sebold
;wd" agenda "LCMS Daily Agenda"
   ((org-agenda-files (quote ("~/org/lcms")
  )
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-speed-command-hook '(org-speed-command-default-hook
  org-babel-speed-command-hook)
 org-babel-pre-tangle-hook '(save-buffer)
 org-occur-hook '(org-first-headline-recenter)
 org-export-interblocks '((lob org-babel-exp-lob-one-liners)
  (src org-babel-exp-inline-src-blocks))
 org-deadline-warning-days 5
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-export-latex-format-toc-function 'org-export-latex-format-toc-default
 org-export-preprocess-before-normalizing-links-hook
'(org-remove-file-link-modifiers)
 org-agenda-span 'day
 org-blank-before-new-entry nil
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-agenda-skip-deadline-if-done t
 org-export-first-hook '(org-beamer-initialize-open-trackers)
 org-mode-hook '((lambda nil
  (org-add-hook (quote change-major-mode-hook)
   (quote org-show-block-all) (quote append) (quote local))
  )
 org-babel-hide-all-hashes)
 org-directory "~/org/"
 org-mobile-directory "~/My Documents/My Dropbox/MobileOrg/"
 org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc
   org-beamer-auto-fragile-frames
   org-beamer-place-default-actions-for-lists)
 org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-todo-keywords '((sequence "INBOX(i)" "TICKLER(t!)" "|" "FILE(f@)"
  "CANCELED(k@)")
 (sequence "TODO" "NEXTACTION(n)" "WAITING" "VERIFY" "|"
  "DONE" "REASSIGNED")
 (sequence "DAILY(d)" "|" "DONEDLY" "UNSCHEDDLY(D)")
 (sequence "WEEKLY(e)" "|" "DONEWKLY" "UNSCHEDWKLY(E)")
 (sequence "MONTHLY(m)" "|" "DONEMNTHLY" "UNSCHEDMNTHLY(M)")
 (sequence "QUARTERLY(q)" "|" "DONEQUARTERLY"
  "UNSCHEDQUTRLY")
 (sequence "REQUEST(r!)" "REQWAITING(w@/!)" "REQVERIFY(v)"
  "|" "REQCLOSED(c!)" "REQREASSIGNED(a@)")
 (sequence "PROJECT(P!)" "PROJWAITING(W@/!)"
  "PROJVERIFY(V)" "|" "PROJCLOSED(C!)" "PROJREASSIGNED(A@)")
 )
 org-agenda-files '("~/org" "~/org/fiction" "~/org/reference"
"~/org/personal"
"~/org/gaming" "~/org/lcms")
 org-mobile-checksum-binary "sha1sum"
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
 org-src-mode-configure-edit-buffer)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-use-fast-todo-selection 'prefix
 org-confirm-shell-link-function 'yes-or-no-p
 )

On Wed, Jan 4, 2012 at 9:38 AM, Bastien  wrote:

> Hi Charles,
>
> Charles Sebold  writes:
>
> > This was happening yesterday and today; it appears that this happened
> > with the category filtering changes, but this is the first chance I've
> > gotten to do an org-mobile-push since then.
>
> This should be fixed now, thanks.
>
> --
>  Bastien
>
>


-- 
Charles Sebold
Ego delendus sum


[O] Bug: org-mobile-push fails, org-agenda-filter not defined [7.8.03 (release_7.8.03.5.gd3a45)]

2012-01-04 Thread Charles Sebold

This was happening yesterday and today; it appears that this happened
with the category filtering changes, but this is the first chance I've
gotten to do an org-mobile-push since then.

When I try org-mobile-push I get this:


Debugger entered--Lisp error: (void-variable org-agenda-filter)
  (let ((org-agenda-buffer-name "*SUMO*") (org-agenda-filter org-agenda-filter) 
(org-agenda-redo-command org-agenda-redo-command)) (save-excursion 
(save-window-excursion (run-hooks (quote org-mobile-pre-push-hook)) 
(org-mobile-check-setup) (org-mobile-prepare-file-lists) (message "Creating 
agendas...") (let ((inhibit-redisplay t)) (org-mobile-create-sumo-agenda)) 
(message "Creating agendas...done") (org-save-all-org-buffers) (message 
"Copying files...") (org-mobile-copy-agenda-files) (message "Writing index 
file...") (org-mobile-create-index-file) (message "Writing checksums...") 
(org-mobile-write-checksums) (run-hooks (quote org-mobile-post-push-hook)
  (let ((a-buffer (get-buffer org-agenda-buffer-name))) (let 
((org-agenda-buffer-name "*SUMO*") (org-agenda-filter org-agenda-filter) 
(org-agenda-redo-command org-agenda-redo-command)) (save-excursion 
(save-window-excursion (run-hooks (quote org-mobile-pre-push-hook)) 
(org-mobile-check-setup) (org-mobile-prepare-file-lists) (message "Creating 
agendas...") (let ((inhibit-redisplay t)) (org-mobile-create-sumo-agenda)) 
(message "Creating agendas...done") (org-save-all-org-buffers) (message 
"Copying files...") (org-mobile-copy-agenda-files) (message "Writing index 
file...") (org-mobile-create-index-file) (message "Writing checksums...") 
(org-mobile-write-checksums) (run-hooks (quote org-mobile-post-push-hook) 
(redraw-display) (when (and a-buffer (buffer-live-p a-buffer)) (if (not 
(get-buffer-window a-buffer)) (kill-buffer a-buffer) (let ((cw 
(selected-window))) (select-window (get-buffer-window a-buffer)) 
(org-agenda-redo) (select-window cw)
  org-mobile-push()
  call-interactively(org-mobile-push nil nil)


Nothing is defining org-agenda-filter, I guess.  I haven't used this
variable at all, I don't think.  git bisect and a fresh emacs -Q just
loading my org files, running (org-reload t), and (org-mobile-push)
gives me this:


8c36e92f88b39f295a73f75ac10a84dc98648a96 is the first bad commit
commit 8c36e92f88b39f295a73f75ac10a84dc98648a96
Author: Bastien Guerry 
Date:   Sat Dec 31 17:10:44 2011 +0100

Implement category filtering.

* org-agenda.el (org-agenda-filter-preset): New alias.
(org-agenda-filter-by-category): New command.
(org-agenda-mode-map): Add the new command.
(org-agenda-custom-commands-local-options): Add category
filter preset.
(org-agenda-mark-filtered-text): Mark both tag and filter
overlays.
(org-agenda-category-filter-preset): New variable.
(org-finalize-agenda, org-agenda-redo)
(org-agenda-filter-make-matcher, org-agenda-filter-apply):
Handle both category and tag filters.
(org-agenda-filter-show-all-tag): Rename from
`org-agenda-filter-by-tag-show-all'.
(org-agenda-filter-show-all-cat): New function.
(org-agenda-set-mode-name): Show the category filter in the
modeline.

* org-faces.el (org-agenda-filter-category): New face.

* org.texi (Agenda commands): Update documentation about the
new category filtering feature.

This feature has been requested by several people -- thanks
to all of them for mentioning this possibility.

:04 04 1815512f6801fea74b11d2ae564e21e35c309734 
854738f490d1f3d246a0a005b95d4a0e9dff0afc M  doc
:04 04 16d656c0397c4dd9cf82f6d38d1ed5f7b3578bea 
696bf99b6204f18bf0d83a0bccb2edc9f98a9c75 M  lisp


Emacs  : GNU Emacs 24.0.92.1 (i386-mingw-nt5.1.2600)
 of 2012-01-03 on CT-SEBOLDCR-T4C
Package: Org-mode version 7.8.03 (release_7.8.03.5.gd3a45)

current state:
==
(setq
 org-export-blocks '((src org-babel-exp-src-block nil) (comment 
org-export-blocks-format-comment t)
 (ditaa org-export-blocks-format-ditaa nil) (dot 
org-export-blocks-format-dot nil))
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point 
org-babel-execute-safely-maybe)
 org-src-fontify-natively t
 org-stuck-projects '("+LEVEL=2/-DONE" ("TODO" "NEXT" "NEXTACTION") ("info") "")
 org-mobile-before-process-capture-hook '((lambda nil
   (save-excursion (goto-char 
(point-min))
(while (re-search-forward "\015$" 
nil t) (replace-match "" nil nil)))
   )
  )
 org-agenda-skip-scheduled-if-done t
 org-ditaa-jar-path "c:/source/org-mode/contrib/scripts/ditaa.jar"
 org

Re: [O] Making the output of %% functions linkable in agenda views

2011-05-03 Thread charles . sebold
On 7 Apr 2011, Charles Sebold wrote:

> Here's a test.  Take the line below and put it in an agenda file, then
> view the agenda.
>
> %%(format "%s" (concat "[[elisp:(info)]" "[Link to info]]"))
>
> The results as I see them give me a link that I can mouse-click on,
> but I can't move point to it and hit C-c C-o.
>
> What do I need to do to make this a normal org link in every way?  Or
> is this a bug?
>
> (Obviously this is just a demo problem, I'm doing something much more
> hideously complicated in real life, but this was good enough to share
> to show what the problem was.)

*bump*

Anybody care to take this on?
-- 
Charles Sebold  3rd of May, 2011
GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600) | No Gnus v0.18 | org-mode 7.5
 




Re: [O] Bug: EOL needs to be converted to Unix for MobileOrg files [7.5 (release_7.5.147.g9ddc)]

2011-05-03 Thread charles . sebold
On 7 Apr 2011, Charles Sebold wrote:

> Second attempt to send this patch.
>
> I primarily use Org-mode on Windows, and my org files mostly have DOS
> line endings.  A while back a patch from me was accepted to convert
> the checksum file to Unix EOLs (and Richard updated the iOS app to be
> agnostic about it, I think, at the same time), which saved a lot of
> syncing because the checksum file never looked right to MobileOrg.
>
> However, the files themselves are irritating because they appear to
> have double line feeds when they are viewed on the iOS device, and
> edits from MobileOrg never sync because stray ^Ms creep in.
>
> This patch makes all files pushed to MobileOrg into Unix files as far
> as line endings go.
>
> It's not a very elegant solution and my feelings won't be hurt if a
> better way is proposed.

I'm bumping this.  I think the patch attached to the last post could be
better, but failing a response for now, I've decided that rather than
drag my changes along, I'm just advising the necessary functions.

So, to get this to work for Emacs on Windows + MobileOrg, the following
is in my .emacs file.  Hopefully this will be helpful for somebody:

#+BEGIN_SRC emacs-lisp
; bug fix for org-mobile
(defun org-mobile-copy-file (file newname)
  "Copy file, converting to Unix line endings."
  (with-temp-file newname
(set-buffer-file-coding-system 'undecided-unix nil)
(insert-file-contents file)))

(eval-and-compile
  (require 'cl)) ; for flet

(defadvice org-mobile-copy-agenda-files (around
 crs-org-mobile-copy-agenda-files)
  "Copy agenda files to mobile device with Unix EOLs."
  (flet ((copy-file (file newname &optional ok-if-already-exists keep-time
  preserve-uid-gid preserve-selinux-context)
(let ((tempfile (make-temp-file "orgmobile")))
  (org-mobile-copy-file file tempfile)
  (copy-file tempfile newname ok-if-already-exists
 keep-time preserve-uid-gid
 preserve-selinux-context)
  (delete-file tempfile
ad-do-it))

(defadvice org-mobile-encrypt-file (around crs-org-mobile-encrypt-file)
  "Encrypt INFILE to OUTFILE with Unix EOLs."
  (let ((tempfile (make-temp-file "orgmobile")))
(org-mobile-copy-file infile tempfile)
(ad-set-arg 0 tempfile)
ad-do-it
    (delete-file tempfile)))

(ad-activate 'org-mobile-copy-agenda-files)
(ad-activate 'org-mobile-encrypt-file)
#+END_SRC
-- 
Charles Sebold  3rd of May, 2011
GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600) | No Gnus v0.18 | org-mode 7.5
 




[O] Bug: EOL needs to be converted to Unix for MobileOrg files [7.5 (release_7.5.147.g9ddc)]

2011-04-07 Thread Charles Sebold
Second attempt to send this patch.

I primarily use Org-mode on Windows, and my org files mostly have DOS
line endings.  A while back a patch from me was accepted to convert the
checksum file to Unix EOLs (and Richard updated the iOS app to be
agnostic about it, I think, at the same time), which saved a lot of
syncing because the checksum file never looked right to MobileOrg.

However, the files themselves are irritating because they appear to have
double line feeds when they are viewed on the iOS device, and edits from
MobileOrg never sync because stray ^Ms creep in.

This patch makes all files pushed to MobileOrg into Unix files as far as
line endings go.

It's not a very elegant solution and my feelings won't be hurt if a
better way is proposed.

Emacs  : GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
 of 2011-04-05 on CT-SEBOLDCR-T4C
Package: Org-mode version 7.5 (release_7.5.147.g9ddc)
Changes in master
	Modified lisp/org-mobile.el
diff --git a/lisp/org-mobile.el b/lisp/org-mobile.el
index 83462f0..fa1d4f4 100644
--- a/lisp/org-mobile.el
+++ b/lisp/org-mobile.el
@@ -472,6 +472,12 @@ agenda view showing the flagged items."
    target-file)
   (org-mobile-cleanup-encryption-tempfile
 
+(defun org-mobile-copy-file (file newname)
+  "Copy file, converting to Unix line endings."
+  (with-temp-file newname
+(set-buffer-file-coding-system 'undecided-unix nil)
+(insert-file-contents file)))
+
 (defun org-mobile-copy-agenda-files ()
   "Copy all agenda files to the stage or WebDAV directory."
   (let ((files-alist org-mobile-files-alist)
@@ -485,7 +491,7 @@ agenda view showing the flagged items."
 	  (make-directory target-dir 'parents))
 	(if org-mobile-use-encryption
 	(org-mobile-encrypt-and-move file target-path)
-	  (copy-file file target-path 'ok-if-exists))
+	  (org-mobile-copy-file file target-path))
 	(setq check (shell-command-to-string
 		 (concat org-mobile-checksum-binary " "
 			 (shell-quote-argument (expand-file-name file)
@@ -710,12 +716,15 @@ encryption program does not understand them."
 
 (defun org-mobile-encrypt-file (infile outfile)
   "Encrypt INFILE to OUTFILE, using `org-mobile-encryption-password'."
-  (shell-command
-   (format "openssl enc -aes-256-cbc -salt -pass %s -in %s -out %s"
-	   (shell-quote-argument (concat "pass:"
-	 (org-mobile-encryption-password)))
-	   (shell-quote-argument (expand-file-name infile))
-	   (shell-quote-argument (expand-file-name outfile)
+  (let ((tempfile (make-temp-file "orgmobile")))
+(org-mobile-copy-file infile tempfile)
+(shell-command
+ (format "openssl enc -aes-256-cbc -salt -pass %s -in %s -out %s"
+	 (shell-quote-argument (concat "pass:"
+	   (org-mobile-encryption-password)))
+	 (shell-quote-argument (expand-file-name tempfile))
+	 (shell-quote-argument (expand-file-name outfile
+(delete-file tempfile)))
 
 (defun org-mobile-decrypt-file (infile outfile)
   "Decrypt INFILE to OUTFILE, using `org-mobile-encryption-password'."



[O] Bug: EOL needs to be converted to Unix for MobileOrg files [7.5 (release_7.5.125.g70fe)]

2011-04-02 Thread Charles Sebold
This has been a problem for me for some time, but I only just now had
the chance to find the problem.

I primarily use Org-mode on Windows, and my org files mostly have DOS
line endings.  A while back a patch from me was accepted to convert the
checksum file to Unix EOLs (and Richard updated the iOS app to be
agnostic about it, I think, at the same time), which saved a lot of
syncing because the checksum file never looked right to MobileOrg.

However, the files themselves are irritating because they appear to have
double line feeds when they are viewed on the iOS device, and edits from
MobileOrg never sync because stray ^Ms creep in.

This patch makes all files pushed to MobileOrg into Unix files as far as
line endings go.

It's not a very elegant solution and my feelings won't be hurt if a
better way is proposed.

Diff is here, followed by the bug report data dump (edited to remove
things that don't need to be public, and I wonder if it would be a good
idea to modify the bug report to automatically leave out encryption
passwords and the like?).


diff --git a/lisp/org-mobile.el b/lisp/org-mobile.el
index 83462f0..fa1d4f4 100644
--- a/lisp/org-mobile.el
+++ b/lisp/org-mobile.el
@@ -472,6 +472,12 @@ agenda view showing the flagged items."
   target-file)
   (org-mobile-cleanup-encryption-tempfile
 
+(defun org-mobile-copy-file (file newname)
+  "Copy file, converting to Unix line endings."
+  (with-temp-file newname
+(set-buffer-file-coding-system 'undecided-unix nil)
+(insert-file-contents file)))
+
 (defun org-mobile-copy-agenda-files ()
   "Copy all agenda files to the stage or WebDAV directory."
   (let ((files-alist org-mobile-files-alist)
@@ -485,7 +491,7 @@ agenda view showing the flagged items."
  (make-directory target-dir 'parents))
(if org-mobile-use-encryption
(org-mobile-encrypt-and-move file target-path)
- (copy-file file target-path 'ok-if-exists))
+ (org-mobile-copy-file file target-path))
(setq check (shell-command-to-string
 (concat org-mobile-checksum-binary " "
 (shell-quote-argument (expand-file-name file)
@@ -710,12 +716,15 @@ encryption program does not understand them."
 
 (defun org-mobile-encrypt-file (infile outfile)
   "Encrypt INFILE to OUTFILE, using `org-mobile-encryption-password'."
-  (shell-command
-   (format "openssl enc -aes-256-cbc -salt -pass %s -in %s -out %s"
-  (shell-quote-argument (concat "pass:"
-(org-mobile-encryption-password)))
-  (shell-quote-argument (expand-file-name infile))
-  (shell-quote-argument (expand-file-name outfile)
+  (let ((tempfile (make-temp-file "orgmobile")))
+(org-mobile-copy-file infile tempfile)
+(shell-command
+ (format "openssl enc -aes-256-cbc -salt -pass %s -in %s -out %s"
+(shell-quote-argument (concat "pass:"
+  (org-mobile-encryption-password)))
+(shell-quote-argument (expand-file-name tempfile))
+(shell-quote-argument (expand-file-name outfile
+(delete-file tempfile)))
 
 (defun org-mobile-decrypt-file (infile outfile)
   "Decrypt INFILE to OUTFILE, using `org-mobile-encryption-password'."


Emacs  : GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
 of 2011-03-29 on CT-SEBOLDCR-T4C
Package: Org-mode version 7.5 (release_7.5.125.g70fe)

current state:
==
(setq
 org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
 org-speed-command-hook '(org-speed-command-default-hook 
org-babel-speed-command-hook)
 org-agenda-custom-commands '(("z" tags "memorize&daily|odd|thursday|memday31")
  ("A" "Full Agenda" ((agenda "")))
  ("7" "Full Weekly Agenda"
   ((agenda "" ((org-agenda-span (quote week))
  ("h" . "HOME + tag/TODO searches")
  ("ha" "Full Agenda + Next Actions"
   ((agenda) (todo "INBOX") (todo "NEXTACTION") 
(todo "TODO")))
  ("hn" "Next Actions"
   ((todo "INBOX") (todo "NEXTACTION") (todo 
"TODO")))
  ("ht" "Non-LCMS Tasks" ((tags-todo "-lcms")))
  ("hp" "All Projects"
   ((todo "PROJECT") (todo "PROJWAITING") (todo 
"PROJVERIFY")))
  ("R" "TeamMania tasks" ((tags-todo 
"+work+teammania")))
  ("w" . "LCMS + tag/TODO searches")
  ("wo" "LCMS Servicewise Open Tickets"
   ((tags "+servicewise+ticket-status=\"Closed\"")))
 

[O] Bug: EOL needs to be converted to Unix for MobileOrg files [7.5 (release_7.5.125.g70fe)]

2011-04-01 Thread Charles Sebold
'(org-remove-file-link-modifiers)
 org-agenda-span 'day
 org-mode-hook '(#[nil "\300\301\302\303\304$\207"
       [org-add-hook change-major-mode-hook
org-show-block-all append local] 5]
 #[nil "\300\301\302\303\304$\207"
   [org-add-hook change-major-mode-hook
org-babel-show-result-all append local]
   5]
 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-use-fast-todo-selection 'prefix
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
org-babel-execute-safely-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-log-into-drawer t
 org-agenda-mode-hook '(hl-line-mode)
 org-export-interblocks '((lob org-babel-exp-lob-one-liners)
  (src org-babel-exp-inline-src-blocks))
 org-agenda-skip-deadline-if-done t
 org-occur-hook '(org-first-headline-recenter)
 org-from-is-user-regexp nil
 org-export-preprocess-before-selecting-backend-code-hook
'(org-beamer-select-beamer-code)
 org-mobile-use-encryption t
 org-agenda-use-time-grid nil
 org-mobile-checksum-binary "sha1sum"
 org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc
   org-beamer-auto-fragile-frames
   org-beamer-place-default-actions-for-lists)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-export-blocks '((src org-babel-exp-src-block nil)
 (comment org-export-blocks-format-comment t)
 (ditaa org-export-blocks-format-ditaa nil)
 (dot org-export-blocks-format-dot nil))
 )
--
Charles Sebold
Ego delendus sum


orgmobile-eol.diff
Description: Binary data


Re: [Orgmode] Re: Patch for ob-sql.el SQL output

2010-12-21 Thread Charles Sebold
Sébastien:

What do you think would be a good solution for the blank between the output
of a table and the row count if someone didn't run SET NOCOUNT ON?

I mean, should that be another hline, or no blank line, or what?

If somebody's trying to programatically use this table, it will mess up
their data, but I would think they wouldn't have NOCOUNT off in that case.

It seems to me like the right thing to do is another hline, but I'm not
convinced.  And it is even more of a hack, because I don't know how to test
for the "rows affected" line without an ugly search for some regexp like "
rows? affected)", and in other language environments I would guess it
doesn't even say that.

In the intermediate output file the row count line is preceded by a blank
line, but if there is only one column being output how can you tell the
difference between that and a blank record?

Anyway, if somebody wants the row count line at the moment I don't know how
to work around the extra blank without a ton of logic for single-column or
multi-column responses, and this is probably just making this code more and
more osql-specific, which will not be helpful for people on free database
systems.  But if anybody has any ideas or suggestions, I may have a little
time to try to implement them.

On Tue, Dec 21, 2010 at 11:34 AM, Eric Schulte wrote:

> Hi Charles,
>
> This looks great, I've just applied this most recent patch.
>
> Thanks -- Eric
>
> Charles Sebold  writes:
>
> > OK, another change: added a fix for the blank line at the end.
> >
> > diff --git a/lisp/ob-sql.el b/lisp/ob-sql.el
> > index 5bb123d..2ff85d9 100644
> > --- a/lisp/ob-sql.el
> > +++ b/lisp/ob-sql.el
> > @@ -65,6 +65,7 @@ This function is called by
> `org-babel-execute-src-block'."
> >   (in-file (org-babel-temp-file "sql-in-"))
> >   (out-file (or (cdr (assoc :out-file params))
> > (org-babel-temp-file "sql-out-")))
> > + (header-delim "")
> >   (command (case (intern engine)
> >  ('msosql (format "osql %s -s \"\t\" -i %s -o %s"
> >   (or cmdline "")
> > @@ -84,9 +85,26 @@ This function is called by
> `org-babel-execute-src-block'."
> >  (message command)
> >  (shell-command command)
> >  (with-temp-buffer
> > +  ; need to figure out what the delimiter is for the header row
> > +  (with-temp-buffer
> > +(insert-file-contents out-file)
> > +(goto-char (point-min))
> > +(when (re-search-forward "^\\(-+\\)[^-]" nil t)
> > +  (setq header-delim (match-string-no-properties 1)))
> > +(goto-char (point-max))
> > +(forward-char -1)
> > +(while (looking-at "\n")
> > +  (delete-char 1)
> > +  (goto-char (point-max))
> > +  (forward-char -1))
> > +(write-file out-file))
> >(org-table-import out-file '(16))
> >(org-babel-reassemble-table
> > -   (org-table-to-lisp)
> > +   (mapcar (lambda (x)
> > + (if (string= (car x) header-delim)
> > + 'hline
> > +   x))
> > +   (org-table-to-lisp))
> > (org-babel-pick-name (cdr (assoc :colname-names params))
> > (cdr (assoc :colnames params)))
> > (org-babel-pick-name (cdr (assoc :rowname-names params))
> >
> >
> > 2010/12/21 Charles Sebold :
> >> I feel silly.  I was just testing with one output column.
> >>
> >> Change the $ in the regexp to "[^-]" or just reapply patch as follows:
> >>
> >> diff --git a/lisp/ob-sql.el b/lisp/ob-sql.el
> >> index 5bb123d..32b7bf0 100644
> >> --- a/lisp/ob-sql.el
> >> +++ b/lisp/ob-sql.el
> >> @@ -65,6 +65,7 @@ This function is called by
> `org-babel-execute-src-block'."
> >>  (in-file (org-babel-temp-file "sql-in-"))
> >>  (out-file (or (cdr (assoc :out-file params))
> >>(org-babel-temp-file "sql-out-")))
> >> + (header-delim "")
> >>  (command (case (intern engine)
> >> ('msosql (format "osql %s -s \"\t\" -i %s -o %s"
> >>  (or cmdline "")
> >> @@ -84,9 +85,19 @@ This function is called by
> `org-babel-execute-src-block'."
> &

Re: [Orgmode] Re: Patch for ob-sql.el SQL output

2010-12-21 Thread Charles Sebold
OK, another change: added a fix for the blank line at the end.

diff --git a/lisp/ob-sql.el b/lisp/ob-sql.el
index 5bb123d..2ff85d9 100644
--- a/lisp/ob-sql.el
+++ b/lisp/ob-sql.el
@@ -65,6 +65,7 @@ This function is called by `org-babel-execute-src-block'."
  (in-file (org-babel-temp-file "sql-in-"))
  (out-file (or (cdr (assoc :out-file params))
(org-babel-temp-file "sql-out-")))
+ (header-delim "")
  (command (case (intern engine)
 ('msosql (format "osql %s -s \"\t\" -i %s -o %s"
  (or cmdline "")
@@ -84,9 +85,26 @@ This function is called by `org-babel-execute-src-block'."
 (message command)
 (shell-command command)
 (with-temp-buffer
+  ; need to figure out what the delimiter is for the header row
+  (with-temp-buffer
+(insert-file-contents out-file)
+(goto-char (point-min))
+(when (re-search-forward "^\\(-+\\)[^-]" nil t)
+  (setq header-delim (match-string-no-properties 1)))
+(goto-char (point-max))
+(forward-char -1)
+(while (looking-at "\n")
+  (delete-char 1)
+  (goto-char (point-max))
+  (forward-char -1))
+(write-file out-file))
   (org-table-import out-file '(16))
   (org-babel-reassemble-table
-   (org-table-to-lisp)
+   (mapcar (lambda (x)
+ (if (string= (car x) header-delim)
+ 'hline
+   x))
+   (org-table-to-lisp))
(org-babel-pick-name (cdr (assoc :colname-names params))
    (cdr (assoc :colnames params)))
(org-babel-pick-name (cdr (assoc :rowname-names params))


2010/12/21 Charles Sebold :
> I feel silly.  I was just testing with one output column.
>
> Change the $ in the regexp to "[^-]" or just reapply patch as follows:
>
> diff --git a/lisp/ob-sql.el b/lisp/ob-sql.el
> index 5bb123d..32b7bf0 100644
> --- a/lisp/ob-sql.el
> +++ b/lisp/ob-sql.el
> @@ -65,6 +65,7 @@ This function is called by `org-babel-execute-src-block'."
>          (in-file (org-babel-temp-file "sql-in-"))
>          (out-file (or (cdr (assoc :out-file params))
>                        (org-babel-temp-file "sql-out-")))
> +         (header-delim "")
>          (command (case (intern engine)
>                     ('msosql (format "osql %s -s \"\t\" -i %s -o %s"
>                                      (or cmdline "")
> @@ -84,9 +85,19 @@ This function is called by `org-babel-execute-src-block'."
>     (message command)
>     (shell-command command)
>     (with-temp-buffer
> +      ; need to figure out what the delimiter is for the header row
> +      (with-temp-buffer
> +        (insert-file-contents out-file)
> +        (goto-char (point-min))
> +        (when (re-search-forward "^\\(-+\\)[^-]" nil t)
> +          (setq header-delim (match-string-no-properties 1
>       (org-table-import out-file '(16))
>       (org-babel-reassemble-table
> -       (org-table-to-lisp)
> +       (mapcar (lambda (x)
> +                 (if (string= (car x) header-delim)
> +                     'hline
> +                   x))
> +               (org-table-to-lisp))
>        (org-babel-pick-name (cdr (assoc :colname-names params))
>                            (cdr (assoc :colnames params)))
>        (org-babel-pick-name (cdr (assoc :rowname-names params))
>
> 2010/12/21 Sébastien Vauban :
>> Hi Charles,
>>
>> Charles Sebold wrote:
>>> I use org-mode and babel under Windows with osql, and the line separating
>>> the header from the rest of the rows in the output was bothering me.
>>
>> Excellent initiative!
>>
>>> I don't know that this is a really good fix, but maybe it's a start for one?
>>> It looks for the first output line of all dashes and replaces it later with
>>> the 'hline when the table is lisp-ified.
>>
>> It does not work correctly for me (with the osql engine). Look at the
>> situation before/after your patch:
>>
>> 1. Before
>>
>>   #+srcname: top-10-dossiers-with-many-presta
>>   #+begin_src sql
>>   SET NOCOUNT ON
>>
>>   SELECT TOP 10 prsAbcID, COUNT(*) AS '# Presta'
>>   FROM presta
>>   GROUP BY prsAbcID
>>   ORDER BY COUNT(*) DESC
>>   #+end_src
>>
>>   #+results: top-10-dossiers-with-many-presta
>>   |         prsAbcID |      # Presta |
>>   |  | - |
>>   |   73020050900111 |          

Re: [Orgmode] Re: Patch for ob-sql.el SQL output

2010-12-21 Thread Charles Sebold
I feel silly.  I was just testing with one output column.

Change the $ in the regexp to "[^-]" or just reapply patch as follows:

diff --git a/lisp/ob-sql.el b/lisp/ob-sql.el
index 5bb123d..32b7bf0 100644
--- a/lisp/ob-sql.el
+++ b/lisp/ob-sql.el
@@ -65,6 +65,7 @@ This function is called by `org-babel-execute-src-block'."
  (in-file (org-babel-temp-file "sql-in-"))
  (out-file (or (cdr (assoc :out-file params))
(org-babel-temp-file "sql-out-")))
+ (header-delim "")
  (command (case (intern engine)
 ('msosql (format "osql %s -s \"\t\" -i %s -o %s"
  (or cmdline "")
@@ -84,9 +85,19 @@ This function is called by `org-babel-execute-src-block'."
 (message command)
 (shell-command command)
 (with-temp-buffer
+  ; need to figure out what the delimiter is for the header row
+  (with-temp-buffer
+(insert-file-contents out-file)
+(goto-char (point-min))
+(when (re-search-forward "^\\(-+\\)[^-]" nil t)
+  (setq header-delim (match-string-no-properties 1
   (org-table-import out-file '(16))
   (org-babel-reassemble-table
-   (org-table-to-lisp)
+   (mapcar (lambda (x)
+ (if (string= (car x) header-delim)
+ 'hline
+   x))
+   (org-table-to-lisp))
(org-babel-pick-name (cdr (assoc :colname-names params))
(cdr (assoc :colnames params)))
    (org-babel-pick-name (cdr (assoc :rowname-names params))

2010/12/21 Sébastien Vauban :
> Hi Charles,
>
> Charles Sebold wrote:
>> I use org-mode and babel under Windows with osql, and the line separating
>> the header from the rest of the rows in the output was bothering me.
>
> Excellent initiative!
>
>> I don't know that this is a really good fix, but maybe it's a start for one?
>> It looks for the first output line of all dashes and replaces it later with
>> the 'hline when the table is lisp-ified.
>
> It does not work correctly for me (with the osql engine). Look at the
> situation before/after your patch:
>
> 1. Before
>
>   #+srcname: top-10-dossiers-with-many-presta
>   #+begin_src sql
>   SET NOCOUNT ON
>
>   SELECT TOP 10 prsAbcID, COUNT(*) AS '# Presta'
>   FROM presta
>   GROUP BY prsAbcID
>   ORDER BY COUNT(*) DESC
>   #+end_src
>
>   #+results: top-10-dossiers-with-many-presta
>   |         prsAbcID |      # Presta |
>   |  | - |
>   |   73020050900111 |            22 |
>   |   52020030200047 |            21 |
>   |   6102006047 |            21 |
>   |   62020031200052 |            20 |
>   |   72020051100016 |            20 |
>   |   73020050800025 |            20 |
>   |   5602003112 |            19 |
>   |   63020060900056 |            19 |
>   |   61020030900049 |            18 |
>   |   72020030700040 |            18 |
>   |                  |               |
>
>   Another annoying thing is the empty line at the end. With the COUNT ON,
>   there is one empty line followed by the count.
>
> 2. After
>
>   #+results: top-10-dossiers-with-many-presta
>   |         prsAbcID |      # Presta |
>   |  | - |
>   |   73020050900111 |            22 |
>   |   52020030200047 |            21 |
>   |   6102006047 |            21 |
>   |   62020031200052 |            20 |
>   |   72020051100016 |            20 |
>   |   73020050800025 |            20 |
>   |   5602003112 |            19 |
>   |   63020060900056 |            19 |
>   |   61020030900049 |            18 |
>   |   72020030700040 |            18 |
>   |--+---|
>
>   The hline is not applied on the second line, but at the end of the table.
>   Perhaps the good condition is to work on the second line?
>
> Best regards,
>  Seb
>
> --
> Sébastien Vauban
>
>
> ___
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>



-- 
Charles Sebold
Ego delendus sum

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Patch for ob-sql.el SQL output

2010-12-21 Thread Charles Sebold
I use org-mode and babel under Windows with osql, and the line
separating the header from the rest of the rows in the output was
bothering me.

I don't know that this is a really good fix, but maybe it's a start
for one?  I've filled out paperwork with FSF for copyright assignment.
 It looks for the first output line of all dashes and replaces it
later with the 'hline when the table is lisp-ified.  I didn't test
this with mysql or postgresql.

diff --git a/lisp/ob-sql.el b/lisp/ob-sql.el
index 5bb123d..13e9bd3 100644
--- a/lisp/ob-sql.el
+++ b/lisp/ob-sql.el
@@ -65,6 +65,7 @@ This function is called by `org-babel-execute-src-block'."
          (in-file (org-babel-temp-file "sql-in-"))
          (out-file (or (cdr (assoc :out-file params))
                        (org-babel-temp-file "sql-out-")))
+         (header-delim "")
          (command (case (intern engine)
                     ('msosql (format "osql %s -s \"\t\" -i %s -o %s"
                                      (or cmdline "")
@@ -84,9 +85,19 @@ This function is called by `org-babel-execute-src-block'."
     (message command)
     (shell-command command)
     (with-temp-buffer
+      ; need to figure out what the delimiter is for the header row
+      (with-temp-buffer
+        (insert-file-contents out-file)
+        (goto-char (point-min))
+        (when (re-search-forward "^\\(-+\\)$" nil t)
+          (setq header-delim (match-string-no-properties 1
       (org-table-import out-file '(16))
       (org-babel-reassemble-table
-       (org-table-to-lisp)
+       (mapcar (lambda (x)
+                 (if (string= (car x) header-delim)
+                     'hline
+                   x))
+               (org-table-to-lisp))
        (org-babel-pick-name (cdr (assoc :colname-names params))
                            (cdr (assoc :colnames params)))
        (org-babel-pick-name (cdr (assoc :rowname-names params))
--
Charles Sebold
Ego delendus sum

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Bug: elisp links broken in agenda [6.33trans (release_6.33f.192.ge1a1)]

2010-01-04 Thread Charles Sebold
This is with a clean Emacs, nothing in .emacs except for what is
necessary to add my org-mode lisp directory to the load path and
(require 'org-install), Emacs pulled down from bzr this morning, and
current git download of org-mode, pulled a few minutes ago.

With an org file like this:


* TODO Try out [[elisp:(org-version)][link problem]] if possible


Pull this into an agenda view, then put cursor over the link and try to
follow it.  The result is as follows:

Debugger entered--Lisp error: (wrong-type-argument listp 
#("[[elisp:(org-version)][link problem]]" 0 22 (fontified t help-echo "LINK: 
elisp:(org-version)" face org-link org-no-flyspell t invisible org-link keymap 
(keymap (follow-link . mouse-face) (mouse-3 . org-find-file-at-mouse) (mouse-2 
. org-open-at-mouse)) mouse-face highlight font-lock-multiline t org-category 
"test") 22 23 (fontified t help-echo "LINK: elisp:(org-version)" rear-nonsticky 
(mouse-face highlight keymap invisible intangible help-echo org-linked-text) 
face org-link org-no-flyspell t invisible org-link keymap (keymap (follow-link 
. mouse-face) (mouse-3 . org-find-file-at-mouse) (mouse-2 . org-open-at-mouse)) 
mouse-face highlight font-lock-multiline t org-category "test") 23 34 
(fontified t help-echo "LINK: elisp:(org-version)" face org-link 
org-no-flyspell t keymap (keymap (follow-link . mouse-face) (mouse-3 . 
org-find-file-at-mouse) (mouse-2 . org-open-at-mouse)) mouse-face highlight 
font-lock-multiline t org-category "test") 34 35 (fontified t help-echo "LINK: 
elisp:(org-version)" rear-nonsticky (mouse-face highlight keymap invisible 
intangible help-echo org-linked-text) face org-link org-no-flyspell t keymap 
(keymap (follow-link . mouse-face) (mouse-3 . org-find-file-at-mouse) (mouse-2 
. org-open-at-mouse)) mouse-face highlight font-lock-multiline t org-category 
"test") 35 36 (fontified t help-echo "LINK: elisp:(org-version)" face org-link 
org-no-flyspell t invisible org-link keymap (keymap (follow-link . mouse-face) 
(mouse-3 . org-find-file-at-mouse) (mouse-2 . org-open-at-mouse)) mouse-face 
highlight font-lock-multiline t org-category "test") 36 37 (fontified t 
help-echo "LINK: elisp:(org-version)" rear-nonsticky (mouse-face highlight 
keymap invisible intangible help-echo org-linked-text) face org-link 
org-no-flyspell t invisible org-link keymap (keymap (follow-link . mouse-face) 
(mouse-3 . org-find-file-at-mouse) (mouse-2 . org-open-at-mouse)) mouse-face 
highlight font-lock-multiline t org-category "test")))
  org-offer-links-in-entry(nil #("  test:   " 0 14 (todo-state #("TODO" 0 4 
...) type "todo" priority 1001 org-hd-marker # 
org-marker # help-echo "mouse-2 or RET jump to org 
file ~/test.org" mouse-face highlight org-complex-heading-regexp "^\\(\\*+\\)[  
]+\\(?:\\(TODO\\|DONE\\)\\>\\)?\\(?:[   ]*\\(\\[#.\\]\\)\\)?[   
]*\\(.*?\\)\\(?:[   ]+\\(:[[:alnum:]_@:]+:\\)\\)?[  ]*$" org-todo-regexp 
"\\<\\(TODO\\|DONE\\)\\>" org-not-done-regexp "\\<\\(TODO\\)\\>" done-face 
org-agenda-done face nil dotime nil extra "" time "" txt #("TODO Try out 
[[elisp:(org-version)][link problem]] if possible" 0 4 ... 4 13 ... 13 35 ... 
35 36 ... 36 47 ... 47 48 ... 48 49 ... 49 50 ... 50 62 ...) effort-minutes nil 
effort nil duration nil time-of-day nil prefix-length 14 org-lowest-priority 67 
org-highest-priority 65 tags nil org-category "test" ...)))
  org-agenda-open-link(nil)
  call-interactively(org-agenda-open-link nil nil)



Emacs  : GNU Emacs 23.1.91.1 (i686-pc-linux-gnu, GTK+ Version 2.18.3)
 of 2010-01-04 on captainjack
Package: Org-mode version 6.33trans (release_6.33f.192.ge1a1)

current state:
==
(setq
 org-export-latex-after-initial-vars-hook
 '(org-beamer-after-initial-vars)
 org-agenda-files '("~/test.org")
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-export-latex-format-toc-function
 'org-export-latex-format-toc-default
 org-export-preprocess-hook '(org-export-blocks-preprocess)
 org-tab-first-hook '(org-hide-block-toggle-maybe)
 org-src-mode-hook '(org-src-mode-configure-edit-buffer)
 org-confirm-shell-link-function 'yes-or-no-p
 org-export-first-hook '(org-beamer-initialize-open-trackers)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-cycle-hook '(org-cycle-hide-archived-subtrees
 org-cycle-hide-drawers org-cycle-show-empty-lines
 org-optimize-window-after-visibility-change)
 org-export-preprocess-before-normalizing-links-hook
 '(org-remove-file-link-modifiers)
 org-mode-hook '(#[nil "\300\301\302\303\304$\207" [org-add-hook
 change-major-mode-hook org-show-block-all append local] 5])
 org-confirm-elisp-link-function 'yes-or-no-p
 org-occur-hook '(org-first-headline-recenter)
 org-export-preprocess-before-selecting-backend-code-hook
 '(org-beamer-select-beamer-code)
 org-export-latex-final-hook '(org-beamer-amend-header
 org-beamer-fix-t

[Orgmode] Bug: column faces based on default frame font, not current one [6.33trans (release_6.33f.92.g7dc0)]

2009-12-11 Thread Charles Sebold
This is complicated.  Essentially, I always have two frames open (two
monitors).  The laptop built-in screen shows a fairly large font, and
that's the default for starting Emacs, which I set something like this:

(add-to-list 'default-frame-alist '(font
  .
"-outline-Consolas-normal-r-normal-normal-17-127-96-96-c-*-iso8859-1"))
(add-to-list 'initial-frame-alist '(font
  .
"-outline-Consolas-normal-r-normal-normal-17-127-96-96-c-*-iso8859-1"))
(set-frame-font
  "-outline-Consolas-normal-r-normal-normal-17-127-96-96-c-*-iso8859-1")

These lines are all at different places in my .emacs.d mess, but before
org-mode is loaded, this is all set up.

However... when I'm at work, I use that frame for Gnus, and another
frame, fullscreen on the other monitor, for org-mode stuff.  The other
frame is set up like this:

(select-frame (make-frame (list (cons 'font
 
"-raster-ProggyCleanSZ-normal-r-normal-normal-10-75-96-96-c-*-iso8859-1"


So, now I jump into column mode in that frame with the very small font,
and I see this (please follow the link):

http://www.dropbox.com/gallery/3420586/1/Screenshots?h=0058af

As you can see, org-column-title (the face for the thing across the top)
seems to be in pretty good shape; it's a nice small font that matches,
more or less, the font at the bottom of the screenshot which is my usual
font for this frame.

However, the columns themselves are the org-column face, which seems to
be derived from my default font:

,
| Defined in `org-faces.el'.
| 
| Family: Consolas
|Foundry: unspecified
|  Width: unspecified
| Height: 128
| Weight: normal
|  Slant: normal
| Foreground: unspecified
| Background: grey30
|  Underline: nil
|   Overline: unspecified
| Strike-through: nil
|Box: unspecified
|Inverse: unspecified
|Stipple: unspecified
|   Font: unspecified
|Fontset: unspecified
|Inherit: unspecified
`

I guess I'd expect to see org-column derive from the frame font, not the
default font.  org-column-title seems to do the right thing.

I tried to work around this by customizing org-column to lock down the
Family and so forth, but this only worked for that session, oddly
enough, and besides, if I'm away from my desk in a single monitor
situation, I want the big font on my laptop screen again.

I tried to grasp what was going on with the faces, but I couldn't get my
head around it.

Emacs  : GNU Emacs 23.1.50.1 (i386-mingw-nt5.1.2600)
 of 2009-12-04 on CT-SEBOLDCR-T4C
Package: Org-mode version 6.33trans (release_6.33f.92.g7dc0)

current state:
==
(setq
 org-mobile-before-process-capture-hook '(#[nil
 
"\212eb\210\300\301\302\303#\205 \304\305\302\211#\210\202 )\207"
[re-search-forward "
$" nil t
 replace-match ""]
4]
  )
 org-agenda-custom-commands '(("z" tags
"memorize&daily|even|thursday|memday10")
  ("A" "Full Agenda" ((agenda "")))
  ("7" "Full Weekly Agenda"
   ((agenda "" ((org-agenda-ndays 7)
  ("h" . "HOME + tag/TODO searches")
  ("ha" "Full Agenda + Next Actions"
   ((agenda) (todo "INBOX") (todo
"NEXTACTION")
(todo "TODO"))
   )
  ("hn" "Next Actions"
   ((todo "INBOX") (todo "NEXTACTION") (todo
"TODO")))
  ("ht" "Non-LCMS Tasks" ((tags-todo
"-lcms")))
  ("hp" "All Projects"
   ((todo "PROJECT") (todo "PROJWAITING")
(todo "PROJVERIFY"))
   )
  ("R" "TeamMania tasks"
   ((tags-todo "+work+teammania")))
  ("w" . "LCMS + tag/TODO searhces")
  ("wt" "LCMS tasks" ((tags-todo
"+work+lcms")))
  ("wn" "LCMS Next Actions"
   ((agenda) (todo "INBOX") (todo
"NEXTACTION")
(todo "TODO"))
   ((org-agenda-files (quote
("~/org/lcms.org")
  ("wp" "LCMS Unfinished Projects"
   ((todo "PROJECT") (todo "PROJWAITING")
(todo "PROJVERIFY"))
   ((org-agenda-files (quote
("~/org/lcms.org")
  ("ws" "SQL tasks" ((tags-todo
"+work+sql")))
  ("g" agenda "non-LCMS Agenda"
   ((org-agenda-files (quote
("~/org/gtd.org")
  ("w

Re: [Orgmode] Emacs opens a frame for each file in agenda list on org-mobile-push

2009-11-18 Thread Charles Sebold
On Wed, Nov 18, 2009 at 9:19 AM, Steve Brown wrote:

> I have a small problem in that when I org-mobile-push for each file in
> org-agenda-files a new Emacs frame opens.
>
> Otherwise everything else works just fine.
>
> I'm running:
>
> Org-mode version 6.33c
>
> under
>
> GNU Emacs 23.1.50.1 (i386-mingw-nt5.1.2600)
>
>
> At this point I need to mention that I am no Emacs wizard. It has taken a
> while for me to get mobile-org etc. to sync correctly. My elisp-fu is
> minimal - I rely on cut and paste mostly to get anything done, so please
> keep answers simple ;-)
>
> Having said that I am very willing to dig in to this to find the problem as
> I enjoy learning where my mistakes come from.
>
> If someone can give me a pointer or two I would be very grateful.
>

That does seem odd.  Could you maybe do a M-x org-submit-bug-report, and if
you aren't doing email in Emacs, copy and paste the output (with your
org-mode configuration, it will prompt you to include it) into an email to
emacs-orgm...@gnu.org?

I'm running Emacs 23 on Windows, and using MobileOrg, and I haven't seen
that problem.  But we might have a start on it if you could send along your
configuration and customizations per the above.

This one seems strange enough that maybe it might even be worthwhile to send
along the .emacs file, just in case (properly sanitized for personal info,
of course).
-- 
Charles Sebold
http://triablogue.blogspot.com/
http://merbc.invigorated.org/
Ego delendus sum
___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Bug: word "file"in tags produces bad hyperlink [6.33trans (release_6.33c.10.ga7fb)]

2009-11-18 Thread Charles Sebold

Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.


If the word "file" is a tag, then a hyperlink will show up in your tags
at the end of the heading line.

For example:

* testing testing testing  :file:this:under:problems:

The workaround is to make "file" your last tag, for the moment.

Emacs  : GNU Emacs 23.1.50.1 (i386-mingw-nt5.1.2600)
 of 2009-11-11 on CT-SEBOLDCR-T4C
Package: Org-mode version 6.33trans (release_6.33c.10.ga7fb)

current state:
==
(setq
 org-agenda-custom-commands '(("z" tags "memorize&daily|odd|tuesday|memday17")
  ("A" "Full Agenda" ((agenda "")))
  ("7" "Full Weekly Agenda"
   ((agenda "" ((org-agenda-ndays 7)
  ("G" "Non-LCMS tasks" ((tags-todo "-lcms")))
  ("R" "TeamMania tasks"
   ((tags-todo "+work+teammania")))
  ("W" "LCMS tasks" ((tags-todo "+work+lcms")))
  ("S" "SQL tasks" ((tags-todo "+work+sql")))
  ("g" agenda "non-LCMS Agenda"
   ((org-agenda-files (quote ("~/org/gtd.org")
  ("w" agenda "LCMS Agenda"
   ((org-agenda-files (quote ("~/org/lcms.org")
  ("k" agenda "LCMS Weekly Agenda"
   ((org-agenda-files (quote ("~/org/lcms.org")))
(org-agenda-ndays 7))
   )
  )
 org-agenda-files '("~/org" "~/org/fiction" "~/org/reference" "~/org/personal")
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-deadline-warning-days 5
 org-agenda-skip-scheduled-if-done t
 org-stuck-projects '("+LEVEL=2/-DONE" ("TODO" "NEXT" "NEXTACTION") ("info") "")
 org-export-preprocess-hook '(org-export-blocks-preprocess)
 org-tab-first-hook '(org-hide-block-toggle-maybe)
 org-src-mode-hook '(org-src-mode-configure-edit-buffer)
 org-confirm-shell-link-function 'yes-or-no-p
 org-todo-keywords '((sequence "INBOX(i)" "TICKLER(t!)" "|" "FILE(f@)"
  "CANCELED(k@)")
 (sequence "TODO" "WAITING" "VERIFY" "|" "DONE" 
"REASSIGNED")
 (sequence "DAILY(d)" "|" "DONEDLY" "UNSCHEDDLY(D)")
 (sequence "WEEKLY(e)" "|" "DONEWKLY" "UNSCHEDWKLY(E)")
 (sequence "MONTHLY(m)" "|" "DONEMNTHLY" "UNSCHEDMNTHLY(M)")
 (sequence "APPT" "RESCHEDULE(s@)" "|" "APPTPAST"
  "APPTCANCELED(n@)")
 (sequence "REQUEST(r!)" "REQWAITING(w@/!)" "REQVERIFY(v)" 
"|"
  "REQCLOSED(c!)" "REQREASSIGNED(a@)")
 (sequence "PROJECT(P!)" "PROJWAITING(W@/!)" "PROJVERIFY(V)"
  "|" "PROJCLOSED(C!)" "PROJREASSIGNED(A@)")
 )
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-default-notes-file "~/org//process.org"
 org-directory "~/org/"
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
  org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-mode-hook '(#[nil "\300\301\302\303\304$\207"
   [org-add-hook change-major-mode-hook org-show-block-all 
append
local]
   5]
 )
 org-agenda-ndays 1
 org-use-fast-todo-selection 'prefix
 org-confirm-elisp-link-function 'yes-or-no-p
 org-log-into-drawer t
 org-agenda-mode-hook '(hl-line-mode)
 org-agenda-skip-deadline-if-done t
 org-occur-hook '(org-first-headline-recenter)
 org-from-is-user-regexp nil
 org-mobile-directory "~/stage/"
 org-agenda-use-time-grid nil
 org-mobile-checksum-binary "sha1sum"
 )



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] PATCH: org-mobile.el, fix line encoding for checksums.dat

2009-11-12 Thread Charles Sebold
After discussing the problem briefly with Richard, I have a suggested patch
for org-mobile.el.

This will force checksums.dat to always be Unix line encoding.

--- a/lisp/org-mobile.el
+++ b/lisp/org-mobile.el
@@ -409,6 +409,7 @@ The table of checksums is written to the file
mobile-checksums."
 (files org-mobile-checksum-files)
 entry file sum)
 (with-temp-file sumfile
+  (set-buffer-file-coding-system 'undecided-unix nil)
   (while (setq entry (pop files))
 (setq file (car entry) sum (cdr entry))
 (insert (format "%s  %s\n" sum file))

He said he may update MobileOrg to handle other linefeed encodings, but for
the meantime this seems to work for me.

On Thu, Nov 12, 2009 at 11:47 AM, Charles Sebold  wrote:

> I wonder, does MobileOrg always expect Unix-style line feeds?
>
> I ask because it seems to me as if, when I push from Emacs on Windows, from
> then on every time I sync, I have to download and read in every single org
> file.  I have 20-30 org files and a couple of them are over 200K so this
> takes a while.
>
> If I take the same org files and push them from Linux, I have to reread
> everything once, and then every sync from Linux after that only seems to
> force it to reread the files that changed.
>
> So, I'm wondering if it's not reading one of the files correctly:
> checksums.dat, or one of the agenda files.  I don't know enough about the
> iPhone app source to figure that one out, but I could think of workarounds
> for org-mobile.el if it always needs to produce Unix-style files for
> pushing.
> --
> Charles Sebold
> http://triablogue.blogspot.com/
> http://merbc.invigorated.org/
> Ego delendus sum
>



-- 
Charles Sebold
http://triablogue.blogspot.com/
http://merbc.invigorated.org/
Ego delendus sum
___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] What does MobileOrg expect in terms of linefeeds?

2009-11-12 Thread Charles Sebold
I wonder, does MobileOrg always expect Unix-style line feeds?

I ask because it seems to me as if, when I push from Emacs on Windows, from
then on every time I sync, I have to download and read in every single org
file.  I have 20-30 org files and a couple of them are over 200K so this
takes a while.

If I take the same org files and push them from Linux, I have to reread
everything once, and then every sync from Linux after that only seems to
force it to reread the files that changed.

So, I'm wondering if it's not reading one of the files correctly:
checksums.dat, or one of the agenda files.  I don't know enough about the
iPhone app source to figure that one out, but I could think of workarounds
for org-mobile.el if it always needs to produce Unix-style files for
pushing.
-- 
Charles Sebold
http://triablogue.blogspot.com/
http://merbc.invigorated.org/
Ego delendus sum
___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Org-mode version 6.32trans (release_6.32b.190.g1818); LAST_MOBILE_CHANGE line bumps local variable line

2009-11-12 Thread Charles Sebold
In org-mobile-timestamp-buffer(), it tries to insert the
LAST_MOBILE_CHANGE timestamp on the first line if there isn't already
one.

I think this should check first to see if the first line has local
variables, for example:

# -*- mode: org; coding: utf-8; -*-

...and it should skip past that line if it's there.  Any chance of
changing that?

(The workaround for the moment is to make sure that there is always a
timestamp line present already, and that's fine, but this could surprise
somebody who wasn't expecting it - like me, until I tracked this down.)

Maybe it could be something like:

--- a/lisp/org-mobile.el
+++ b/lisp/org-mobile.el
@@ -738,10 +738,13 @@ If BEG and END are given, only do this in that
region."
   (save-restriction
   (widen)
   (goto-char (point-min))
-  (when (re-search-forward
+  (if (re-search-forward
  "^\\([ \t]*\\)#\\+LAST_MOBILE_CHANGE:.*\n?" nil t)
-   (goto-char (match-end 1))
- (delete-region (point) (match-end 0)))
+ (progn
+  (goto-char (match-end 1))
+(delete-region (point) (match-end 0)))
+  (if (looking-at ".*-\\*-.*-\\*-")
+  (forward-line 1)))
   (insert "#+LAST_MOBILE_CHANGE: "
   (format-time-string "%Y-%m-%d %T") "\n")

Emacs  : GNU Emacs 23.1.50.1 (i386-mingw-nt5.1.2600)
 of 2009-11-11 on CT-SEBOLDCR-T4C
Package: Org-mode version 6.32trans (release_6.32b.190.g1818)
-- 
Charles Sebold
http://merbc.invigorated.org/
http://triablogue.blogspot.com/


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Installing on windows

2009-02-04 Thread Charles Sebold
On 4 Feb 2009, Bill Raynor wrote:

> I and many others would be grateful for a detailed step-by-step
> tutorial on installing org-mode on windows. The basic instructions
> work just fine on, say, OS X (edit makefile, make and make install)
> but don't work on windows.  Using emacs on windows is quite simple
> (download and install) but updating Org doesn't work so well.
>
> In the past I've used dired to attempt to compile the directory
> directly, which gets lots of error messages, but sort of works. I read
> a recent post on installing cygwin, but that doesn't quite work, as
> the post neglected to mention that you have to install cygwin + some
> unspecified packages (to get make, for instance). I trying that now.
> I am also using the W32 version of emacs.

Here's what I do (I'm running Emacs 22.3 provided by the FSF).  Using
this code, I don't ever run make, but I do need a version of makeinfo
in the path somewhere.  The "generate org-install" bit is lifted from
the Makefile, so it might have to change if the Makefile changes:


(setq crs-org-path "/source/org") ; this is where I keep my git version
  ; of org
(setq org-actual-info-path "~/.emacs.d/info/org") ; this is where my
  ; local info files
  ; are

(defun crs-add-to-load-path (path-string &rest more-paths)
  (when path-string
(message (format "Passed %S..." path-string))
(when (file-exists-p path-string)
  (setq path-string (expand-file-name path-string))
  (message (format "Adding %S to load-path..." path-string))
  (add-to-list 'load-path path-string))
(when more-paths
  (mapcar 'crs-add-to-load-path more-paths)))
  t)

(defun crs-newer-file-p (filename1 filename2)
  "Is FILENAME1 newer than FILENAME2?"
  (and (file-exists-p filename1)
   (file-exists-p filename2)
   (let ((first-time-mod (nth 5 (file-attributes filename1)))
 (second-time-mod (nth 5 (file-attributes filename2
 (or (> (car first-time-mod) (car second-time-mod))
 (and (= (car first-time-mod) (car second-time-mod))
  (> (cadr first-time-mod) (cadr second-time-mod)))

; Add in GIT repository if it exists
(let ((org-lisp-path (concat crs-org-path "/lisp"))
  (org-docfile-path (concat crs-org-path "/doc/org")))
  (when (file-exists-p org-lisp-path)
(crs-add-to-load-path org-lisp-path)
; recompile everything in this directory
(byte-recompile-directory org-lisp-path 0 nil)
; generate and copy documentation
(if (and (file-exists-p org-actual-info-path)
 (file-exists-p org-docfile-path)
 (crs-newer-file-p org-docfile-path org-actual-info-path))
(copy-file org-docfile-path org-actual-info-path t)
  (when (and (or (not (file-exists-p org-docfile-path))
 (crs-newer-file-p (concat org-docfile-path ".texi")
   org-docfile-path))
 (file-exists-p (concat org-docfile-path ".texi")))
(shell-command-to-string
 (concat "makeinfo --no-split "
 (shell-quote-argument
  (concat org-docfile-path ".texi"))
 " -o "
 (shell-quote-argument org-docfile-path)))
(if (file-exists-p org-docfile-path)
(copy-file org-docfile-path org-actual-info-path t)
  (message "Problem compiling org texinfo file?"
  ; generate org-install.el
(when (or
   (not (file-exists-p (concat
org-lisp-path "/org-install.el")))
   (crs-newer-file-p (concat org-lisp-path "/Changelog")
 (concat org-lisp-path "/org-install.el")))
  (let ((lispfiles0 (directory-files org-lisp-path
 nil "\\.el$" nil)))
(find-file (concat org-lisp-path "/org-install.el"))
(require 'autoload)
(erase-buffer)
(mapc (lambda (x) (generate-file-autoloads x)) lispfiles0)
(insert "\n(provide (quote org-install))\n")
(save-buffer)
(kill-buffer nil)

; org-mode (current)
(require 'org-install)


When I log in, most mornings, I run a batch file that "git pulls" the
latest from Carsten's repository, and then fires up Emacs for me to
handle the rest.

One nice thing about this is, if nothing has changed in my git
repository, then I don't notice any 

[Orgmode] Prefix arg required for agenda TODO cycle now?

2009-02-04 Thread Charles Sebold
I'm having trouble finding the specific diff where this would have
changed, and I'm wondering if I've done this to myself, or if this is a
bug?

I jumped this morning from 6.20h (or maybe 6.20i, don't remember now) to
latest, and I find that, in agenda view, to toggle a TODO task to DONE I
have to use C-u t instead of just t.  Then, in the org file itself, I'm
used to using the prefix arg C-u C-c C-t to pull up the full list of
TODO possibilities, but now that cycles, and just C-c C-t pulls up the
full list.

In testing with "emacs -Q" and an org file with just the following in
it:

* INBOX test item

I didn't see this problem, but adding my usual org-todo-keywords:

(setq org-todo-keywords
  '((sequence "INBOX(i)" "TICKLER(t!)" "|" "FILE(f@)" "CANCELED(k@)")
(sequence "TODO" "WAITING" "VERIFY" "|" "DONE" "REASSIGNED")
(sequence "DAILY(d)" "|" "DONEDLY" "UNSCHEDDLY(D@)")
(sequence "WEEKLY(e)" "|" "DONEWKLY" "UNSCHEDWKLY(E@)")
(sequence "MONTHLY(m)" "|" "DONEMNTHLY" "UNSCHEDMNTHLY(M@)")
(sequence "APPT" "RESCHEDULE(s@)" "|" "APPTPAST" "APPTCANCELED(n@)")
    (sequence "REQUEST(r!)" "REQWAITING(w@/!)" "REQVERIFY(v)" "|"
  "REQCLOSED(c!)" "REQREASSIGNED(a@)")
(sequence "PROJECT(P!)" "PROJWAITING(W@/!)" "PROJVERIFY(V)" "|"
  "PROJCLOSED(C!)" "PROJREASSIGNED(A@)")
))

...it changes to the behavior I described above.
-- 
Charles Sebold 4th of February, 2009
GNU Emacs 22.3.1 (i386-mingw-nt5.1.2600) | Gnus v5.11 | org-mode 6.21trans
 


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] POLL: the 40 variables project

2009-02-04 Thread Charles Sebold
On 29 Jan 2009, Carsten Dominik wrote:

> So here is my question to all of you.  Could you, in reply to this
> message, list all the Org-related variables that you have customized,
> along with the values you used?

Hopefully this isn't too late.

Using customize, here is what I have:

(org-agenda-ndays 1)   ; I like daily agenda
(org-agenda-skip-deadline-if-done t)
(org-agenda-skip-scheduled-if-done t)
(org-agenda-use-time-grid nil) ; No need for the scheduling
 stuff
(org-deadline-warning-days 3)  ; This covers a weekend, usually

Using setq(), here is what I have:

(setq org-directory "~/org/")
(setq org-default-notes-file (concat org-directory "/process.org"))
(setq org-todo-keywords
  '(
(sequence "INBOX(i)" "TICKLER(t!)" "|" "FILE(f@)" "CANCELED(k@)")
(sequence "TODO" "WAITING" "VERIFY" "|" "DONE" "REASSIGNED")
(sequence "DAILY(d)" "|" "DONEDLY" "UNSCHEDDLY(D@)")
(sequence "WEEKLY(e)" "|" "DONEWKLY" "UNSCHEDWKLY(E@)")
(sequence "MONTHLY(m)" "|" "DONEMNTHLY" "UNSCHEDMNTHLY(M@)")
(sequence "APPT" "RESCHEDULE(s@)" "|" "APPTPAST" "APPTCANCELED(n@)")
(sequence "REQUEST(r!)" "REQWAITING(w@/!)" "REQVERIFY(v)" "|"
  "REQCLOSED(c!)" "REQREASSIGNED(a@)")
(sequence "PROJECT(P!)" "PROJWAITING(W@/!)" "PROJVERIFY(V)" "|"
  "PROJCLOSED(C!)" "PROJREASSIGNED(A@)")
)) ; I actually prune these regularly; right now they're all in
   ; use
(setq org-agenda-custom-commands
  '(("W" tags-todo "+work+lcms")
("w" agenda "LCMS Agenda"
 ((org-agenda-files '("~/org/lcms.org"))
 ; "LCMS" is where I work, just so you know
-- 
Charles Sebold 4th of February, 2009
GNU Emacs 22.3.1 (i386-mingw-nt5.1.2600) | Gnus v5.11 | org-mode 6.21trans


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] org-plot histogram bug when the x-axis labels could be interpreted as numbers

2009-01-14 Thread Charles Sebold
On Wed, 14 Jan 2009, Eric Schulte wrote:

> I believe that forcing text-ind to be true when the plot type is
> 'hist' is a safe enough maneuver (especially plotting with hist seems
> to fail if text-ind is not true).
> 
> I would recommend this patch.  It's the same idea as Charles' only
> implemented in a different place.

Thanks, I had a feeling I was making it more complicated than it had to
be.
-- 
Charles Sebold
http://merbc.invigorated.org/
http://triablogue.blogspot.com/


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] org-plot histogram bug when the x-axis labels could be interpreted as numbers

2009-01-14 Thread Charles Sebold
On 14 Jan 2009, William Henney wrote:

> From glancing through org-plot.el, it seems as though the problem is
> that the text-ind parameter is false when all the values in the
> "independent variable" column are legal numbers. However, my lisp
> skills are not up to fixing this.

This may fix that problem, but I don't know that it doesn't produce a
nest of bigger ones.  Eric should look at this first.  This seems to me
to be useful enough when producing histograms.

diff --git a/lisp/org-plot.el b/lisp/org-plot.el
index 7efd84a..01a8360 100644
--- a/lisp/org-plot.el
+++ b/lisp/org-plot.el
@@ -246,10 +246,12 @@ NUM-COLS controls the number of columns plotted in a 2-d 
plot."
 (setf plot-lines
   (cons
(format plot-str data-file
-   (or (and (not text-ind) ind
+   (or (and (not (string= with "hist"))
+ (not text-ind) ind
 (> ind 0) (format "%d:" ind)) "")
(+ 1 col)
-   (if text-ind (format ":xticlabel(%d)" ind) "")
+   (if (or (string= with "hist") text-ind)
+(format ":xticlabel(%d)" ind) "")
with
        (or (nth col col-labels) (format "%d" (+ 1 
col
plot-lines)

-- 
Charles Sebold 14th of January, 2009
GNU Emacs 22.3.1 (i386-mingw-nt5.1.2600) | Gnus v5.11 | org-mode 6.17trans
 


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Question to windows users

2008-12-10 Thread Charles Sebold
On 10 Dec 2008, Charles Sebold wrote:

> No, it's not.  It's available in Cygwin, though (not that I would
> require that of Windows users).

Actually, it does come with some of the SDKs for .NET, I just
discovered.  But still, one can't assume its existence on a Windows
machine.
-- 
Charles Sebold10th of December, 2008
 GNU Emacs 22.3.1 (i386-mingw-nt5.1.2600) | Gnus v5.11 | org-mode 6.14
 


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Question to windows users

2008-12-10 Thread Charles Sebold
On 10 Dec 2008, Carsten Dominik wrote:

> is the command uuidgen usually available under windows?  I am
> considering to make this the default for ID generation because it
> works on the Mac and under GNU/Linux.  But I would like to have a
> default that works on all systems

No, it's not.  It's available in Cygwin, though (not that I would
require that of Windows users).

Could that command's functionality be replicated in Emacs Lisp?
-- 
Charles Sebold10th of December, 2008
 GNU Emacs 22.3.1 (i386-mingw-nt5.1.2600) | Gnus v5.11 | org-mode 6.14
 


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Relative clocking [Further discussion and ideas by OP]

2008-11-25 Thread Charles Sebold
On 25 Nov 2008, Carsten Dominik wrote:

> I have added such a timer to Org-mode, if you get the latest git
> release, you can use it.

I include a quick patch to what I just checked out, to fix an extra
parenthesis:
-- 
Charles Sebold25th of November, 2008
 GNU Emacs 22.3.1 (i386-mingw-nt5.1.2600) | Gnus v5.11 | org-mode 6.13a
 
Changes in master
Modified lisp/org-timer.el
diff --git a/lisp/org-timer.el b/lisp/org-timer.el
index 8ecfebd..34fab12 100644
--- a/lisp/org-timer.el
+++ b/lisp/org-timer.el
@@ -90,7 +90,7 @@ that was not started at the correct moment."
   (org-timer-secs-to-hms
(floor
 (- (time-to-seconds (current-time))
-   (time-to-seconds org-timer-start-time
+   (time-to-seconds org-timer-start-time)))
 
 ;;;###autoload
 (defun org-timer-change-times-in-region (beg end delta)

___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] patch for info file

2008-11-20 Thread Charles Sebold
It's not makeinfo-ing this morning:

$ makeinfo --no-split org.texi -o org
org.texi:7491: Unmatched }.
makeinfo: Removing output file `org' due to errors; use --force to preserve.


diff --git a/doc/org.texi b/doc/org.texi
index 2d0e805..67c3049 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -7488,7 +7488,7 @@ the subtrees are exported.
 Dispatcher for export and publishing commands.  Displays a help-window
 listing the additional key(s) needed to launch an export or publishing
 command.  The prefix arg is passed through to the exporter.  A double prefix
[EMAIL PROTECTED] C-u} causes most commands} to be executed in the background, 
in a
[EMAIL PROTECTED] C-u} causes most commands to be executed in the background, 
in a
 separate emacs [EMAIL PROTECTED] make this behavior the default, customize
 the variable @code{org-export-run-in-background}.}.
 @kindex C-c C-e v


-- 
Charles Sebold20th of November, 2008
GNU Emacs 22.3.1 (i386-mingw-nt5.1.2600) | Gnus v5.11 | org-mode 6.13pre01
 



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] patch for info file

2008-11-20 Thread Charles Sebold
It's not makeinfo-ing this morning:

$ makeinfo --no-split org.texi -o org
org.texi:7491: Unmatched }.
makeinfo: Removing output file `org' due to errors; use --force to preserve.


diff --git a/doc/org.texi b/doc/org.texi
index 2d0e805..67c3049 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -7488,7 +7488,7 @@ the subtrees are exported.
 Dispatcher for export and publishing commands.  Displays a help-window
 listing the additional key(s) needed to launch an export or publishing
 command.  The prefix arg is passed through to the exporter.  A double prefix
[EMAIL PROTECTED] C-u} causes most commands} to be executed in the background, 
in a
[EMAIL PROTECTED] C-u} causes most commands to be executed in the background, 
in a
 separate emacs [EMAIL PROTECTED] make this behavior the default, customize
 the variable @code{org-export-run-in-background}.}.
 @kindex C-c C-e v


-- 
Charles Sebold20th of November, 2008
GNU Emacs 22.3.1 (i386-mingw-nt5.1.2600) | Gnus v5.11 | org-mode 6.13pre01
 


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] how-to? - show only 1 tag for 1 day..

2008-11-12 Thread Charles Sebold
On 12 Nov 2008, [EMAIL PROTECTED] wrote:

> when i view an agenda, sometimes it is much easier for me to view only
> one tag for one day..
>
> for instance..
>
> before i run out to lunch, i would like to have a list that only shows
> errands for today..
>
> i can do this, but it shows all errands for the whole week..
>
> can i narrow this down?

M-x customize-variable RET org-agenda-ndays RET

,[ C-h v org-agenda-ndays RET ]
| org-agenda-ndays is a variable defined in `org-agenda.el'.
| Its value is 1
| 
| 
| Documentation:
| Number of days to include in overview display.
| Should be 1 or 7.
| 
| You can customize this variable.
`

-- 
Charles Sebold12th of November, 2008
 GNU Emacs 22.3.1 (i386-mingw-nt5.1.2600) | Gnus v5.11 | org-mode 6.12a
 


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Org-mode idea?

2008-11-07 Thread Charles Sebold
On 7 Nov 2008, Nick Dokos wrote:

> Say, what?!? I must have missed the discussion. Can you provide a
> reference?  Or a short introduction?

I think I meant "custom agenda views," not "multiple agendas."  But the
effect is much the same, it seems to me, especially if you're entirely
changing context when you change views.

I've got everything in my life in my org files, but if I want to just
see work (which is frequently), I have something like this in my .emacs
stuff:

(setq org-agenda-custom-commands
  '(("w" agenda "Work Agenda"
 ((org-agenda-files '("~/org/work.org"))

Maybe I've been misunderstanding some of the discussions going on around
here.  I don't know how long one could do that, but it's things like
this that make org-mode act like an extension of my brain.
-- 
Charles Sebold 7th of November, 2008
GNU Emacs 22.3.1 (i386-mingw-nt5.1.2600) | Gnus v5.11 | org-mode 6.11pre01
 


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: BUG - Attachment directories with newlines

2008-11-07 Thread Charles Sebold
On 6 Nov 2008, Carsten Dominik wrote:

> I get in both cases just the ID, no newline with it.  Also, new
> newlines are created for me after the attachment property.  Can please
> more people try Bernt's example?

Same for me, just the ID, no newline.
-- 
Charles Sebold 7th of November, 2008
GNU Emacs 22.3.1 (i386-mingw-nt5.1.2600) | Gnus v5.11 | org-mode 6.11pre01
 


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Org-mode idea?

2008-11-07 Thread Charles Sebold
On 6 Nov 2008, Dennis Groves wrote:

> I recently suffered a loss of data on my main computer. And as such I
> really want to get my data into a git repository and have that backed
> up regularly.
>
> (but I have been in management now for so long my developer tech
> skills have really suffered - and this stuff isn't as obvious as it
> once was...)

I did this.  There are a lot of places you could start on something like
this; I think John Wiegley's PDF on how to use Git was mentioned
yesterday, and that was pretty good.

The great thing about Git is that you can either treat this like
traditional source control, and set up a central repository somewhere
that gets backed up, or you can just clone the one you maintain on your
main computer to your server that gets backed up sometimes.  In either
place you have the complete history of your changes.

For myself, I have a primary system that is live on the internet, so I
can get my files from anywhere (with SSH, anyway).  Then my main place
to actually use the org files is on my laptop running Windows, and I do
most things there and regularly push commits in just so I have the
backup.  Then I have my main computer at home, a Debian system, and when
I'm at home that's often the place where I "live" with my org files.
Git handles this stuff pretty straightforwardly.

If I were to do it over again, though, I might not bother with the
central one, assuming that I was getting regular backups with one of the
other two "main" computers.

> Now my idea is this could agenda be made to read the subdirectories
> recursively and scan the files there in for todo's? Sorta, like a
> compile?  Or could I have a single file that is simply a list of all
> the files to look into in order to create my agenda?

For this you want to look at (info "(org)Agenda files") for everything
you need.  You can certainly do the second one out of the box.  I have
it reading everything in the top level of my org directory, then I
manually add things in the subdirectories, because sometimes I'm messing
with something that I don't want in the ordinary agenda.  You can
manually add a file that you're in right now with "C-c [" as you can see
from the info link above.

Then you could get really crazy and start having multiple
agendas... like a lot of people on here seem to be doing (and I just
started, and I am hooked on it).
-- 
Charles Sebold 7th of November, 2008
GNU Emacs 22.3.1 (i386-mingw-nt5.1.2600) | Gnus v5.11 | org-mode 6.11pre01
 


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Table (with timestamps) HTML export bug

2008-11-03 Thread Charles Sebold
On 3 Nov 2008, Charles Sebold wrote:

>> I noticed a bug that seems to have crept in over the weekend, but I
>> can't quite make out where it came from.
>
> It was somewhere in the last commit, but I can't quite wrap my head
> around the changes enough to figure out how this would break it.
>
> [15b4ae903879407efe33a9f26b6c7704f260bb6c] Process link descriptions
> in HTML export like any content.

I doubt this is right, but it works.  What does it takes to make this
right?

diff --git a/lisp/org-exp.el b/lisp/org-exp.el
index 453cd1f..b61f8a9 100644
--- a/lisp/org-exp.el
+++ b/lisp/org-exp.el
@@ -3964,7 +3964,9 @@ If there are links in the string, don't modify these."
   (setq s (org-html-protect s))
   (if org-export-html-expand
   (let ((start 0))
-   (while (string-match "@<\\([^&]*\\)>" s)
+(while (string-match "@<\\(.*?\\)"\\(.*?\\)>" s)
+  (setq s (replace-match "@<\\1\"\\2>" t nil s)))
+   (while (string-match "@<\\(.*?\\)>" s)
  (setq s (replace-match "<\\1>" t nil s)
   (if org-export-with-emphasize
   (setq s (org-export-html-convert-emphasize s)))

-- 
Charles Sebold 3rd of November, 2008
 GNU Emacs 22.3.1 (i386-mingw-nt5.1.2600) | Gnus v5.11 | org-mode 6.10c
 


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Table (with timestamps) HTML export bug

2008-11-03 Thread Charles Sebold
On 3 Nov 2008, Charles Sebold wrote:

> I noticed a bug that seems to have crept in over the weekend, but I
> can't quite make out where it came from.

It was somewhere in the last commit, but I can't quite wrap my head
around the changes enough to figure out how this would break it.

[15b4ae903879407efe33a9f26b6c7704f260bb6c] Process link descriptions in
HTML export like any content.

On another note, that "git bisect" thing is pretty cool.
-- 
Charles Sebold 3rd of November, 2008
 GNU Emacs 22.3.1 (i386-mingw-nt5.1.2600) | Gnus v5.11 | org-mode 6.10c
 


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Table (with timestamps) HTML export bug

2008-11-03 Thread Charles Sebold
I noticed a bug that seems to have crept in over the weekend, but I
can't quite make out where it came from.

In a table like this:


| Date | Index1 | Index2 |
|--++|
| <2008-11-01 Sat> |100 |150 |
| <2008-11-02 Sun> |110 |140 |
| <2008-11-03 Mon> |120 |145 |


If you export to HTML, you'll see the span before the timestamps with
HTML entities for the < and > characters, rather than having them
converted back.  It's as if we're missing an org-html-expand or an
org-html-do-expand somewhere.
-- 
Charles Sebold 3rd of November, 2008
 GNU Emacs 22.3.1 (i386-mingw-nt5.1.2600) | Gnus v5.11 | org-mode 6.10c
 


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] org-plot and timestamps

2008-11-02 Thread Charles Sebold
On 2 Nov 2008, Carsten Dominik wrote:

> Could you also provide a ChangeLog entry?

How's this?


Changes in master
Modified doc/ChangeLog
diff --git a/doc/ChangeLog b/doc/ChangeLog
index f7b6d2f..0b2faca 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,7 @@
+2008-11-02  Charles Sebold  <[EMAIL PROTECTED]>
+
+   * org.texi (Org Plot): Add documentation for timefmt option.
+
 2008-10-16  Carsten Dominik  <[EMAIL PROTECTED]>
 
* org.texi (TODO basics): Add documentation for tag triggers.
Modified lisp/ChangeLog
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 890bc99..86cb3e3 100755
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,15 @@
+2008-11-02  Charles Sebold  <[EMAIL PROTECTED]>
+
+   * org-plot.el (org-plot/add-options-to-plist): Supports timefmt
+   property.
+   (org-plot-quote-timestamp-field): New function.
+   (org-plot-quote-tsv-field): Call timestamp field function when
+   necessary rather than just quoting as a string.
+   (org-plot/gnuplot-to-data): Pass in timefmt property.
+   (org-plot/gnuplot-script): Supports timefmt property.
+   (org-plot/gnuplot): Checks for timestamp column before checking
+   for text index column.
+
 2008-11-02  Carsten Dominik  <[EMAIL PROTECTED]>
 
* org.el (org-insert-heading): Improve behavior with hidden subtrees.


-- 
Charles Sebold 2nd of November, 2008
 GNU Emacs 22.3.1 (i386-mingw-nt5.1.2600) | Gnus v5.11 | org-mode 6.10c
 


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] org-plot and timestamps

2008-10-30 Thread Charles Sebold
 (plist-get params :timefmt)
+  "%Y-%m-%d-%H:%M:%S"))
+(insert (orgtbl-to-generic
+ table
+ (org-combine-plists
+  '(:sep "\t" :fmt org-plot-quote-tsv-field)
+  params
   nil)
 
 (defun org-plot/gnuplot-to-grid-data (table data-file params)
@@ -180,6 +192,8 @@ NUM-COLS controls the number of columns plotted in a 2-d 
plot."
 (title (plist-get params :title))
 (file (plist-get params :file))
 (ind (plist-get params :ind))
+ (time-ind (plist-get params :timeind))
+ (timefmt (plist-get params :timefmt))
 (text-ind (plist-get params :textind))
 (deps (if (plist-member params :deps) (plist-get params :deps)))
 (col-labels (plist-get params :labels))
@@ -217,6 +231,11 @@ NUM-COLS controls the number of columns plotted in a 2-d 
plot."
 (mapconcat (lambda (pair)
  (format "\"%s\" %d" (cdr pair) (car pair)))
y-labels ", "
+  (when time-ind ;; timestamp index
+(add-to-script "set xdata time")
+(add-to-script (concat "set timefmt \""
+   (or timefmt ;; timefmt passed to gnuplot
+   "%Y-%m-%d-%H:%M:%S") "\"")))
   (case type ;; plot command
('2d (dotimes (col num-cols)
   (unless (and (equal type '2d)
@@ -284,16 +303,24 @@ line directly before or after the table."
('grid (let ((y-labels (org-plot/gnuplot-to-grid-data
table data-file params)))
 (when y-labels (plist-put params :ylabels y-labels)
-  ;; check for text ind column
+  ;; check for timestamp ind column
   (let ((ind (- (plist-get params :ind) 1)))
-   (when (and (>= ind 0) (equal '2d (plist-get params :plot-type)))
- (if (> (length
- (delq 0 (mapcar
+(when (and (>= ind 0) (equal '2d (plist-get params :plot-type)))
+  (if (= (length
+  (delq 0 (mapcar
   (lambda (el)
-(if (string-match org-table-number-regexp el)
+(if (string-match org-ts-regexp3 el)
 0 1))
   (mapcar (lambda (row) (nth ind row)) table 0)
- (plist-put params :textind t
+ (plist-put params :timeind t)
+;; check for text ind column
+(if (> (length
+(delq 0 (mapcar
+         (lambda (el)
+   (if (string-match org-table-number-regexp el)
+   0 1))
+ (mapcar (lambda (row) (nth ind row)) table 0)
+(plist-put params :textind t)
   ;; write script
   (with-temp-buffer
(if (plist-get params :script) ;; user script
@@ -307,7 +334,8 @@ line directly before or after the table."
(gnuplot-mode)
(gnuplot-send-buffer-to-gnuplot))
   ;; cleanup
-  (bury-buffer (get-buffer "*gnuplot*"))(delete-file data-file
+  (bury-buffer (get-buffer "*gnuplot*"))
+  (delete-file data-file
 
 (provide 'org-plot)
 


-- 
Charles Sebold
http://merbc.invigorated.org/
http://triablogue.blogspot.com/


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] org-plot and timestamps

2008-10-30 Thread Charles Sebold
On 28 Oct 2008, Eric Schulte wrote:

> Hi Charles, The patch looks great, I vote we drop it 'as is' into
> org-plot.el.  The only enhancement that comes to mind would be to
> expose the `time-ind' variable as a plot option.  Allowing users to
> specify different time formats, but really if they're that
> sophisticated in their use of gnuplot, then they can do that on their
> own through the `set:' option.  Thanks for the addition! -- Eric

Good idea, I will try to implement that soon.  In the meantime I'm
waiting on FSF paperwork to reach me, so I can sign it and get it turned
around.
-- 
Charles Sebold
http://merbc.invigorated.org/
http://triablogue.blogspot.com/


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] org-plot and timestamps

2008-10-27 Thread Charles Sebold
On 27 Oct 2008, Charles Sebold wrote:

> How's this for a first pass?  Not a git user before I started with
> org-mode so any pointers on how to generate these would be
> appreciated.

How embarrassing.  This is the patch I meant to send:

Changes in origin/HEAD
Modified lisp/org-plot.el
diff --git a/lisp/org-plot.el b/lisp/org-plot.el
index db67257..d0d62f6 100644
--- a/lisp/org-plot.el
+++ b/lisp/org-plot.el
@@ -101,10 +101,16 @@ will be added.  Returns the resulting property list."
(org-plot/add-options-to-plist params (match-string 1 line))
   params)))
 
+(defun org-plot-quote-timestamp-field (s)
+  "Convert field S from timestamp to Unix time and export to gnuplot."
+  (format-time-string "%Y-%m-%d-%H:%M:%S" (org-time-string-to-time s)))
+
 (defun org-plot-quote-tsv-field (s)
   "Quote field S for export to gnuplot."
   (if (string-match org-table-number-regexp s) s
-(concat "\"" (mapconcat 'identity (split-string s "\"") "\"\"") "\"")))
+(if (string-match org-ts-regexp3 s)
+(org-plot-quote-timestamp-field s)
+  (concat "\"" (mapconcat 'identity (split-string s "\"") "\"\"") "\""
 
 (defun org-plot/gnuplot-to-data (table data-file params)
   "Export TABLE to DATA-FILE in a format readable by gnuplot.
@@ -180,6 +186,7 @@ NUM-COLS controls the number of columns plotted in a 2-d 
plot."
 (title (plist-get params :title))
 (file (plist-get params :file))
 (ind (plist-get params :ind))
+ (time-ind (plist-get params :timeind))
 (text-ind (plist-get params :textind))
 (deps (if (plist-member params :deps) (plist-get params :deps)))
 (col-labels (plist-get params :labels))
@@ -217,6 +224,9 @@ NUM-COLS controls the number of columns plotted in a 2-d 
plot."
 (mapconcat (lambda (pair)
  (format "\"%s\" %d" (cdr pair) (car pair)))
y-labels ", "
+  (when time-ind ;; timestamp index
+(add-to-script "set xdata time")
+(add-to-script "set timefmt \"%Y-%m-%d-%H:%M:%S\""))
   (case type ;; plot command
('2d (dotimes (col num-cols)
   (unless (and (equal type '2d)
@@ -284,16 +294,24 @@ line directly before or after the table."
('grid (let ((y-labels (org-plot/gnuplot-to-grid-data
table data-file params)))
 (when y-labels (plist-put params :ylabels y-labels)
-  ;; check for text ind column
+  ;; check for timestamp ind column
   (let ((ind (- (plist-get params :ind) 1)))
-   (when (and (>= ind 0) (equal '2d (plist-get params :plot-type)))
- (if (> (length
- (delq 0 (mapcar
+(when (and (>= ind 0) (equal '2d (plist-get params :plot-type)))
+  (if (= (length
+  (delq 0 (mapcar
   (lambda (el)
-(if (string-match org-table-number-regexp el)
+(if (string-match org-ts-regexp3 el)
 0 1))
   (mapcar (lambda (row) (nth ind row)) table 0)
- (plist-put params :textind t
+ (plist-put params :timeind t)
+;; check for text ind column
+(if (> (length
+(delq 0 (mapcar
+ (lambda (el)
+   (if (string-match org-table-number-regexp el)
+   0 1))
+ (mapcar (lambda (row) (nth ind row)) table 0)
+(plist-put params :textind t)
   ;; write script
   (with-temp-buffer
(if (plist-get params :script) ;; user script
@@ -307,7 +325,8 @@ line directly before or after the table."
(gnuplot-mode)
(gnuplot-send-buffer-to-gnuplot))
   ;; cleanup
-  (bury-buffer (get-buffer "*gnuplot*"))(delete-file data-file
+  (bury-buffer (get-buffer "*gnuplot*"))
+  (delete-file data-file
 
 (provide 'org-plot)
 


-- 
Charles Sebold
http://merbc.invigorated.org/
http://triablogue.blogspot.com/


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] org-plot and timestamps

2008-10-27 Thread Charles Sebold
On 27 Oct 2008, Eric Schulte wrote:

> Great idea, please do share if you get anything working.  I second
> that time data can be a pain in gnuplot, but then all the more reason
> to add support to org-plot to avoid having to deal with gnuplot
> directly.
>
> If you get something working with org-mode dates, I think it would
> certainly make sense to include it in org-plot, so that it handles
> timestamps "out of the box".

How's this for a first pass?  Not a git user before I started with
org-mode so any pointers on how to generate these would be appreciated.

Changes in origin/HEAD
Modified lisp/org-plot.el
diff --git a/lisp/org-plot.el b/lisp/org-plot.el
index db67257..74ad817 100644
--- a/lisp/org-plot.el
+++ b/lisp/org-plot.el
@@ -101,10 +101,16 @@ will be added.  Returns the resulting property list."
(org-plot/add-options-to-plist params (match-string 1 line))
   params)))
 
+(defun org-plot-quote-timestamp-field (s)
+  "Convert field S from timestamp to Unix time and export to gnuplot."
+  (format-time-string "%Y-%m-%d-%H:%M:%S" (org-time-string-to-time s)))
+
 (defun org-plot-quote-tsv-field (s)
   "Quote field S for export to gnuplot."
   (if (string-match org-table-number-regexp s) s
-(concat "\"" (mapconcat 'identity (split-string s "\"") "\"\"") "\"")))
+(if (string-match org-ts-regexp3 s)
+(org-plot-quote-timestamp-field s)
+  (concat "\"" (mapconcat 'identity (split-string s "\"") "\"\"") "\""
 
 (defun org-plot/gnuplot-to-data (table data-file params)
   "Export TABLE to DATA-FILE in a format readable by gnuplot.
@@ -180,6 +186,7 @@ NUM-COLS controls the number of columns plotted in a 2-d 
plot."
 (title (plist-get params :title))
 (file (plist-get params :file))
 (ind (plist-get params :ind))
+ (time-ind (plist-get params :timeind))
 (text-ind (plist-get params :textind))
 (deps (if (plist-member params :deps) (plist-get params :deps)))
 (col-labels (plist-get params :labels))
@@ -217,6 +224,9 @@ NUM-COLS controls the number of columns plotted in a 2-d 
plot."
 (mapconcat (lambda (pair)
  (format "\"%s\" %d" (cdr pair) (car pair)))
y-labels ", "
+  (when time-ind ;; timestamp index
+(add-to-script "set xdata time")
+(add-to-script "set timefmt \"%Y-%m-%d-%H-%M-%S\""))
   (case type ;; plot command
('2d (dotimes (col num-cols)
   (unless (and (equal type '2d)
@@ -284,16 +294,24 @@ line directly before or after the table."
('grid (let ((y-labels (org-plot/gnuplot-to-grid-data
table data-file params)))
 (when y-labels (plist-put params :ylabels y-labels)
-  ;; check for text ind column
+  ;; check for timestamp ind column
   (let ((ind (- (plist-get params :ind) 1)))
-   (when (and (>= ind 0) (equal '2d (plist-get params :plot-type)))
- (if (> (length
- (delq 0 (mapcar
+(when (and (>= ind 0) (equal '2d (plist-get params :plot-type)))
+  (if (= (length
+  (delq 0 (mapcar
   (lambda (el)
-(if (string-match org-table-number-regexp el)
+(if (string-match org-ts-regexp3 el)
 0 1))
   (mapcar (lambda (row) (nth ind row)) table 0)
- (plist-put params :textind t
+ (plist-put params :timeind t)
+;; check for text ind column
+(if (> (length
+(delq 0 (mapcar
+ (lambda (el)
+   (if (string-match org-table-number-regexp el)
+   0 1))
+ (mapcar (lambda (row) (nth ind row)) table 0)
+(plist-put params :textind t)
   ;; write script
   (with-temp-buffer
(if (plist-get params :script) ;; user script
@@ -307,7 +325,8 @@ line directly before or after the table."
(gnuplot-mode)
(gnuplot-send-buffer-to-gnuplot))
   ;; cleanup
-  (bury-buffer (get-buffer "*gnuplot*"))(delete-file data-file
+  (bury-buffer (get-buffer "*gnuplot*"))
+  (delete-file data-file
 
 (provide 'org-plot)
 


-- 
Charles Sebold
http://merbc.invigorated.org/
http://triablogue.blogspot.com/


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] org-plot and timestamps

2008-10-27 Thread Charles Sebold
Has anybody done anything meaningful with timestamps in a table that is
being org-plotted?  I've got my X axis made up of a table column of
org-mode timestamps and I'd like org-plot to send this data to gnuplot
as time data (which gnuplot treats in specific ways).

If nobody has done this, I'll try to figure something out, and maybe
update Worg with a how-to for this or a patch to support this out of the
box, but I'm having trouble wrapping my head around gnuplot's syntax at
the moment.
-- 
Charles Sebold
http://merbc.invigorated.org/
http://triablogue.blogspot.com/


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Possible bug in task breakdown recounting, narrowing problem from agenda or sparse tree?

2008-09-25 Thread Charles Sebold
In an org file that looks like this:


#+STARTUP: odd
#+STARTUP: hidestars
#+TAGS: :meta:test:
#+CATEGORY: Test

* PROJECT [0/5] Made up of several todo's
*** TODO first
*** TODO second
*** TODO third
*** TODO fourth
*** TODO fifth


And with my todo keywords looking like this:


(setq org-todo-keywords
  '(
(sequence "INBOX(i)" "TICKLER(t!)" "|" "FILE(f@)" "CANCELED(k@)")
(sequence "TODO" "WAITING" "VERIFY" "|" "DONE" "REASSIGNED")
(sequence "DAILY(d!)" "|" "DONEDLY" "UNSCHEDDLY(D@)")
(sequence "WEEKLY(e!)" "|" "DONEWKLY" "UNSCHEDWKLY(E@)")
(sequence "MONTHLY(m!)" "|" "DONEMNTHLY" "UNSCHEDMNTHLY(M@)")
(sequence "APPT" "RESCHEDULE(s@)" "|" "APPTPAST" "APPTCANCELED(n@)")
(sequence "REQUEST(r!)" "REQWAITING(w@/!)" "REQVERIFY(v)" "|"
  "REQCLOSED(c!)" "REQREASSIGNED(a@)")
(sequence "PROJECT(P!)" "PROJWAITING(W@/!)" "PROJVERIFY(V)" "|"
  "PROJCLOSED(C!)" "PROJREASSIGNED(A@)")
))


According to (info "(org)Breaking down tasks") marking one of these as
one of the DONE states (in this sequence it would be either "DONE" or
"REASSIGNED") should change the PROJECT breakdown to [1/5].  If I am in
the buffer with that org file, it's completely unfolded, and I do it,
that's the effect I get.

However, if:

(a) the outline of that project is partially or completely folded to
begin with, and
(b) I change the TODO to DONE in the Agenda buffer, it seems to narrow
around that TODO item, and the breakdown becomes [0/1] or some
smaller number than the actual number of subtasks under the
project.

I just tried it with a sparse tree that only unfolded to display the
third TODO item, and the same thing happened, so I guess it's probably
something to do with the way the sparse tree works with folding.

I'm running org-mode 6.07b downloaded from the website.

Sorry if this is a known problem; I didn't see it on the "bugs" page in
the info file.
-- 
Charles Sebold
http://merbc.invigorated.org/
http://triablogue.blogspot.com/


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode