[O] Org Clock Error

2016-01-13 Thread Mike McLean
Hello

In the last few days I started getting an error when moving tasks to the
DONE state.

I have ~(setq org-clock-out-when-done t)~ in my Emacs configuration.

I get the following back trace when I mark a task as done:

Debugger entered--Lisp error: (void-variable org-state)
  (member org-state org-done-keywords)
  (and (eq t org-clock-out-when-done) (member org-state org-done-keywords))
  (or (and (eq t org-clock-out-when-done) (member org-state
org-done-keywords)) (and (listp org-clock-out-when-done) (member org-state
org-clock-out-when-done)))
  (and (org-clocking-p) org-clock-out-when-done (marker-buffer
org-clock-marker) (or (and (eq t org-clock-out-when-done) (member org-state
org-done-keywords)) (and (listp org-clock-out-when-done) (member org-state
org-clock-out-when-done))) (equal (or (buffer-base-buffer
(org-clocking-buffer)) (org-clocking-buffer)) (or (buffer-base-buffer
(current-buffer)) (current-buffer))) (< (point) org-clock-marker) (>
(save-excursion (outline-next-heading) (point)) org-clock-marker))
  (if (and (org-clocking-p) org-clock-out-when-done (marker-buffer
org-clock-marker) (or (and (eq t org-clock-out-when-done) (member org-state
org-done-keywords)) (and (listp org-clock-out-when-done) (member org-state
org-clock-out-when-done))) (equal (or (buffer-base-buffer
(org-clocking-buffer)) (org-clocking-buffer)) (or (buffer-base-buffer
(current-buffer)) (current-buffer))) (< (point) org-clock-marker) (>
(save-excursion (outline-next-heading) (point)) org-clock-marker)) (progn
(let ((org-log-note-clock-out nil) (org-clock-out-switch-to-state nil))
(org-clock-out
  org-clock-out-if-current()
  run-hooks(org-after-todo-state-change-hook)
  (let* ((match-data (match-data)) (startpos (point-at-bol)) (logging (let
((save-match-data-internal (match-data))) (unwind-protect (progn
(org-entry-get nil "LOGGING" t t)) (set-match-data save-match-data-internal
(quote evaporate) (org-log-done org-log-done) (org-log-repeat
org-log-repeat) (org-todo-log-states org-todo-log-states)
(org-inhibit-logging (if (equal arg 0) (progn (setq arg nil) (quote note))
org-inhibit-logging)) (this (match-string 1)) (hl-pos (match-beginning 0))
(head (org-get-todo-sequence-head this)) (ass (assoc head
org-todo-kwd-alist)) (interpret (nth 1 ass)) (done-word (nth 3 ass))
(final-done-word (nth 4 ass)) (org-last-state (or this ""))
(completion-ignore-case t) (member (member this org-todo-keywords-1)) (tail
(cdr member)) (org-state (cond ((and org-todo-key-trigger (or (and ... ...)
(and ... org-use-fast-todo-selection ...))) (org-fast-todo-selection))
((and (equal arg (quote ...)) (or (not org-use-fast-todo-selection) (not
org-todo-key-trigger))) (completing-read "State: " (mapcar (function list)
org-todo-keywords-1) nil t)) ((eq arg (quote right)) (if this (if tail (car
tail) nil) (car org-todo-keywords-1))) ((eq arg (quote left)) (if (equal
member org-todo-keywords-1) nil (if this (nth ... org-todo-keywords-1)
(org-last org-todo-keywords-1 ((and (eq org-use-fast-todo-selection t)
(equal arg (quote ...)) (setq arg nil))) (arg (cond ((equal arg "") nil)
((eq arg ...) nil) ((eq arg ...) (or done-word ...)) ((eq arg ...) (or ...
...)) ((eq arg ...) (let ... ...)) ((car ...)) ((stringp arg) (user-error
"State `%s' not valid in this file" arg)) ((nth ... org-todo-keywords-1
((null member) (or head (car org-todo-keywords-1))) ((equal this
final-done-word) nil) ((null tail) nil) ((memq interpret (quote (type
priority))) (if (eq this-command last-command) (car tail) (if (> ... 0) (or
done-word ...) nil))) (t (car tail (org-state (or
(run-hook-with-args-until-success (quote org-todo-get-default-hook)
org-state org-last-state) org-state)) (next (if org-state (concat " "
org-state " ") " ")) (change-plist (list :type (quote todo-state-change)
:from this :to org-state :position startpos)) dolog now-done-p) (if
org-blocker-hook (progn (setq org-last-todo-state-is-todo (not (member this
org-done-keywords))) (if (save-excursion (let ((save-match-data-internal
...)) (unwind-protect (progn ...) (set-match-data save-match-data-internal
... nil (if (with-no-warnings (called-interactively-p (quote
interactive))) (user-error "TODO state change from %s to %s blocked (by
\"%s\")" this org-state org-block-entry-blocking) (message "TODO state
change from %s to %s blocked (by \"%s\")" this org-state
org-block-entry-blocking) (throw (quote exit) nil) (store-match-data
match-data) (replace-match next t t) (cond ((equal this org-state) (message
"TODO state was already %s" (org-trim next))) ((pos-visible-in-window-p
hl-pos) (message "TODO state changed to %s" (org-trim next (if head nil
(setq head (org-get-todo-sequence-head org-state) ass (assoc head
org-todo-kwd-alist) interpret (nth 1 ass) done-word (nth 3 ass)
final-done-word (nth 4 ass))) (if (memq arg (quote (nextset previousset)))
(progn (message "Keyword-Set %d/%d: %s" (- (length org-todo-sets) -1
(length (memq (assoc org-state org-todo-sets) org-todo-sets))) 

Re: [O] org files and projects nested git repositories

2015-12-31 Thread Mike McLean
On Thu, Dec 31, 2015 at 1:33 PM, Tyler Smith  wrote:

> Ken Mankoff  writes:
> >
> > In my version of this, I have each project as its own git repository,
> > where git contains the Org file, other code, the manuscript, etc. I
> > add any Org files to my global agenda with =M-x
> > org-agenda-file-to-front= and remove with = M-x org-remove-file=.
> >
> >>  most tutorials assume that all your planning files are found in one
> >>  directory (e.g., ~/org).
> >
> > That is only because it is easier to show that setup in the tutorial. You
> > can have Org files all over the place, and each can be added to the
> Agenda
> > or not, as you wish.
>
> Thanks Ken. Perhaps I've been trying to hard to force everything into
> one directory. I did find a post on Reddit that describes a convenient
> way to create org files for projects anywhere in the directory tree in a
> shared global location:
>
>
> https://www.reddit.com/r/emacs/comments/2qwh8q/org_mode_one_massive_file_or_tons_of_small_ones/cnacdpl
>
> This has the benefit of keeping all my planning (.org) files in one
> repo, but the disadvantage of separating the planning files from the
> project they relate to. Something your approach deals with nicely. I'll
> try that out.
>

Another option: I have a function that recursively searches a parent
directory (using the "find-lisp" library) for files that are named *.org. I
then add that function to org-agenda-mode-hook so that every time I open
and agenda view, it recalculates the org-agenda-files variable. On a local
filesystem (laptop, SSD) i don't notice a thing, slow-down wise. YMMV if
your Org files are on a network share.


>
> Best,
>
> Tyler
>
> --
> http://plantarum.ca
>
>


Re: [O] Fwd: Patch - Org Mac Outlook - Fix Call to Outlook in some cases

2015-12-14 Thread Mike McLean
Earlier in this thread, Rasmus suggested “Perhaps it should be a defcustom?”

With a new version (2016) of Microsoft Outlook for Mac that does not
install inside of a "Microsoft Office 2011" directory, this indeed should
be a defcustom.

This patch accomplishes that change. (It also changes the default to
/Applications/Microsoft Outlook.app which is the filesystem path of Outlook
2016.


On Wed, Jun 10, 2015 at 2:17 AM, Alan Schmitt <
alan.schm...@polytechnique.org> wrote:

> On 2015-06-09 22:20, Mike McLean <mike.mcl...@pobox.com> writes:
>
> > Here is a version of the patch with a (hopefully) correct Changelog
> format
>
> Applied and pushed, thanks!
>
> Alan
>
> --
> OpenPGP Key ID : 040D0A3B4ED2E5C7
> Weekly CO₂ average (2015-05-30, Mauna Loa Observatory): 403.41 ppm
>


0001-org-mac-link.el-Make-path-to-Microsoft-Outlook-custo.patch
Description: Binary data


Re: [O] [PATCH] - Org Mac Outlook - Fix Call to Outlook in some cases

2015-12-14 Thread Mike McLean
Updated to fix a typo in the defcustom’s documentation string.



On Mon, Dec 14, 2015 at 11:22 AM, Mike McLean <mike.mcl...@pobox.com> wrote:

> Earlier in this thread, Rasmus suggested “Perhaps it should be a
> defcustom?”
>
> With a new version (2016) of Microsoft Outlook for Mac that does not
> install inside of a "Microsoft Office 2011" directory, this indeed should
> be a defcustom.
>
> This patch accomplishes that change. (It also changes the default to
> /Applications/Microsoft Outlook.app which is the filesystem path of Outlook
> 2016.
>
>
> On Wed, Jun 10, 2015 at 2:17 AM, Alan Schmitt <
> alan.schm...@polytechnique.org> wrote:
>
>> On 2015-06-09 22:20, Mike McLean <mike.mcl...@pobox.com> writes:
>>
>> > Here is a version of the patch with a (hopefully) correct Changelog
>> format
>>
>> Applied and pushed, thanks!
>>
>> Alan
>>
>> --
>> OpenPGP Key ID : 040D0A3B4ED2E5C7
>> Weekly CO₂ average (2015-05-30, Mauna Loa Observatory): 403.41 ppm
>>
>
>


0001-org-mac-link.el-Make-path-to-Microsoft-Outlook-custo.patch
Description: Binary data


[O] [PATCH] Add Support for Evernote in Org-Mac Link

2015-12-14 Thread Mike McLean
The attached patch adds support for Evernote Note links in
contrib/org-mac-link.el

Commit Message:

org-mac-link.el: Add support for Evernote Note Links

(org-mac-grab-Evernote-app-p, org-mac-evernote-path): New custom
variables to control Evernote grabbing
(org-mac-evernote-note-open): New function to open an Evernote note by
ID
(org-as-get-selected-evernote-notes,
org-mac-evernote-note-insert-selected): New functions to get the
selected Evernote note(s) and insert them into current buffer

Note this change also defines a new link type ("mac-evernote") via a
call to “org-add-link-type”.


0001-org-mac-link.el-Add-support-for-Evernote-Note-Links.patch
Description: Binary data


Re: [O] problem with org-capture

2015-12-03 Thread Mike McLean
At the risk of piling on, I too am having problems with Org Capture
templates that haven't changed in a long time. The sample below used to
function like:

   1. I would call it from org-capture, select the “af” template
   2. I would get prompted for a date from file+datetree+prompt and I would
   select the date
   3. I would get prompted for the week number from the
   ~%^{prompt|%<%Y-W%V>}~ clause. This would default to the current week in
   ISO format (2015-W49). I would change it or not (usually not)
   4. The ISO week entered from that prompt would get substituted into the
   AR_DATE property in multiple places.

The two big differences with release_8.3.2-381-gb7ee96 are

   1. The substitution for %Y and %V does not happen before the prompt in
   step 3; I get a default value of [%<%Y-W%V>]
   2. Even if I manually type the ISO week string (2015-W09) it no longer
   gets substituted into the AR_DATE properties via %\1

I maintain some of my more complex capture templates in standalone files
and reference the file in org-capture-templates

(setq org-capture-templates (quote (
("a" "Templates for Agile Results")

("af" "Friday Afternoon Weekly Close /
Reflection"
 entry
 (file+datetree+prompt
"~/Documents/OrgMaster/org/Agile_Results.org")
 (file
"~/.init/emacs/org-capture-templates/friday.reflection.org_template")
 :jump-to-captured t :immediate-finish
t

The
file "~/.init/emacs/org-capture-templates/friday.reflection.org_template"
contains:

#+begin_example
  ,* Friday Reflection %^{prompt|%<%Y-W%V>}
  :PROPERTIES:
  :AR_DATE:  %\1
  :VISIBILITY: all
  :END:
  %u
  ,** Three Things Going Well
  + %?
  +
  +
  ,** Three Things to Improve
  +
  +
  +
  ,** Review Outcomes and Results Compared to the Monday Vision
 :Weekly_Win_Review:
  :PROPERTIES:
  :AR_DATE:  %\1
  :VISIBILITY: all
  :END:
  %<[%Y-%m-%d %a %H:%M]>
  - What got in my way? How might I do it differently? Review each of my
target Monday
Vision Outcomes; What did I get done or did not get done?
 +
 +
 +
  ,** Delta File: What will I change immediately or when my role or
influence changes :NOTE:Delta_File:
  %<[%Y-%m-%d %a %H:%M]>

#+end_example




On Thu, Dec 3, 2015 at 12:05 PM, Matt Lundin  wrote:

> Nicolas Goaziou  writes:
>
> > Hello,
> >
> > Eric S Fraga  writes:
> >
> >> However, it only partially fixed.  The system does now prompt as it
> >> should but the mini-buffer input only allows single words.  Hitting
> >> space bar attempts to do completion.  I believe the input should be free
> >> form?
> >
> > Fixed (again). Thank you.
>
> Thanks Nicolas. One more issue. In the past, non-interactive escapes
> were expanded when the capture buffer was displayed, which enabled me to
> see what I had just clipped while entering the interactive data. Now
> non-interactive escapes are expanded at the end of the capture process.
>
> Take the following template:
>
> (setq org-capture-templates
>   '(("a" "Appointment" entry
>  (file "~/org/inbox.org")
>  "* %^{Appt}\n %^t%?\n %U\n %a\n\n %i")))
>
> In the past, if I called this from the org-mode website with a region of
> text selected, I would get a buffer that looked like this before
> completing the interactive prompts:
>
> --8<---cut here---start->8---
> *
>  %^t%?
>  [2015-12-03 Thu 11:02]
>  [[http://orgmode.org/][Org mode for Emacs – Your Life in Plain Text]]
>
>  Org mode is for keeping notes, maintaining TODO lists, planning
>  projects, and authoring documents with a fast and effective plain-text
>  system.
> --8<---cut here---end--->8---
>
> After the recent changes, the initial capture buffer looks like this:
>
> --8<---cut here---start->8---
> *
>  %^t%?
>  %U
>  %a
>
>  %i
>  --8<---cut here---end--->8---
>
> Thanks,
> Matt
>
>


Re: [O] problem with org-capture

2015-12-03 Thread Mike McLean
Great

Everything seems to(*) work again; thank you.

Mike

(*) I have another small issue that I think is ~helm~ related based on the
initial backtrace, I'll do full checks (tomorrow or weekend) with -Q and
report back if I think it is Org related. Gut feeling right no: not.


On Thu, Dec 3, 2015 at 5:38 PM, Nicolas Goaziou <m...@nicolasgoaziou.fr>
wrote:

> Hello,
>
> Mike McLean <mike.mcl...@pobox.com> writes:
>
> > At the risk of piling on, I too am having problems with Org Capture
> > templates that haven't changed in a long time. The sample below used to
> > function like:
> >
> >1. I would call it from org-capture, select the “af” template
> >2. I would get prompted for a date from file+datetree+prompt and I
> would
> >select the date
> >3. I would get prompted for the week number from the
> >~%^{prompt|%<%Y-W%V>}~ clause. This would default to the current week
> in
> >ISO format (2015-W49). I would change it or not (usually not)
> >4. The ISO week entered from that prompt would get substituted into
> the
> >AR_DATE property in multiple places.
> >
> > The two big differences with release_8.3.2-381-gb7ee96 are
> >
> >1. The substitution for %Y and %V does not happen before the prompt in
> >step 3; I get a default value of [%<%Y-W%V>]
> >2. Even if I manually type the ISO week string (2015-W09) it no longer
> >gets substituted into the AR_DATE properties via %\1
>
> I pushed a commit which should fix these issues and the others mentioned
> in the thread. Thank you.
>
> Let me know if something is still wrong.
>
> Regards,
>
> --
> Nicolas Goaziou
>


Re: [O] org-mac-link to Mail.app doesn't work as expected

2015-09-03 Thread Mike McLean
Tobias

It's supposed to work regardless, in fact it stores the Message ID which
should never change.

Is there anything peculiar in your Mail setup?



On Wed, Sep 2, 2015 at 3:10 PM, Tobias Frischholz  wrote:

> Hi there,
>
> I’m using org-mac-link.el (
> http://orgmode.org/worg/org-contrib/org-mac-link.html), which is a
> fantastic tool for grabbing links from various Mac apps.
>
> But somehow it isn’t correctly linking to mails in Mail.app: The links
> work as long as the mails are in my Inbox.
> The link stops working when I’m moving them to my Archive.
>
> Also, fresh links to mails in the Archive also try to open them in my
> Inbox - where they aren’t any more of course.
>
> Is this a bug?
>
>
> Best regards,
> Tobias Frischholz
>
> PGP PUBLIC KEY: http://pgp.mit.edu/pks/lookup?search=0xCD463AC1=index
>
>


Re: [O] Valid use cases for lists?

2015-08-20 Thread Mike McLean
On Wed, Aug 19, 2015 at 3:55 PM, Rasmus ras...@gmx.us wrote:

 Chris Patti cpa...@gmail.com writes:

  I'm guessing I'm missing something obvious here, and that's why I'm
 asking.

 Export.  List are used everywhere.


I also use them for “simple” projects. I have a set of Task TODO keywords
for one-off tasks. I have a set of Project TODO keywords for projects.
Typically a project is a heading with a Project keyword and a number of
(level + 1) headings with Task keywords. For projects that span several
days/weeks this works well.

Some things that I do fall between Project and Task in the complexity. The
items needs 1-2 things done and discrete and different points in time
(temporal dependency, first A then B) or with different co workers
(collaboration) or both. The overall work, however, will only take 0-2
days. It's too big for a single task. It's too small for a Project. It's
related items that conceptually belong together. In Goldilocks fashion, a
check-box list is just the right size.

#+begin_example
** TODO Medium Sized “project” [1/3]
- [X] Get information from John
- [ ] Process information and send to Mary for review
- [ ] Finalize and submit final to Joe (based on Mary’s comments and
changes)
#+end_example


Re: [O] file or headline-local template for new subtree?

2015-07-14 Thread Mike McLean
On Tue, Jul 14, 2015 at 5:31 PM, Rasmus ras...@gmx.us wrote:

 Matt Price mopto...@gmail.com writes:

  I have this new system, in which I create a new subtree for every paper I
  grade. I'd love to have the new subtree automatically populated by a
  mostly-empty table on cration. Is this something I can do on a per-file
  basis; or perhaps even something I can change with every level 1 heading?
  I can think of a couple uses for this, actually.

 I'm fond of org-structure-template-alist, but it might not be powerful
 enough for what you want here.  On a per file basis you could bind some
 letter in org-structure-template-alist.  ATM it cannot guess how to insert
 a subtree.  But there's org-insert-subheading.


Something I do alot of is have Org Capture templates as files. This lets me
write a more complex capture template (in my case for one of several
“roles” that I take on ad-hoc but recurring basis during meetings).

I call the template with an entry like the following in
org-capture-templates.

(Mg Grammarian
 entry
 (file+headline ~/Documents/OrgMaster/org/Toastmasters.org Miscellaneous
and Non-Goal roles 2015)
 (file ~/.init/emacs/org-capture-templates/grammarian.org_template)
 :jump-to-captured t :immediate-finish t)

In this specific case, it places the entry under a special pre-defined Org
heading, but I could always call org-capture with a `C-0' (zero) prefix to
insert a template at point.

I can edit the template file as things change, and it can be pretty complex
(some of my represent Projects: A header, several sub headers as tasks,
etc.).


Re: [O] Fwd: Patch - Org Mac Outlook - Fix Call to Outlook in some cases

2015-06-09 Thread Mike McLean
Here is a version of the patch with a (hopefully) correct Changelog format




[image: --]

Mike McLean
[image: https://]about.me/mikemclean
https://about.me/mikemclean?promo=email_sig


On Thu, Apr 9, 2015 at 5:27 PM, Mike McLean mike.mcl...@pobox.com wrote:

 @Rasmus - I created the first version of Org Mac Outlook and at the time
 didn't have an active virtual running so didn't notice the difference.

 Commit ff771c5c7eab5c4d4a60e9f1270319758961338d
 Author: Mike McLean mike.mcl...@pobox.com
 AuthorDate: Sat Sep 7 16:29:40 2013 -0400
 Commit: Carsten Dominik carsten.domi...@gmail.com
 CommitDate: Sun Sep 8 07:56:30 2013 +0200

 Add Microsoft Outlook Support to org-mac-link

 @Alan - It does make a different if you have Microsoft Outlook as a
 shortcut into a Windows virtual that has been exported/exposed to the Mac
 OS via something like the Parallels “Windows apps added to Launchpad”
 feature. “Microsoft Outlook” may try to launch the Windows Virtual
 “Microsoft Outlook.app” will force the OS X native version.



 On Thu, Apr 9, 2015 at 1:11 PM, Alan Schmitt 
 alan.schm...@polytechnique.org wrote:

 On 2015-04-09 15:59, Mike McLean mike.mcl...@pobox.com writes:

  Hello - I just noticed that this patch does not seem to have been
 applied. Is
  there a problem with it?

 I'd be happy to apply it. I have a question about it:

  The AppleScript commands may try to select the WinTel version of
 Microsoft
  Outlook. This—obviously—doesn’t work. By adding the Mac ~.app~ file
  extension, we reduce this confusion and more reliably call the Macintosh
  version of Outlook.

 I tried this AppleScript
 #+begin_src applescript
 tell application Mail.app
   activate
 end tell
 #+end_src

 and as I ran it it got normalized to
 #+begin_src applescript
 tell application Mail
   activate
 end tell
 #+end_src

 Does the .app suffix really make a difference?

 Best,

 Alan

 --
 OpenPGP Key ID : 040D0A3B4ED2E5C7





0001-org-mac-link.el-Reduce-Outlook-App-confusion.patch
Description: Binary data


[O] Fwd: Patch - Org Mac Outlook - Fix Call to Outlook in some cases

2015-04-09 Thread Mike McLean
Hello - I just noticed that this patch does not seem to have been applied.
Is there a problem with it?


-- Forwarded message --
From: Mike McLean mike.mcl...@pobox.com
Date: Sat, Dec 20, 2014 at 3:34 PM
Subject: Patch - Org Mac Outlook - Fix Call to Outlook in some cases
To: emacs-orgmode emacs-orgmode@gnu.org


If the user has:
- a virtual solution (Parallels, etc.)
- with Office for PC installed
- and configured to  expose WinTel applications to the Macintosh Finder

The AppleScript commands may try to select the WinTel version of Microsoft
Outlook. This—obviously—doesn’t work. By adding the Mac ~.app~ file
extension, we reduce this confusion and more reliably call the Macintosh
version of Outlook.

TINYCHANGE


0001-Reduce-confusion-around-Outlook-application.patch
Description: Binary data


Re: [O] Clock history as autocomplete?

2015-04-03 Thread Mike McLean
I get the general effect using Emacs Helm with some additional commands as
part of the helm definitions. My original idea was from Sacha Chua (
http://sachachua.com/blog/2015/03/getting-helm-org-refile-clock-create-tasks/
) but I didn't implement her stuff as written (in part I didn't
conceptually merge capture/create with goto/refile/clock as she did). I
went for simpler. I can call my mlm/helm-org-agenda-files-headings
with (kbd C-x c o), use Helm completion to find the right headline, and
then Goto, Refile current heading to, Clock In, Clock In and Goto, or
Insert Link


#+begin_src emacs-lisp :tangle package-init/init-helm.el :comments both
(defun my/helm-org-clock-in (marker)
  (save-window-excursion
(helm-org-goto-marker marker)
(if (derived-mode-p 'org-agenda-mode) (org-agenda-clock-in)
(org-clock-in))
t))

(defun my/helm-org-clock-in-and-goto (marker)
  (helm-org-goto-marker marker)
  (if (derived-mode-p 'org-agenda-mode) (org-agenda-clock-in)
(org-clock-in)))

(cl-defun mlm/helm-source-org-headings-for-files (filenames
  optional (min-depth 1)
(max-depth 8))
  (helm-build-sync-source Org Headings
:candidates (helm-org-get-candidates filenames min-depth max-depth)
:persistent-help Go to line (keeping session); f1 Go to line; f2
Refile to this heading; f3 Clock In; f4 Clock in and Goto; f5 Insert
link to this heading
:action '((Go to line . helm-org-goto-marker)
  (Refile to this heading . helm-org-heading-refile)
  (Clock in . my/helm-org-clock-in)
  (Clock in and Go to . my/helm-org-clock-in-and-goto)
  (Insert link to this heading .
helm-org-insert-link-to-heading-at-marker


(defun mlm/helm-org-agenda-files-headings ()
  (interactive)
  (helm :sources (mlm/helm-source-org-headings-for-files (org-agenda-files))
:candidate-number-limit 9
:buffer *helm org headings*))

(global-set-key (kbd C-x c o) 'mlm/helm-org-agenda-files-headings)
#+end_src


On Fri, Apr 3, 2015 at 4:42 AM, Marcin Borkowski mb...@wmi.amu.edu.pl
wrote:

 Hi there,

 I use C-u C-c C-x C-i (selecting clocking task from the history) /all
 the time/.  However, I would very much prefer entering the clocking task
 with autocompletion, from a longer history, or even all headings that
 already have a clock (I have (setq org-clock-history-length 20) in my
 init.el, and sometimes it's not enough...).  Is that possible?

 Best,

 --
 Marcin Borkowski
 http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
 Faculty of Mathematics and Computer Science
 Adam Mickiewicz University




Re: [O] Org-Mode and Mac OS X advice

2015-03-30 Thread Mike McLean
On Sat, Mar 28, 2015 at 12:26 PM, Rick Frankel r...@rickster.com wrote:

 On Thu, Mar 26, 2015 at 02:57:40PM +0100, Alan Schmitt wrote:
  On 2015-03-26 14:50, Bernd Haug bernd.h...@xaidat.com writes:
 
  I'm using this nice trick (passed to me by a colleague) that sets the
  environment variables and path to be the same in zsh and emacs (launched
  From the GUI).
 
  #+begin_src emacs-lisp
  (let ((vars (split-string-and-unquote (shell-command-to-string .
 ~/.zshrc; export) \n)))
(mapcar (lambda (X) (let ((var_val (split-string-and-unquote X =)))
  (setenv (car var_val) (cadr var_val vars)
(setq exec-path
  (append
   (split-string-and-unquote (getenv PATH) :)
   exec-path)))
  #+end_src

 You could also use the `exec-path-from-shell' package, which will set a
 specified list of variables (defaults to MANPATH, PATH) from the shell.


Which is the way I do it also. I have the following in my emacs-init.org
file (that Tangles to my actual Emacs init file)

#+begin_src emacs-lisp :tangle yes
  (add-to-list 'el-get-sources '(:name exec-path-from-shell))
  (let ((exec-path-from-shell.el
~/.emacs.d/el-get/exec-path-from-shell/exec-path-from-shell.el))
(when (file-exists-p exec-path-from-shell.el)
  (load exec-path-from-shell.el)
  (require 'exec-path-from-shell)
  (when (memq window-system '(mac ns))
(exec-path-from-shell-initialize
#+end_src





 rick




Re: [O] Org-Mode and Mac OS X advice

2015-03-27 Thread Mike McLean
On Thu, Mar 26, 2015 at 9:18 AM, Chris Willard ch...@meliser.co.uk wrote:

 Hello All,

 I am thinking about changing to a Mac from Windows and wanted to check
 that there are no issues with using org-mode in OS X.


No problems here; including exports to PDF via LaTeX.



 I would like to know what version of Emacs people use (e.g. Aquamacs)
 and also if there are any issues using org-mode on a Mac. For example,
 I export to PDF frequently so would like to know if I need any other
 software for this.


I use native Gnu Emacs from Homebrew. I've alternated between release and
--HEAD in the past; I'm currently using a release version and not the Git
Master.

$ brew info emacs
emacs: stable 24.4 (bottled), devel 24.4-dev, HEAD
https://www.gnu.org/software/emacs/
/usr/local/Cellar/emacs/24.4 (3922 files, 119M) *
  Built from source with: --cocoa, --with-gnutls
From:
https://github.com/Homebrew/homebrew/blob/master/Library/Formula/emacs.rb

 I use MacTex for the Tex/LaTeX pieces.



 Many thanks,

 Chris







Re: [O] [ANN] [OT] New Android app (Orgzly)

2015-01-22 Thread Mike McLean
Orgzly is non-free software, and people should not install it, or suggest
installing it, or even tell people it exists.

On Thu, Jan 22, 2015 at 4:23 PM, Subhan Michael Tindall 
subh...@familycareinc.org wrote:

 OK, I love this!


Orgzly is non-free software, and people should not install it, or suggest
installing it, or even tell people it exists.


Re: [O] How do you use `pre-scheduled' deadline skipping with repeaters?

2014-12-24 Thread Mike McLean
On Tue, Dec 23, 2014 at 6:14 PM, Trevor Murphy trevor.m.mur...@gmail.com
wrote:


 So, yeah.  Do others use this `pre-scheduled' workflow for repeating
 deadlines?  If so, is there an obvious solution to this little nuisance
 that I'm not seeing?


I do use this style of workflow. But, where I have repeating tasks that I
want to treat this way, I clone them and don't use the repeat function.


[O] Patch - Org Mac Outlook - Fix Call to Outlook in some cases

2014-12-20 Thread Mike McLean
If the user has:
- a virtual solution (Parallels, etc.)
- with Office for PC installed
- and configured to  expose WinTel applications to the Macintosh Finder

The AppleScript commands may try to select the WinTel version of Microsoft
Outlook. This—obviously—doesn’t work. By adding the Mac ~.app~ file
extension, we reduce this confusion and more reliably call the Macintosh
version of Outlook.

TINYCHANGE


0001-Reduce-confusion-around-Outlook-application.patch
Description: Binary data


Re: [O] Recent startup error in Org

2014-11-01 Thread Mike McLean
More information:

Git Bisect yields the following:

61a241f0dc07aef5a3a5c2bd037a197236bde2e6 is the first bad commit
commit 61a241f0dc07aef5a3a5c2bd037a197236bde2e6
Author: Nicolas Goaziou m...@nicolasgoaziou.fr
Date:   Tue Oct 14 10:53:29 2014 +0200

Rewrite setup keywords initialization

* lisp/org-table.el (org-table-set-constants): Remove function.
* lisp/org.el (org-set-regexps-and-options): Rewrite function.  Merge
  it with `org-set-regexps-and-options-for-tags'.
(org-set-regexps-and-options-for-tags): Remove function
(org--setup-collect-keywords, org--setup-process-tags): New functions.
(org-mode): Remove `org-set-regexps-and-options-for-tags' call.
(org-agenda-prepare-buffers): Use optimized setup for tags in all
cases.  Improve docstring.
(org-make-options-regexp): Make returned regexp more efficient.

:04 04 afaa4ae741d1427954081fcbc29ee4a0363e6636
4a2d2634d397a45d3c9528fb1919a6e1a1315430 M lisp


On Fri, Oct 31, 2014 at 5:51 PM, Mike McLean mike.mcl...@pobox.com wrote:

 Hello

 I updated to git-head today; my most recent update was about 1 week prior.
 Today I get a startup error in Emacs (Back trace of debug-init below).

 Emacs Version: GNU Emacs 24.4.1 (x86_64-apple-darwin13.4.0, NS
 apple-appkit-1265.21) of 2014-10-21 on mac-mike-2013

 Org Version: Org-mode version 8.3beta (release_8.3beta-513-gaa1fd6.dirty @
 /Users/mlm/.emacs.d/el-get/org-mode/lisp/)

 Debugger entered--Lisp error: (error Symbol nil may not be buffer-local)
   make-local-variable(nil)
   org-set-regexps-and-options()
   org-mode()
   set-auto-mode-0(org-mode nil)
   set-auto-mode()
   normal-mode(t)
   after-find-file(nil t)
   find-file-noselect-1(#buffer break-tracking.org
 ~/Documents/OrgMaster/org/break-tracking.org nil nil
 ~/Documents/OrgMaster/org/break-tracking.org (259606255 16777220))
   find-file-noselect(/Users/mlm/Documents/OrgMaster/org/
 break-tracking.org)
   #[(f) \301\302 \\210\303 !\207 [f message Opening Org mode file: %s
 find-file-noselect] 3](/Users/mlm/Documents/OrgMaster/org/
 break-tracking.org)
   mapc(#[(f) \301\302 \\210\303 !\207 [f message Opening Org mode
 file: %s find-file-noselect] 3]
 (/Users/mlm/Documents/OrgMaster/financial-notes/Financial-Notes.org
 /Users/mlm/Documents/OrgMaster/Library-eReader-Device-Support/Library-eReader-Device-Recommendation.org
 /Users/mlm/Documents/OrgMaster/Life_Planning/Life_Plan.org
 /Users/mlm/Documents/OrgMaster/MaaS360/MaaS360-for-Mobile-Development.org
 /Users/mlm/Documents/OrgMaster/MaaS360/MaaS360.org
 /Users/mlm/Documents/OrgMaster/Macintosh-Vision-Goals-Strategy/Macintosh-Vision-Goals-Strategy.org
 /Users/mlm/Documents/OrgMaster/Mobile-Vision-Goals-Strategy/Mobile-Vision-Goals-Strategy.org
 /Users/mlm/Documents/OrgMaster/org/Agile_Results.org
 /Users/mlm/Documents/OrgMaster/org/BCBSFL/BCBSFL-Journal.org
 /Users/mlm/Documents/OrgMaster/org/BCBSFL/Bulletproof_Configuration_Security_Vulnerability_Remediation.org
 /Users/mlm/Documents/OrgMaster/org/BCBSFL/Caretaker_of_Sustainable_Macintosh_Ecosystem.org
 /Users/mlm/Documents/OrgMaster/org/BCBSFL/Florida-Blue-Administrative-Overhead.org
 /Users/mlm/Documents/OrgMaster/org/BCBSFL/Macintosh_Strategic_Planner_Extraordinaire.org
 /Users/mlm/Documents/OrgMaster/org/BCBSFL/Master_of_Mobile_Device_Strategy_and_Support.org
 /Users/mlm/Documents/OrgMaster/org/BCBSFL/Provider_of_Superior_Macintosh_Support.org
 /Users/mlm/Documents/OrgMaster/org/BCBSFL/Rocket_Propelled_Career.org
 /Users/mlm/Documents/OrgMaster/org/BCBSFL/SLT-ipad-tracking.org
 /Users/mlm/Documents/OrgMaster/org/break-tracking.org
 /Users/mlm/Documents/OrgMaster/org/Commute.org
 /Users/mlm/Documents/OrgMaster/org/Effective-and-Efficient.org
 /Users/mlm/Documents/OrgMaster/org/from-mobile.org
 /Users/mlm/Documents/OrgMaster/org/Health-Fitness-Vitality.org
 /Users/mlm/Documents/OrgMaster/org/Home-Technology.org
 /Users/mlm/Documents/OrgMaster/org/Journal.org
 /Users/mlm/Documents/OrgMaster/org/Julie.org
 /Users/mlm/Documents/OrgMaster/org/Learn-Everything.org
 /Users/mlm/Documents/OrgMaster/org/Montu.org
 /Users/mlm/Documents/OrgMaster/org/Outstanding-Marriage.org
 /Users/mlm/Documents/OrgMaster/org/PamperedChef.org
 /Users/mlm/Documents/OrgMaster/org/Personal-Administrative-Overhead.org
 /Users/mlm/Documents/OrgMaster/org/refile.org
 /Users/mlm/Documents/OrgMaster/org/Toastmasters.org
 /Users/mlm/Documents/OrgMaster/Periodic-Reporting/background.org
 /Users/mlm/Documents/OrgMaster/Periodic-Reporting/Periodic-Report.org
 /Users/mlm/Documents/OrgMaster/Twinleaf_HOA/Twinleaf-Administrative-Overhead.org
 /Users/mlm/Documents/OrgMaster/Twinleaf_HOA/Twinleaf-Journal.org
 /Users/mlm/Documents/OrgMaster/Twinleaf_HOA/Twinleaf-Operations.org
 ~/.init/emacs/emacs-init.org ~/.init/emacs/org-init.org))
   byte-code(\302\303\304\\210\305 \306\307 \\207 [org-feed-alist
 org-agenda-files add-to-list org-export-filter-final-output-functions
 mlm-latex-add-bibliography nil mapc #[(f) \301\302 \\210\303 !\207 [f

Re: [O] Recent startup error in Org

2014-11-01 Thread Mike McLean
On Sat, Nov 1, 2014 at 7:08 AM, Nicolas Goaziou m...@nicolasgoaziou.fr
wrote:

 Hello,

 Mike McLean mike.mcl...@pobox.com writes:

  I updated to git-head today; my most recent update was about 1 week
 prior.
  Today I get a startup error in Emacs (Back trace of debug-init below).
 
  Emacs Version: GNU Emacs 24.4.1 (x86_64-apple-darwin13.4.0, NS
  apple-appkit-1265.21) of 2014-10-21 on mac-mike-2013
 
  Org Version: Org-mode version 8.3beta (release_8.3beta-513-gaa1fd6.dirty
 @
  /Users/mlm/.emacs.d/el-get/org-mode/lisp/)
 
  Debugger entered--Lisp error: (error Symbol nil may not be
 buffer-local)

 This should be fixed. Thank you for reporting it.


I can confirm; fixed as of 82de7da

Thank you for the quick fix.


[O] Recent startup error in Org

2014-10-31 Thread Mike McLean
Hello

I updated to git-head today; my most recent update was about 1 week prior.
Today I get a startup error in Emacs (Back trace of debug-init below).

Emacs Version: GNU Emacs 24.4.1 (x86_64-apple-darwin13.4.0, NS
apple-appkit-1265.21) of 2014-10-21 on mac-mike-2013

Org Version: Org-mode version 8.3beta (release_8.3beta-513-gaa1fd6.dirty @
/Users/mlm/.emacs.d/el-get/org-mode/lisp/)

Debugger entered--Lisp error: (error Symbol nil may not be buffer-local)
  make-local-variable(nil)
  org-set-regexps-and-options()
  org-mode()
  set-auto-mode-0(org-mode nil)
  set-auto-mode()
  normal-mode(t)
  after-find-file(nil t)
  find-file-noselect-1(#buffer break-tracking.org
~/Documents/OrgMaster/org/break-tracking.org nil nil
~/Documents/OrgMaster/org/break-tracking.org (259606255 16777220))
  find-file-noselect(/Users/mlm/Documents/OrgMaster/org/break-tracking.org
)
  #[(f) \301\302 \\210\303 !\207 [f message Opening Org mode file: %s
find-file-noselect] 3](/Users/mlm/Documents/OrgMaster/org/
break-tracking.org)
  mapc(#[(f) \301\302 \\210\303 !\207 [f message Opening Org mode file:
%s find-file-noselect] 3]
(/Users/mlm/Documents/OrgMaster/financial-notes/Financial-Notes.org
/Users/mlm/Documents/OrgMaster/Library-eReader-Device-Support/Library-eReader-Device-Recommendation.org
/Users/mlm/Documents/OrgMaster/Life_Planning/Life_Plan.org
/Users/mlm/Documents/OrgMaster/MaaS360/MaaS360-for-Mobile-Development.org
/Users/mlm/Documents/OrgMaster/MaaS360/MaaS360.org
/Users/mlm/Documents/OrgMaster/Macintosh-Vision-Goals-Strategy/Macintosh-Vision-Goals-Strategy.org
/Users/mlm/Documents/OrgMaster/Mobile-Vision-Goals-Strategy/Mobile-Vision-Goals-Strategy.org
/Users/mlm/Documents/OrgMaster/org/Agile_Results.org
/Users/mlm/Documents/OrgMaster/org/BCBSFL/BCBSFL-Journal.org
/Users/mlm/Documents/OrgMaster/org/BCBSFL/Bulletproof_Configuration_Security_Vulnerability_Remediation.org
/Users/mlm/Documents/OrgMaster/org/BCBSFL/Caretaker_of_Sustainable_Macintosh_Ecosystem.org
/Users/mlm/Documents/OrgMaster/org/BCBSFL/Florida-Blue-Administrative-Overhead.org
/Users/mlm/Documents/OrgMaster/org/BCBSFL/Macintosh_Strategic_Planner_Extraordinaire.org
/Users/mlm/Documents/OrgMaster/org/BCBSFL/Master_of_Mobile_Device_Strategy_and_Support.org
/Users/mlm/Documents/OrgMaster/org/BCBSFL/Provider_of_Superior_Macintosh_Support.org
/Users/mlm/Documents/OrgMaster/org/BCBSFL/Rocket_Propelled_Career.org
/Users/mlm/Documents/OrgMaster/org/BCBSFL/SLT-ipad-tracking.org
/Users/mlm/Documents/OrgMaster/org/break-tracking.org
/Users/mlm/Documents/OrgMaster/org/Commute.org
/Users/mlm/Documents/OrgMaster/org/Effective-and-Efficient.org
/Users/mlm/Documents/OrgMaster/org/from-mobile.org
/Users/mlm/Documents/OrgMaster/org/Health-Fitness-Vitality.org
/Users/mlm/Documents/OrgMaster/org/Home-Technology.org
/Users/mlm/Documents/OrgMaster/org/Journal.org
/Users/mlm/Documents/OrgMaster/org/Julie.org
/Users/mlm/Documents/OrgMaster/org/Learn-Everything.org
/Users/mlm/Documents/OrgMaster/org/Montu.org
/Users/mlm/Documents/OrgMaster/org/Outstanding-Marriage.org
/Users/mlm/Documents/OrgMaster/org/PamperedChef.org
/Users/mlm/Documents/OrgMaster/org/Personal-Administrative-Overhead.org
/Users/mlm/Documents/OrgMaster/org/refile.org
/Users/mlm/Documents/OrgMaster/org/Toastmasters.org
/Users/mlm/Documents/OrgMaster/Periodic-Reporting/background.org
/Users/mlm/Documents/OrgMaster/Periodic-Reporting/Periodic-Report.org
/Users/mlm/Documents/OrgMaster/Twinleaf_HOA/Twinleaf-Administrative-Overhead.org
/Users/mlm/Documents/OrgMaster/Twinleaf_HOA/Twinleaf-Journal.org
/Users/mlm/Documents/OrgMaster/Twinleaf_HOA/Twinleaf-Operations.org
~/.init/emacs/emacs-init.org ~/.init/emacs/org-init.org))
  byte-code(\302\303\304\\210\305 \306\307 \\207 [org-feed-alist
org-agenda-files add-to-list org-export-filter-final-output-functions
mlm-latex-add-bibliography nil mapc #[(f) \301\302 \\210\303 !\207 [f
message Opening Org mode file: %s find-file-noselect] 3]] 3)
  load(/Users/mlm/.init/emacs/package-init/init-org-mode noerror)
  el-get-load-package-user-init-file(org-mode)
  eval((el-get-load-package-user-init-file (quote org-mode)))
  byte-code(\306 \307 \n\ \310 ! \311\312 \313\! \312 \314\ 7\311\312
\315\! 8\311\316 !! 9\317 \320 :# ;\312 \321\ \312 \322\ =\312 \323\
\312 \324\ ?\312 \325\ @\326 ! A\327
!\210\f\330=\204\272\f\331\235\204\211 9\332 B\211 C\203\203 C@ B\333 \334
B#\210 CA\211 C\204n*\335 \336\\210 D\203\222\337 !\210 7\340=\204\272\311
7!\332 E\211 C\203\271 C@ E\341 E!\210 CA\211 C\204\246*\342 \343 #\210\342
=\344 #\210 ;\2048
\332 E\211 C\203 C@ E A EP F\345 F!\204\360\346\347 F\\210\350\351
F\\210\341 F!\210) CA\211 C\204\327*\f\352=\2048 8\332 G\211 C\2037 C@
G\353 G! H\350\354 H\\210\355 H!\210) CA\211 C\204 * ;\203A \356\202B \342
;\203N \357\360 \\202O \361 I\211 J \362 #\210 I\363\364 DD!\210 J
?\365 #\210*\366\301!\203z
\353 ! KB K. \332\207 [el-get-sources package package-status-alist source
method loads el-get-package-status-recipes
el-get-read-package-status-recipe 

Re: [O] An Org-mode LaTeX class?

2014-10-28 Thread Mike McLean
On Tue, Oct 28, 2014 at 4:02 AM, Fabrice Popineau 
fabrice.popin...@supelec.fr wrote:

 I think that I don't know if you can suit everybody's need but that is
 worth a try.
 For myself, I already wrote a dedicated LaTeX class, because it was too
 cumbersome
 to configure org-mode for the different kind of documents I need to produce
 (not impossible, just too lengthy to duplicate parameters).


I did something similar, for similar reasons. I found it easier to make a
LaTeX Template look like what I wanted than to force Org into generating
LaTeX that was what I wanted.


 Hence, I have a class that can output exams, lab sessions texts, course
 notes and slides
 with only a couple of options.


I haven't done slides yet, because I've not picked up Beamer and my
approach was more branding. I have once class that brand-matches my primary
employer (Font, logo usage, etc.), another one that matches one of my large
volunteer efforts, and yet another generic “personal” one for “my”
documents.


 And I export only subtrees that are configured for
 this class. it took a bit of time, but it definitely worth it.


Agreed



 2014-10-28 2:37 GMT+01:00 Marcin Borkowski mb...@wmi.amu.edu.pl:

 Hi all,

 I have a dream;-).

 Imagine someone wrote a dedicated Org-mode LaTeX class, and the LaTeX
 exporter got an option to export to this class.  The class modifies
 LaTeX so that it supports all Org's elements and objects, and things
 like tags, timestamps, checkboxes etc.  Moreover, the look of these
 elements is configurable on the LaTeX end, and further by means of Org
 options.  This way, we drop the generic LaTeX thing (which is nice for
 people sending articles to journals etc. – so my dream should not
 replace the current LaTeX exporter, only constitute a variant!), but
 instead we gain a beautiful, configurable pdf rendering of Org buffers.


Though I'll admit this does sound intriguing.


Re: [O] agenda time grid -- default time slot lines

2014-10-06 Thread Mike McLean
Attached is a patch that updates the Docstring of org-agenda-time-grid to
match the actual options.


On Mon, Oct 6, 2014 at 4:58 AM, Sebastien Vauban sva-n...@mygooglest.com
wrote:

 hymie! wrote:
  My Agenda for a-week-from-next-Tuesday looks like this:
 
  Tuesday14 October 2014
 8:00.. 
10:00.. 
12:00.. 
tasks:  14:00-15:00 IT-Security meeting
14:00.. 
16:00.. 
 
  Assuming that I cannot suppress the 14:00 line in this case ...
  shouldn't the task line be **below** the 14:00 line?  I can force
  it by changing the meeting time from 14:00 to 14:01, but it seems like
  this is the wrong way to list them.  The meeting is not between 12:00
  and 14:00.  It's between 14:00 and 16:00.

 False assumption!  ;-)

 Use `remove-match':

 --8---cut here---start-8---
   (setq org-agenda-time-grid '((daily remove-match)

(0800 1000 1200 1400 1600 1800 2000)))
 --8---cut here---end---8---

 Best regards,
   Seb

 --
 Sebastien Vauban





0001-org-agenda.el-Update-docstring.patch
Description: Binary data


Re: [O] latex header lines vs latex block

2014-09-10 Thread Mike McLean
On Tue, Sep 9, 2014 at 10:52 AM, Thorsten Jolitz tjol...@gmail.com wrote:

 Sebastien Vauban sva-n...@mygooglest.com
 writes:

  See
 http://lists.gnu.org/archive/html/emacs-orgmode/2014-06/msg00744.html
  for Nicolas' answer on this point:
 
╭
│ I suggest to use existing solutions instead: configure
│ `org-latex-classes'.
╰


 a related question: is this the right format to create the preamble
 string:

 #+BEGIN_SRC emacs-lisp
 '(;; Name
   obb-article-full-page
   ;; Preamble
   (concat
\\documentclass{article}\n
[DEFAULT-PACKAGES]\n
[PACKAGES]\n
[EXTRA]\n
\\usepackage[cm]{fullpage}\n)
   ;; Sectioning Structure
   (\\part{%s} . \\part*{%s})
   (\\chapter{%s} . \\chapter*{%s}) ...)
 #+END_SRC

 not sure if I need the line-feeds ...


I don't think you do. I build my org-latex-classes with add-to-list, so an
example of mine is:

(add-to-list 'org-latex-classes
 '(MikeMcLean
   \\documentclass{MikeMcLean}
 [DEFAULT-PACKAGES]
 [PACKAGES]
 [EXTRA]
 
   (\\chapter{%s} . \\chapter*{%s})
   (\\section{%s} . \\section*{%s})
   (\\subsection{%s} . \\subsection*{%s})
   (\\subsubsection{%s} . \\subsubsection*{%s})
   (\\paragraph{%s} . \\paragraph*{%s})
   (\\subparagraph{%s} . \\subparagraph*{%s})))

The MikeMcLean document class (all of my 3-4 main classes, really) are a
moderate wrapper around the memoir class. A document I produce for myself
looks different than one that I produce as part of my employment or
volunteer effort(s), even though I produce them all from Org.

- Sets some class options
- Requires some packages I use a lot (minted, e.g.)
- Defines some fonts and colors.
- Sets page options (footers, chapter headers, sectioning, etc.)
- Defines a title page






 --
 cheers,
 Thorsten





[O] [PATCH] Add DEVONthink Pro to Org Mac Link

2014-06-13 Thread Mike McLean
This patch adds support for DEVONthink Pro Office
http://www.devontechnologies.com/products/devonthink/devonthink-pro-office.html
to Org Mac Links. This likely works for all versions of DEVONthink, but
that is not tested.

Mike




From 50c1ded7cb403cecfe09d4ca0be704ba65e05253 Mon Sep 17 00:00:00 2001
From: Mike McLean mike.mcl...@pobox.com
Date: Sat, 14 Jun 2014 00:13:22 -0400
Subject: [PATCH] Add DEVONthink Pro to Org Mac Link

Add DEVONthink Pro Office (likely DEVONthink and DEVONthink Pro also,
but I do not have those variants to test) to Org Mac. Support for
collecting one (or several) DEVONthink items as Org link and support
for opening x-devonthink-item links from withing Org mode.
---
 contrib/lisp/org-mac-link.el | 73

 1 file changed, 73 insertions(+)

diff --git a/contrib/lisp/org-mac-link.el b/contrib/lisp/org-mac-link.el
index 2eafa1b..c53871f 100644
--- a/contrib/lisp/org-mac-link.el
+++ b/contrib/lisp/org-mac-link.el
@@ -9,6 +9,7 @@
 ;;  Christopher Suckling suckling at gmail dot com
 ;;  Daniil Frumin difru...@gmail.com
 ;;  Alan Schmitt alan.schm...@polytechnique.org
+;;  Mike McLean mike.mcl...@pobox.com
 ;;
 ;;
 ;; Version: 1.1
@@ -58,6 +59,7 @@
 ;; Together.app - Grab links to the selected items in the library list
 ;; Skim.app - Grab a link to the selected page in the topmost pdf document
 ;; Microsoft Outlook.app - Grab a link to the selected message in the
message list
+;; DEVONthink Pro Office.app - Grab a link to the selected DEVONthink
item(s); open DEVONthink item by reference
 ;;
 ;;
 ;; Installation:
@@ -110,6 +112,12 @@ applications and inserting them in org documents
   :group 'org-mac-link
   :type 'boolean)

+(defcustom org-mac-grab-devonthink-app-p t
+  Enable menu option [d]EVONthink to grab links from DEVONthink Pro
Office.app
+  :tag Grab DEVONthink Pro Office.app links
+  :group 'org-mac-link
+  :type 'boolean)
+
 (defcustom org-mac-grab-Addressbook-app-p t
   Enable menu option [a]ddressbook to grab links from AddressBook.app
   :tag Grab AddressBook.app links
@@ -192,6 +200,7 @@ applications and inserting them in org documents
   (interactive)
   (let* ((descriptors `((F inder org-mac-finder-insert-selected
,org-mac-grab-Finder-app-p)
 (m ail org-mac-message-insert-selected
,org-mac-grab-Mail-app-p)
+(d EVONthink Pro Office
org-mac-devonthink-item-insert-selected ,org-mac-grab-devonthink-app-p)
 (o utlook
org-mac-outlook-message-insert-selected ,org-mac-grab-Outlook-app-p)
 (a ddressbook
org-mac-addressbook-insert-selected ,org-mac-grab-Addressbook-app-p)
 (s afari org-mac-safari-insert-frontmost-url
,org-mac-grab-Safari-app-p)
@@ -707,6 +716,70 @@ list of mac-outlook:// links to flagged mail after
heading.

 ;;
 ;;
+;; Handle links from DEVONthink Pro Office.app
+;;
+
+(org-add-link-type x-devonthink-item 'org-devonthink-item-open)
+
+(defun org-devonthink-item-open (uid)
+  Open the given uid, which is a reference to an item in DEVONthink Pro
Office
+  (shell-command (concat open \x-devonthink-item: uid \)))
+
+(defun org-as-get-selected-devonthink-item ()
+  AppleScript to create links to selected items in DEVONthink Pro
Office.app.
+  (do-applescript
+   (concat
+set theLinkList to {}\n
+tell application \DEVONthink Pro\\n
+set selectedRecords to selection\n
+set selectionCount to count of selectedRecords\n
+if (selectionCount  1) then\n
+return\n
+end if\n
+repeat with theRecord in selectedRecords\n
+set theID to uuid of theRecord\n
+set theURL to \x-devonthink-item:\  theID\n
+set theSubject to name of theRecord\n
+set theLink to theURL  \::split::\  theSubject  \\n\\n
+copy theLink to end of theLinkList\n
+end repeat\n
+end tell\n
+return theLinkList as string
+)))
+
+(defun org-mac-devonthink-get-links ()
+  Create links to the item(s) currently selected in DEVONthink Pro Office.
+This will use AppleScript to get the `uuid' and the `name' of the
+selected items in DEVONthink Pro Office.app and make links out of
+it/them. This function will push the Org-syntax text to the kill
+ring, and also return it.
+  (message Org Mac DEVONthink: looking for selected items...)
+  (let* ((as-link-list (org-as-get-selected-devonthink-item))
+ (link-list (if as-link-list
+(mapcar
+ (lambda (x) (if (string-match
\\`\\\(.*\\)\\\' x) (setq x (match-string 1 x))) x)
+ (split-string as-link-list [\r\n]+))
+  nil))
+ orglink-list)
+(while link-list
+  (let* ((current-item (pop link-list)))
+(message current item: %s current-item)
+(when (and current-item (not (string= current-item )))
+  (let* ((split-link (split-string current-item ::split::))
+ (orglink (org-make

[O] Customization Survey 2013

2013-11-04 Thread Mike McLean
Hello All

I have 57 responses as of a  few minutes ago (not counting me, LOL). I will 
start tabulating tomorrow sometime. 

Thank you all

Mike




[O] Org Mode Customization Survey 2013

2013-10-31 Thread Mike McLean
All

As discussed a few days ago on this list, Carsten and the other developers are 
interested in what and how us users are customizing Org mode. This was first 
done in 2009, so a re-do of the survey is useful as is for how people are using 
Org now, as well as a comparison to the past.

Carsten provided the function that was used before to collect the raw data and 
I am working on the data collection and summarization this time around.

I have place the function on Github, 
https://github.com/SkydiveMike/org-customization-survey

The raw elisp is at: 
https://raw.github.com/SkydiveMike/org-customization-survey/master/org-customization-survey.el

All you need to do is:
1. Load and eval the function
2. Execute (interactive) org-customization-survey
3. Review the buffer, cleanse for sensitive information if any
4. Email the buffer to mike.mcl...@pobox.com (If your Emacs is configured for 
email, C-c C-c will send)

Mike




Re: [O] Problem with automatic recursive adding of org-agenda-files

2013-10-26 Thread Mike McLean

On Oct 26, 2013, at 10:12 AM, Sebastien Vauban sva-n...@mygooglest.com wrote:

 Tor Eriksson wrote:
 In fact, now I can not get the snippet to pick up *any *new .org file in
 the directory .../important-directory or subdiretory! Even when the new
 .org file sits adjacent to a file that is picked up by the snippet.
 
 Also, if I do the same procedure again to another file that is picked up by
 the snippet by: changing the name of the file, updating agenda with g and
 pressing Abort. Then this file is also not picked up any more; not under
 the new name or, if I change the name back, under it's old name.
 
 This is causing serious trouble to me, since I use this system to keep
 track of deadlines that are really important.
 
 Does anybody have any ideas?
 
 Check you don't have a customize-variables section at the end of your .emacs
 file.
 
 If you once did `[' or `]' or some such to add one Org file, Org adds a line 
 in
 your .emacs file. And that one will override your settings!!
 
 Really hard to find, if we don't think at such…

I add the follow to my setup to avoid any possibility of this:

(add-hook 'org-mode-hook
  '(lambda ()
 (org-defkey org-mode-map \C-c['undefined)
 (org-defkey org-mode-map \C-c]'undefined))
  'append)






Re: [O] Repeating the customization survey?

2013-10-25 Thread Mike McLean

On Oct 23, 2013, at 9:34 AM, Carsten Dominik drostekirs...@gmail.com wrote:

 Dear all,
 
 in 2009, we ran a customization survey, to figure out which variables are 
 actually used by active Org-mode users.  The results can be seen here:
 
   http://orgmode.org/worg/org-configs/org-customization-survey.html
 
 I was wondering if it would be useful to repeats this - the results might be 
 instructive.
 
 It should be much easier this time, because we now have a function that will 
 actually list all changed variables - so we would only have to ask people to 
 run a simple lisp command and send in the results.  Of course, then a 
 volunteer would have to collect and analyse the output.  Last time Manish and 
 myself did this, and I remember that it was interesting and fun.
 
 Any takers?

I'll bite; I don't have the Elisp skills (*) to contribute as meaningfully as I 
would like to Org and this sounds like a  good little side project.

Mike

(*) Nor the ability -- to the best of my interpretation -- to sign FSF papers.




Re: [O] Setup for switching between 2 org-mode configurations (demo/productive)?

2013-10-14 Thread Mike McLean

On Oct 14, 2013, at 1:01 AM, M elwood...@web.de wrote:

 Running a virtual machine for the second setup is an interesting idea, but
 it is problematic, as I'm using MacOS X 10.6 and AFAIK it is not permitted
 to run it in a VM.

It is allowed according to the license as long as it is on Apple hardware. So 
running VMWare Fusion or Parallels on OS X, with another copy of OS X as the 
guest would be a possible solution.

Re: [O] using %(sexp) in capture templates

2013-10-13 Thread Mike McLean

On Oct 12, 2013, at 5:54 PM, Manish mailtomanish.sha...@gmail.com wrote:

 
 
 i'll look into rebuilding outlook profiles and spotlight indexes.
 meanwhile, following has worked consistently for me:
 
 #+begin_src emacs-lisp
 (defun org-mac-outlook-message-open (msgid)
   open a message in outlook
   (do-applescript
(concat
 tell application \Microsoft Outlook\\n
  (format open message id %s\n msgid)
  activate\n
  end tell)))
 #+end_src
 
 cheers!
 --manish
 

And I just submitted a patch that changes to Outlook message open to use 
Applescript as your code does.

[O] [PATCH] Org Mac Outlook opens messages via AppleScript

2013-10-13 Thread Mike McLean
Previously ~org-mac-outlook-message-open~ used the Mac OS X Spotlight
index via ~mdfind~ to open messages via shell commands. This patch
changes the open to an AppleScript method to resolve an issue reported
by Manish Sharma.
---
 contrib/lisp/org-mac-link.el | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/contrib/lisp/org-mac-link.el b/contrib/lisp/org-mac-link.el
index 2ff6711..ebcff75 100644
--- a/contrib/lisp/org-mac-link.el
+++ b/contrib/lisp/org-mac-link.el
@@ -593,13 +593,13 @@ applications and inserting them in org documents
 (org-add-link-type mac-outlook 'org-mac-outlook-message-open)
 
 (defun org-mac-outlook-message-open (msgid)
-  Open a message in outlook
-  (let* ((record-id-string (format mdfind com_microsoft_outlook_recordID==%s 
msgid))
-   (found-message (replace-regexp-in-string \n$ 
-  (shell-command-to-string record-id-string
-(if (string= found-message )
-  (message org-mac-link: error could not find Outlook message %s 
(substring-no-properties msgid))
-  (shell-command (format open \`mdfind 
com_microsoft_outlook_recordID==%s`\ msgid)
+  Open a message in Outlook
+  (do-applescript
+   (concat
+tell application \Microsoft Outlook\\n
+ (format open message id %s\n (substring-no-properties msgid))
+ activate\n
+ end tell)))
 
 (defun org-as-get-selected-outlook-mail ()
   AppleScript to create links to selected messages in Microsoft Outlook.app.
-- 
1.8.3.4




Re: [O] using %(sexp) in capture templates

2013-10-12 Thread Mike McLean

On Oct 12, 2013, at 2:03 AM, Manish mailtomanish.sha...@gmail.com wrote:

   On Fri, Oct 11, 2013 at 9:55 PM, Mike McLean wrote:

   On Oct 10, 2013, at 9:51 PM, Manish wrote:
   
   i am trying to use %(org-mac-outlook-message-insert-selected)
   in a capture template to create a todo entry from an email
   selected in outlook on mac os x.  i was expecting that the
   function will get executed when the template is called and
   enter a link to the email but seems to return nothing.  the
   function works when used outside of template.  any ideas how i
   can begin to debug this or if i should be doing anything
   differently?
   

When I added the support for Outlook I matched the style and design
of the existing Org mac message (for Mail). In particular
org-mac-outlook-message-insert-selected does not return a value, it
is designed to be called interactively and inserts a link at the
current point in the current buffer. As such it would not work as a
%() capture template.

Now on the other hand all org-mac-outlook-message-insert-selected
does is ~(insert (org-mac-outlook-message-get-links s))~. I
presume (though I haven't tested) that you could use the inner form
~(org-mac-outlook-message-get-links s)~ in a %() sexp in a
capture template.

 
 thanks!  it does work this way.
 
 i am not sure if it's directly related but there's a weird issue.  once
 i have a link to an email, i can open it by c-c c-o only once.  any
 following attempt just fails with a message: org-mac-link: error could
 not find outlook message msgid where msgid is the id of the
 message. when i ran the mdfind command that i found in the source in the
 terminal, it again worked once only.  any subsequent attempt opens a
 finder window.  very very odd behavior since i am not even modifying the
 email in anyway (other than just opening it) that might change its
 message id or something.

It has definitely worked for the same message multiple times for me (even after 
changing a message by moving it, etc.). Since the Org mac Outlook interface 
uses Spotlight indexing, and Spotlight uses the loose messages in the Microsoft 
User Data folder, maybe rebuilding one or both of the Outlook profile or the 
Spotlight index would fix your issues?

Re: [O] using %(sexp) in capture templates

2013-10-11 Thread Mike McLean

On Oct 10, 2013, at 9:51 PM, Manish mailtomanish.sha...@gmail.com wrote:

 i am trying to use %(org-mac-outlook-message-insert-selected) in a
 capture template to create a todo entry from an email selected in
 outlook on mac os x.  i was expecting that the function will get
 executed when the template is called and enter a link to the email but
 seems to return nothing.  the function works when used outside of
 template.  any ideas how i can begin to debug this or if i should be
 doing anything differently?


When I added the support for Outlook I matched the style and design of the 
existing Org mac message (for Mail). In particular 
org-mac-outlook-message-insert-selected does not return a value, it is designed 
to be called interactively and inserts a link at the current point in the 
current buffer. As such it would not work as a %() capture template.

Now on the other hand all org-mac-outlook-message-insert-selected does is 
~(insert (org-mac-outlook-message-get-links s))~. I presume (though I haven't 
tested) that you could use the inner form ~(org-mac-outlook-message-get-links 
s)~ in a %() sexp in a capture template.

Mike




Re: [O] Difficulties Accessing git Repository

2013-10-08 Thread Mike McLean

On Oct 8, 2013, at 9:13 PM, Nick Dokos ndo...@gmail.com wrote:

 Charles Millar mill...@verizon.net writes:
 
 Hello,
 
 On 10/8/2013 1:32 PM, Josiah Schwab wrote:
 Hi All,
 
 I just tried to pull from the main org-mode git repository.  I
 encountered the following failure.
 
 ,
 | monolith:(stable) org-mode$ git pull
 | fatal: read error: Connection reset by peer
 `
 I can confirm this issue.  I successfully pulled earlier today though.
 This seems to be intermittent.  It worked (~8 hours) later on October 2.
 I tried to update a few minutes ago and again had a failure.
 
 Is there any other information that would be useful to report?  I tried
 to pull while at my home (residential ISP) and then my work
 (university), and had failures both times.
 
 Josiah
 
 
 This morning and just now I tried to update using
 
 cd ~/.elisp/org-mode  make update2
 
 and the following failure resulted
 
 rm -f
 git remote update
 Fetching origin
 fatal: read error: Connection reset by peer
 error: Could not fetch origin
 make: ***  [up0] error 1
 
 
 I just [21:12:04 EDT] tried it and it worked. The question is: did
 somebody do something to bring it back or is it really intermittent?

I couldn't pull this morning, nor just now.

$ git --no-pager fetch origin
fatal: read error: Connection reset by peer
git exited abnormally with code 128.






Re: [O] Suggestion: Weektree

2013-10-04 Thread Mike McLean

On Oct 1, 2013, at 11:43 AM, John Hendy jw.he...@gmail.com wrote:

 On Tue, Oct 1, 2013 at 5:11 AM, Anders Johansson mejlaande...@gmail.com 
 wrote:
 Greetings,
 It's very nice to keep a journal in a datetree (using the capture mechanism)
 but for my uses it would actually be even more useful to keep it in a
 /weektree/. Something like this:
 
 * 2013
 ** W39 (September 23 - September 29)
 *** 2013-09-23 Monday
  note 1
  note 2
 *** 2013-09-24 Tuesday
 *** 2013-09-25 Wednesday
 ** W52 (December 23 - December 29)
 *** 2013-09-25 Wednesday
  Christmas, no work done.
 * 2014
 ** W1 (December 30 - January 5)
 *** 2013-09-31 Tuesday
  New year's eve party!
 
 (with names of months and days localised as usual)
 
 
 [snip]
 
 Not quite what you want, but I was looking for how to customize the
 datetree using a capture template a bit back and made some decent
 progress. You might want to check out those threads. All you should
 need to do is figure out how to convert a date range (wherever you are
 in the current week) to a week number

I just did this (the conversion) recently so it was on my mind. This provides 
the week number as a string, not a number, and does based on “now,” but it 
should give you what you want.

Week number in ISO of beginning of this week based on a Monday week start:
(format-time-string %V (nth 0 (org-clock-special-range 'thisweek nil nil 1)))

Week number in ISO of end of this week based on a Monday week start:
(format-time-string %V (nth 1 (org-clock-special-range 'thisweek nil nil 1)))


HTH




 and then supply the
 supplementary start/stop days for the week in parentheses.
 
 I think I did have issues capturing to a non-existing top level tree;
 as in I think I had to pre-populate my year-month headline, and *then*
 I could capture my individual days to it. Anyway, give these a
 reading:
 - http://osdir.com/ml/emacs-orgmode-gnu/2012-08/msg00396.html
 - http://lists.gnu.org/archive/html/emacs-orgmode/2012-08/msg01174.html
 
 
 Best regards,
 John
 




Re: [O] Release 8.2

2013-10-02 Thread Mike McLean

On Sep 19, 2013, at 4:27 PM, Carsten Dominik carsten.domi...@gmail.com wrote:

 Microsoft Outlook support has been added to /org-mac-link.el/
 ~
 
  Thanks to Marc McLean for this patch.
 


Probably way to late now, but “Mike McLean” (not Marc)

No worries.




[O] User Defined Functions in Agenda Views

2013-09-21 Thread Mike McLean
Hello

I looked at the doc string for ~org-agenda-custom-commands~ and noticed that 
the you can use a user-defined function as a valid command type. I did not find 
anything in the documentation that describes how that user-defined function 
should work, what it should do, or how to write one. I looked at the code for 
other agenda types, such as ~tags-todo~ and ~occur-tree~ and have guessed at 
how to form one of these.

I can write documentation and samples if anyone want it (either to add to Org 
documentation or as a page on Worg), but want to ensure that I understand 
completely and correctly, first.

With that said, can those with far more knowledegble about Org code comment on 
my thoughts below.

The user defined function for an agenda view:
The Org agenda dispatch function will call a user-defined function with one 
parameter representing the ``match'' component from the agenda definition. In 
other words, ~(udf-test Hello)~ in ~org-agenda-custom-commands~ will result 
in a function call of ~udf-test~ with an argument of Hello.
The ~org-agenda-custom-commands~ varible does not requred a parameter and 
therefore the dispatcher does not require one. Define an user-defined wiht an 
optional argument: ~(defun udf-test (optional org-match) documentation… 
code)~
The user defined function should prepared a buffer to write the agenda 
information to using ~org-agenda-prepare~
The user defined function should handle setting a unique buffer name for the 
cases where ~org-agenda-sticky~ has a value of ~t~
Honor the setting of ~org-agenda-overriding-header~ and insert that text into 
the agenda buffer
Insert into the buffer the desired contents, accounting for also setting text 
properties (translation: “Magic happens here”)
Call ~org-agenda-finalize~ and ~(setq buffer-read-only t)~

Does this cover the basics?

Mike



Re: [O] [PATCH] Add Microsoft Outlook Support to org-mac-link

2013-09-09 Thread Mike McLean
I don't and I do need to check with my current employer before I could sign
them (*I* don't have a problem with it, but I'm just not sure of the
policies).


On Sun, Sep 8, 2013 at 1:50 AM, Carsten Dominik
carsten.domi...@gmail.comwrote:

 Hi Mike,

 we don't need papers for contrib stuff - but let
 me ask anyway:  Do you have signed FSF papers?

 Thanks

 - Carsten


 On 7.9.2013, at 22:29, Mike McLean mike.mcl...@pobox.com wrote:

  * contrib/lisp/org-mac-link.el: Add “o”utlook to capture descriptors
 along with
  functions to capture links from Microsoft Outlook for Mac.
 
  The functions here replicate those that capture from Mail.app.
  ---
  contrib/lisp/org-mac-link.el | 140
 +++
  1 file changed, 140 insertions(+)
 
  diff --git a/contrib/lisp/org-mac-link.el b/contrib/lisp/org-mac-link.el
  index 59b88d2..2ff6711 100644
  --- a/contrib/lisp/org-mac-link.el
  +++ b/contrib/lisp/org-mac-link.el
  @@ -13,6 +13,11 @@
  ;; Version: 1.1
  ;; Keywords: org, mac, hyperlink
  ;;
  +;; Version: 1.2
  +;; Keywords: outlook
  +;; Author: Mike McLean mike.mcl...@pobox.com
  +;; Add support for Microsoft Outlook for Mac as Org mode links
  +;;
  ;; This file is not part of GNU Emacs.
  ;;
  ;; This program is free software; you can redistribute it and/or modify
  @@ -51,6 +56,7 @@
  ;; Google Chrome.app - Grab the url of the frontmost tab in the
 frontmost window
  ;; Together.app - Grab links to the selected items in the library list
  ;; Skim.app - Grab a link to the selected page in the topmost pdf
 document
  +;; Microsoft Outlook.app - Grab a link to the selected message in the
 message list
  ;;
  ;;
  ;; Installation:
  @@ -97,6 +103,12 @@ applications and inserting them in org documents
:group 'org-mac-link
:type 'boolean)
 
  +(defcustom org-mac-grab-Outlook-app-p t
  +  Enable menu option [o]utlook to grab links from Microsoft
 Outlook.app
  +  :tag Grab Microsoft Outlook.app links
  +  :group 'org-mac-link
  +  :type 'boolean)
  +
  (defcustom org-mac-grab-Addressbook-app-p t
Enable menu option [a]ddressbook to grab links from AddressBook.app
:tag Grab AddressBook.app links
  @@ -179,6 +191,7 @@ applications and inserting them in org documents
(interactive)
(let* ((descriptors `((F inder org-mac-finder-insert-selected
 ,org-mac-grab-Finder-app-p)
  (m ail org-mac-message-insert-selected
 ,org-mac-grab-Mail-app-p)
  +(o utlook
 org-mac-outlook-message-insert-selected ,org-mac-grab-Outlook-app-p)
  (a ddressbook
 org-mac-addressbook-insert-selected ,org-mac-grab-Addressbook-app-p)
  (s afari org-mac-safari-insert-frontmost-url
 ,org-mac-grab-Safari-app-p)
  (f irefox
 org-mac-firefox-insert-frontmost-url ,org-mac-grab-Firefox-app-p)
  @@ -574,6 +587,133 @@ applications and inserting them in org documents
 
  ;;
  ;;
  +;; Handle links from Microsoft Outlook.app
  +;;
  +
  +(org-add-link-type mac-outlook 'org-mac-outlook-message-open)
  +
  +(defun org-mac-outlook-message-open (msgid)
  +  Open a message in outlook
  +  (let* ((record-id-string (format mdfind
 com_microsoft_outlook_recordID==%s msgid))
  + (found-message (replace-regexp-in-string \n$ 
  +  (shell-command-to-string record-id-string
  +(if (string= found-message )
  +  (message org-mac-link: error could not find Outlook message %s
   (substring-no-properties msgid))
  +  (shell-command (format open \`mdfind
 com_microsoft_outlook_recordID==%s`\ msgid)
  +
  +(defun org-as-get-selected-outlook-mail ()
  +  AppleScript to create links to selected messages in Microsoft
 Outlook.app.
  +  (do-applescript
  +   (concat
  +tell application \Microsoft Outlook\\n
  +set msgCount to count current messages\n
  +if (msgCount  1) then\n
  +return\n
  +end if\n
  +set theLinkList to {}\n
  +set theSelection to (get current messages)\n
  +repeat with theMessage in theSelection\n
  +set theID to id of theMessage as string\n
  +set theURL to \mac-outlook:\  theID\n
  +set theSubject to subject of theMessage\n
  +set theLink to theURL  \::split::\  theSubject  \\n\\n
  +copy theLink to end of theLinkList\n
  +end repeat\n
  +return theLinkList as string\n
  +end tell)))
  +
  +(defun org-sh-get-flagged-outlook-mail ()
  +  Shell commands to create links to flagged messages in Microsoft
 Outlook.app.
  +  (mapconcat
  +   (lambda (x) 
  + (concat
  +  mac-outlook:
  +  (mapconcat
  +   (lambda (y)  y)
  +   (split-string
  + (shell-command-to-string
  +  (format mdls -raw -name com_microsoft_outlook_recordID -name
 kMDItemDisplayName \%s\ x))
  + \000)
  +   ::split::)
  +  \n))
  +   (with-temp-buffer
  + (let ((coding-system-for-read (or file-name-coding-system 'utf-8))
  +(coding-system-for-write 'utf-8

[O] [PATCH] Add Microsoft Outlook Support to org-mac-link

2013-09-07 Thread Mike McLean
* contrib/lisp/org-mac-link.el: Add “o”utlook to capture descriptors along with
functions to capture links from Microsoft Outlook for Mac.

The functions here replicate those that capture from Mail.app.
---
 contrib/lisp/org-mac-link.el | 140 +++
 1 file changed, 140 insertions(+)

diff --git a/contrib/lisp/org-mac-link.el b/contrib/lisp/org-mac-link.el
index 59b88d2..2ff6711 100644
--- a/contrib/lisp/org-mac-link.el
+++ b/contrib/lisp/org-mac-link.el
@@ -13,6 +13,11 @@
 ;; Version: 1.1
 ;; Keywords: org, mac, hyperlink
 ;;
+;; Version: 1.2
+;; Keywords: outlook
+;; Author: Mike McLean mike.mcl...@pobox.com
+;; Add support for Microsoft Outlook for Mac as Org mode links
+;;
 ;; This file is not part of GNU Emacs.
 ;;
 ;; This program is free software; you can redistribute it and/or modify
@@ -51,6 +56,7 @@
 ;; Google Chrome.app - Grab the url of the frontmost tab in the frontmost 
window
 ;; Together.app - Grab links to the selected items in the library list
 ;; Skim.app - Grab a link to the selected page in the topmost pdf document
+;; Microsoft Outlook.app - Grab a link to the selected message in the message 
list
 ;;
 ;;
 ;; Installation:
@@ -97,6 +103,12 @@ applications and inserting them in org documents
   :group 'org-mac-link
   :type 'boolean)
 
+(defcustom org-mac-grab-Outlook-app-p t
+  Enable menu option [o]utlook to grab links from Microsoft Outlook.app
+  :tag Grab Microsoft Outlook.app links
+  :group 'org-mac-link
+  :type 'boolean)
+
 (defcustom org-mac-grab-Addressbook-app-p t
   Enable menu option [a]ddressbook to grab links from AddressBook.app
   :tag Grab AddressBook.app links
@@ -179,6 +191,7 @@ applications and inserting them in org documents
   (interactive)
   (let* ((descriptors `((F inder org-mac-finder-insert-selected 
,org-mac-grab-Finder-app-p)
 (m ail org-mac-message-insert-selected 
,org-mac-grab-Mail-app-p)
+(o utlook org-mac-outlook-message-insert-selected 
,org-mac-grab-Outlook-app-p)
 (a ddressbook org-mac-addressbook-insert-selected 
,org-mac-grab-Addressbook-app-p)
 (s afari org-mac-safari-insert-frontmost-url 
,org-mac-grab-Safari-app-p)
 (f irefox org-mac-firefox-insert-frontmost-url 
,org-mac-grab-Firefox-app-p)
@@ -574,6 +587,133 @@ applications and inserting them in org documents
 
 ;;
 ;;
+;; Handle links from Microsoft Outlook.app
+;;
+
+(org-add-link-type mac-outlook 'org-mac-outlook-message-open)
+
+(defun org-mac-outlook-message-open (msgid)
+  Open a message in outlook
+  (let* ((record-id-string (format mdfind com_microsoft_outlook_recordID==%s 
msgid))
+   (found-message (replace-regexp-in-string \n$ 
+  (shell-command-to-string record-id-string
+(if (string= found-message )
+  (message org-mac-link: error could not find Outlook message %s 
(substring-no-properties msgid))
+  (shell-command (format open \`mdfind 
com_microsoft_outlook_recordID==%s`\ msgid)
+
+(defun org-as-get-selected-outlook-mail ()
+  AppleScript to create links to selected messages in Microsoft Outlook.app.
+  (do-applescript
+   (concat
+tell application \Microsoft Outlook\\n
+set msgCount to count current messages\n
+if (msgCount  1) then\n
+return\n
+end if\n
+set theLinkList to {}\n
+set theSelection to (get current messages)\n
+repeat with theMessage in theSelection\n
+set theID to id of theMessage as string\n
+set theURL to \mac-outlook:\  theID\n
+set theSubject to subject of theMessage\n
+set theLink to theURL  \::split::\  theSubject  \\n\\n
+copy theLink to end of theLinkList\n
+end repeat\n
+return theLinkList as string\n
+end tell)))
+
+(defun org-sh-get-flagged-outlook-mail ()
+  Shell commands to create links to flagged messages in Microsoft 
Outlook.app.
+  (mapconcat
+   (lambda (x) 
+ (concat
+  mac-outlook:
+  (mapconcat
+   (lambda (y)  y)
+   (split-string
+   (shell-command-to-string
+(format mdls -raw -name com_microsoft_outlook_recordID -name 
kMDItemDisplayName \%s\ x))
+   \000)
+   ::split::)
+  \n))
+   (with-temp-buffer
+ (let ((coding-system-for-read (or file-name-coding-system 'utf-8))
+  (coding-system-for-write 'utf-8))
+   (shell-command
+   mdfind com_microsoft_outlook_flagged==1
+   (current-buffer)))
+ (split-string
+  (buffer-string) \n t))
+   ))
+
+(defun org-mac-outlook-message-get-links (optional select-or-flag)
+  Create links to the messages currently selected or flagged in Microsoft 
Outlook.app.
+This will use AppleScript to get the message-id and the subject of the
+messages in Microsoft Outlook.app and make a link out of it.
+When SELECT-OR-FLAG is \s\, get the selected messages (this is also
+the default).  When SELECT-OR-FLAG is \f\, get the flagged messages.
+The Org-syntax text will be pushed

Re: [O] ATTENTION: Incompatible change

2013-09-07 Thread Mike McLean
Thank you.

I just submitted my patch to add support for Microsoft Outlook for Mac and
I will add support for DevonThink Pro (at least) sometime next week.

Mike



On Fri, Sep 6, 2013 at 12:38 PM, Carsten Dominik
carsten.domi...@gmail.comwrote:


 On 6.9.2013, at 17:00, Mike McLean mike.mcl...@pobox.com wrote:

 Thank you for this. The combination and simplification is finally
 prompting me to add support for Microsoft Outlook for Mac email messages
 and for DevonThink Pro.

 I have a question, though. If the only require now is supposed to be
 =(require 'org-mac-link)=, why is there still a =(require
 'org-mac-message)= in =org-mac-link.el=?


 Hi Mike,

 Thanks for picking this up - I fixed that.

 - Carsten


 Mike

 On Thursday, September 5, 2013, Anthony Lander wrote:

 Hi Carsten,

 Sorry for the delay. For org-mac-link, here is a small cleanup patch to
 org that changes the customize group name from 'org-mac-link-grabber to
 'org-mac-link, and another patch which updates the documentation in worg.
 Can you please review, and if OK apply to the repositories?

 Thanks,

   -Anthony



 On Sat, Aug 31, 2013 at 9:37 AM, Carsten Dominik 
 carsten.domi...@gmail.com wrote:

 Hi all,

 I have now replaced both org-mac-message.el and org-mac-link-grabber.el
 with org-mac-link.el.  So after the next pull, you will have to change your
 setup to use this module instead of the others and use the new commands as
 well.  I would appreciate if you your try this soon, so that we can fix
 issue before the next release (very soon).

 Thank you, and in particular thanks to Anthony Lander for doing the work.

 - Carsten

 P.S. Anthony, you promised to update the documentation.  It would be
 great if you could do that now.

 Thank you!







Re: [O] ATTENTION: Incompatible change

2013-09-06 Thread Mike McLean
Thank you for this. The combination and simplification is finally prompting
me to add support for Microsoft Outlook for Mac email messages and for
DevonThink Pro.

I have a question, though. If the only require now is supposed to be
=(require 'org-mac-link)=, why is there still a =(require
'org-mac-message)= in =org-mac-link.el=?

Mike

On Thursday, September 5, 2013, Anthony Lander wrote:

 Hi Carsten,

 Sorry for the delay. For org-mac-link, here is a small cleanup patch to
 org that changes the customize group name from 'org-mac-link-grabber to
 'org-mac-link, and another patch which updates the documentation in worg.
 Can you please review, and if OK apply to the repositories?

 Thanks,

   -Anthony



 On Sat, Aug 31, 2013 at 9:37 AM, Carsten Dominik 
 carsten.domi...@gmail.com javascript:_e({}, 'cvml',
 'carsten.domi...@gmail.com'); wrote:

 Hi all,

 I have now replaced both org-mac-message.el and org-mac-link-grabber.el
 with org-mac-link.el.  So after the next pull, you will have to change your
 setup to use this module instead of the others and use the new commands as
 well.  I would appreciate if you your try this soon, so that we can fix
 issue before the next release (very soon).

 Thank you, and in particular thanks to Anthony Lander for doing the work.

 - Carsten

 P.S. Anthony, you promised to update the documentation.  It would be
 great if you could do that now.

 Thank you!






Re: [O] How to trigger the clockcheck in an agenda view.

2013-08-04 Thread Mike McLean



On Jul 31, 2013, at 3:25 AM, Rainer Stengele rainer.steng...@online.de wrote:

 
 
 Am 7/29/2013 10:48 AM, schrieb Sebastien Vauban:
 Hi Rainer Stengele,
 
 Rainer Stengele wrote:
 Am 7/17/2013 2:07 PM, schrieb Rainer Stengele:
 Am 12.07.2013 10:06, schrieb Rainer Stengele:
 
 I want to start an aganda view over a week and immediately check the
 consistency of clock entries:
 
 I can't seem to find a way to trigger the clockcheck in the agenda view
 options.
 
 At the moment I have::
 
   (Aw
agenda + no todos - this week - log-mode - ARCHIVE included - clock 
 report
agenda 
(
 (org-agenda-sorting-strategy '(time-up priority-down))
 (org-agenda-span 'week)
 (org-agenda-start-with-log-mode t)
 (org-agenda-archives-mode t)
 (org-agenda-start-with-clockreport-mode t)
 ))
 
 Do I miss the variable to be set?
 
 Anybody?
 
 I know this is special, but I do not know how to check the existence of such
 a variable. If it doesn't I would suggest it as enhancement.
 
 The following does what you want:
 
 --8---cut here---start-8---
  (add-to-list 'org-agenda-custom-commands
   '(rC Clock Review
 agenda 
 ((org-agenda-archives-mode t)
  (org-agenda-clockreport-mode t)
  (org-agenda-overriding-header Clocking Review)
  (org-agenda-show-log 'clockcheck)
  (org-agenda-span 'day))) t)
 --8---cut here---end---8---
 
 Best regards,
  Seb
 
 PS- I've been on holidays and still ahve ~300 Org posts to read...
 
 Sebastian,
 
 thank you for taking your precious time to consider my question!
 I replaced my configuration with exactly yours and it doesn't start with 
 showing the clockchecks (time gaps etc.).
 I have to type v c to activate the clockcheck.
 I run the latest org version from just 3 minutes ago.
 
 Any idea?

Mine is almost identical to the one Sebastian posted and goes right to a clock 
check view.

(setq org-agenda-custom-commands
  (append
   org-agenda-custom-commands
   '((c Clock Review
 ((agenda 
  (
   (org-agenda-overriding-header Clocking Review)
   (org-agenda-archives-mode t)
   (org-agenda-span 'day)
   (org-agenda-show-log 'clockcheck)
   (org-agenda-clockreport-mode t)))
  )







Re: [O] Starting emacs followed directly by org-agenda search and visiting file removes color formatting

2013-07-03 Thread Mike McLean
Good Morning

Did you ever find a resolution for this? I am experiencing very similar, né
identical, symptoms.

Mike



On Mon, May 20, 2013 at 6:47 PM, John Hendy jw.he...@gmail.com wrote:

 On Mon, May 20, 2013 at 5:15 PM, John Hendy jw.he...@gmail.com wrote:
  Sorry for the long title, but that's the summary! I fired up a fresh
  Emacs session and used =C-a s search-term RET= to navigate to a
  headline in the results by putting the cursor on the line and pressing
  RET.
 
  The file text was all black.
 
  If I visited the file directly, I had the typical color-coded text for
  headlines/keywords. I decided to replicate with a minimal config, and
  I was able to. Here's the context of the min config:
 
  #+begin_min-config
  ;; set load paths
  ;; set load dirs and global config options
  (add-to-list 'load-path ~/.elisp/org.git/lisp/)
  (add-to-list 'load-path ~/.elisp/org.git/contrib/lisp)
  #+end_min-config
 
  This was on a work file, and I couldn't initially replicate with a
  test file... but it appears it has to do with my header options.
  Here's the test file:
 
  #+begin_src org
  #+setupfile: ~/org/aux/setupfile.org
  #+options: :t num:t author:t creator:nil tags:t toc:nil date:t
  #+latex_header: \usepackage{lscape}
  #+latex_header: \usepackage{amsmath}
 
  * Test headline
 
  Some paragraph just to give me a keyword to search for
 
  ** Sub headline
 
  Some more text in the next headline
  #+end_src
 
  My process:
  - emacs -Q
  - M-x load-file RET ~/path/to/min-config RET
  - C-x C-f /path/to/file.org RET
  - C-c [ to add to agenda list
  - C-x C-k RET to kill buffer
  - M-x org-agenda RET s RET text RET
  - Navigate to test.org matching line RET
  - File looks like attached pic
 
  I deleted everything but my #+setupfile line and it still does that.

 Last bit of input -- when this behavior is displayed, if I C-c C-c on
 my options block at the top of the file, it returns to fontified
 behavior and stays that way (even if meddling with headlines). It
 appears that navigating to a headline with various #+keyword lines is
 not letting Org recognize something. Refreshing the setup seems to
 handles this. This is on:

 Org-mode version 8.0.3 (release_8.0.3-139-g419b69 @
 /home/jwhendy/.elisp/org.git/lisp/)

 Happy to try anything else or provide more info. For now, I think I've
 made enough noise about this!


 Thanks,
 John

 
  Without any #+ options at the top of the file, it appears in color.
 
 
  John




Re: [O] Starting emacs followed directly by org-agenda search and visiting file removes color formatting

2013-06-25 Thread Mike McLean
I pulled and tested around 8:00 AM EDT today (because I let myself get so far 
behind on commits that I couldn't tell if a fix had been pushed or not) and the 
problem still existed at that time.


On Jun 25, 2013, at 11:52 AM, Bastien b...@altern.org wrote:

 Nicolas Richard theonewiththeevill...@yahoo.fr writes:
 
 Meanwhile, John Hendy reported that the issue is resolved for him, so
 maybe I notice the thread too late to be useful, otoh I don't see which
 commit solved the problem, so maybe luck is involved in his resolution.
 
 Well, I'm really curious to see if affected users can confirm it is
 solved... I didn't have time to fix it, and I'd be glad Luck did it
 for me!
 
 -- 
 Bastien
 




Re: [O] Changing the maintainer

2013-04-18 Thread Mike McLean

On Apr 18, 2013, at 6:07 PM, Carsten Dominik carsten.domi...@gmail.com wrote:

 I will leave the donations button on his name until the end of
 April, so if you want to express your thanks to him in this
 way, you have that possibility.  If not, writing to him and
 expressing your amazement with his achievements in the
 last two years will probably make him as happy.

Bastien - I have not contributed any where near as much as I would have liked 
to over the past few year (especially given what I “get out” of Org mode and 
the exporters). I hope my small donation in some way makes up for it. I do know 
that every time I found something “odd” it was always difficult and took me a 
bunch of time to even get a reasonable ECM and despite that you seemed to 
always get to the heart of the problem and quickly push a fix. 

Thank YOU!

Re: [O] New exporter and dates in tables

2013-04-07 Thread Mike McLean

On Apr 7, 2013, at 8:05 PM, Bernt Hansen be...@norang.ca wrote:

 Hi Nicolas,
 
 I just noticed that the new exporter does not export inactive timestamps
 in table columns.  This is now controlled by the option :t
 
 I think this is a change from the old exporter (but I'm not sure it's
 really wrong).

Timing is everything. I just noticed the same thing today. I also don't know if 
it is “wrong” or not, but it is different than the old exporter.

In my case I used org-collector to generate the tables, so my workaround was an 
ugly hack around the property selector in my dynamic block line.

#+begin_example
#+begin: other org collector options :cols ( (replace-regexp-in-string  
.*\]  (replace-regexp-in-string ^\\[  (format %s ops-meeting-date))) …)
#+end_example

Where ~ops-meeting-date~ is a property on some of my headlines that in turn is 
an inactive timestamp.





Re: [O] avoid subscripting text

2013-04-04 Thread Mike McLean

On Apr 3, 2013, at 9:30 PM, Gary Oberbrunner ga...@oberbrunner.com wrote:

 I use LaTeX export all the time, but almost always with words with 
 underscores in them (data from external tables, variable names and so on).  
 So I never want _ to turn into a subscript.  Just one data point, but that's 
 how I use it.

I have to echo this use case. I have variable names and what not with 
underscores in the name about 100 times as much as I have a need for a 
subscript.

Re: [O] Including setupfile settings during subtree export (new exporter)

2013-03-24 Thread Mike McLean
On Sat, Mar 23, 2013 at 4:37 PM, John Hendy jw.he...@gmail.com wrote:


 Huh, well that's interesting. I /had/ #+setupfile, and only changed
 due to following the upgrade guide
 (http://orgmode.org/worg/org-8.0.html)


FWIW, I had read the same thing and made the same #+SETUPFILE → #+INCLUDE
change in my setup and noticed the same problem. I don't have “send” rights
to mailing lists at work, so had an Org mode task to write this up and post
it this weekend. You beat me to it :)

Thanks for pointing it out and thank you Nicolas for the following
discussion about what to use where.


Re: [O] [new exporter] Captions for tables made by source blocks

2013-03-06 Thread Mike McLean
On Wed, Mar 6, 2013 at 7:28 AM, Nicolas Goaziou n.goaz...@gmail.com wrote:

 Vikas Rawal vikasli...@agrarianresearch.org writes:

  CAPTION keyword above a source block applies to the source block only.
  If the source block generates a table, you have to put a CAPTION above
  it, as it will not inherit the caption of the source block.
 
  It also implies that you need to name the results. Otherwise, source
  block will not recognize its own production, due to the CAPTION keyword
  above it.
 
 
  Thank you once again Nicolas.
 
  I understand from this that the variable org-babel-results-keyword has
  to be changed to NAME. I did this and it works.
 
  Is there a way that this could be file-specific?

 I wasn't clear. By naming the results, I mean that you must provide
 your source block a #+NAME: something attribute, so the generated
 table gets a #+RESULTS: something attribute.


Interesting that this topic comes up today just as I noticed it. I'm still
unclear about how to put the CAPTION keyword in when using a dynamic block
via org-collector.el.

I have the lines below and I do not get a table caption like I used to in
the old exporter.

#+NAME: tbl-coi
#+CAPTION: COI Table
#+BEGIN: propview :colnames ( Area Shorthand COI ) :cols ( AREA
CATEGORY ITEM ) :match +COI+LEVEL=2-ARCHIVE :noquote t :scope agenda
:inherit (AREA)

Mike


Re: [O] [ANN] Merge of new export framework on Wednesday

2013-03-04 Thread Mike McLean
On Saturday, March 2, 2013, Bastien wrote:

 Hi Sean,

 Sean O'Halpin sean.ohal...@gmail.com javascript:; writes:

  One small point: as we're going to have to change the meta directive
  #+STYLE to #+HTML_STYLE, can we change the name to reflect what it
  really does in the HTML backend, i.e. insert text verbatim into the
  head element? I suggest we rename it to #+HTML_HEAD.

 Done.  You can now use HTML_HEAD instead of HTML_STYLE.

 Some variables were also renamed, check the details here:
 http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=2752ef


I am on commit 40fc98e so I think I have all of the fixes to this change.

I noticed that it no longer concatenates multiple lines from the file
header. I used to have multiple #+HTML_STYLE: lines in my Org files that
layered in different CSS. The nice thing about designing my CSS this way is
that I have a base style and could change individual documents as needed by
just adding a new HTML_STYLE line that loads a small, simple override CSS.
I would get one link style sheet / line to match each HTML_STYLE line.
Now it appears that only the last line is exported to the HTML file.


Re: [O] [ANN] Merge of new export framework on Wednesday

2013-03-04 Thread Mike McLean
On Mon, Mar 4, 2013 at 10:24 AM, Nicolas Goaziou n.goaz...@gmail.comwrote:

 Hello,

 Mike McLean mike.mcl...@pobox.com writes:

  I noticed that it no longer concatenates multiple lines from the file
  header. I used to have multiple #+HTML_STYLE: lines in my Org files that
  layered in different CSS. The nice thing about designing my CSS this way
 is
  that I have a base style and could change individual documents as needed
 by
  just adding a new HTML_STYLE line that loads a small, simple override
 CSS.
  I would get one link style sheet / line to match each HTML_STYLE line.
  Now it appears that only the last line is exported to the HTML file.

 This should be fixed.


It doesn't seem to be. I have put together a ECM. I have two CSS files,
representing a “base” style and an optional “override” style. I have two
versions of an org test file that differ only in the first 2 lines of the
file. One “works” (loads both style sheets and displays the text as
described in the document), one does not.

This is a minimal ECM. In my actual setup I have the equivalent of the base
CSS file in a file named ~org-options.txt~ that I include into every single
Org file I ever create via ~#+SETUPFILE~. I load my override CSS on a
per-document basis in the document header below the ~#+SETUPFILE:~
directive.
a, h1, h2, h3, h4, h5, h6 {
	  color: red;
margin-bottom: 0.5em;
}


test-org-export-not-works.org
Description: Binary data
/*
 * CSS Overrides for documents that should display in blue and have blockquotes
 */

p {
color: blue;
}

blockquote {
float:right;
width:160px;
font-size:90%;
margin:0 0 0 10px;
padding:15px;
font-family:Georgia, Times New Roman, Times, serif;
border-left:solid 3px #DEDEDE;
}


test-org-export-works.org
Description: Binary data


Re: [O] [ANN] Merge of new export framework on Wednesday

2013-03-04 Thread Mike McLean
On Monday, March 4, 2013, Nicolas Goaziou wrote:

 Mike McLean mike.mcl...@pobox.com javascript:; writes:

  On Mon, Mar 4, 2013 at 10:24 AM, Nicolas Goaziou 
  n.goaz...@gmail.comjavascript:;
 wrote:
 
  Hello,
 
  Mike McLean mike.mcl...@pobox.com javascript:; writes:
 
   I noticed that it no longer concatenates multiple lines from the file
   header. I used to have multiple #+HTML_STYLE: lines in my Org files
 that
   layered in different CSS. The nice thing about designing my CSS this
 way
  is
   that I have a base style and could change individual documents as
 needed
  by
   just adding a new HTML_STYLE line that loads a small, simple override
  CSS.
   I would get one link style sheet / line to match each HTML_STYLE
 line.
   Now it appears that only the last line is exported to the HTML file.
 
  This should be fixed.
 
 
  It doesn't seem to be.

 Indeed. I overlooked some code typo. Could you try again (a restart may
 be required)?


That did it. Thank you. Overall I'm loving the new exporter, BTW. Awesome
job!!!


Re: [O] CSS link in html export for v. 7.9.3e woes

2013-03-01 Thread Mike McLean
On Tuesday, February 26, 2013, Nicolas Goaziou wrote:

 Hello,

 Mike McLean mike.mcl...@pobox.com javascript:; writes:

  I've noticed an inconsistency with HTML_STYLE. When I have a few lines of
  them in a common file, which I include in all of my Org documents via
  #+SETUPFILE, they work fine. For some specific documents, I have a CSS
  override, something I desire to look different for just that one
 documents.
  Prior to the new exporter I simply added another #+HTML_STYLE line in the
  file itself. The old exporter would add it after the lines from the
  #+SETUPFILE and all would look correct. The new exporter skips any such
  lines from the file while still including the ones from the common
  file.

 I think I have fixed this. Could you confirm it?


Sorry for the delay, but I can confirm that this now works. Thank you.


Re: [O] CSS link in html export for v. 7.9.3e woes

2013-02-26 Thread Mike McLean
On Monday, February 25, 2013, Sebastien Vauban wrote:

 Hi Daniel,

 Daniel Hawthorne wrote:
  Greetings,
   After updating to 7.9.3e, I no longer am able to include a
 stylesheet
  link with the following syntax:
 
  #+STYLE: link rel=stylesheet type=text/css
  href=../relative/path/to/mystyle.css/
 
  If I go back to my previous version, it works as expected. It is not a
 path
  issue; On the resulting site, it never tries to load the stylesheet. The
  release notes do not mention anything that would lead me to believe that
  this should have changed. Suggestions welcome.

 I got into the same trouble days ago. Nicolas' answer was to use the new
 syntax therefore, that is:

   #+HTML_STYLE: ...


I've noticed an inconsistency with HTML_STYLE. When I have a few lines of
them in a common file, which I include in all of my Org documents via
#+SETUPFILE, they work fine. For some specific documents, I have a CSS
override, something I desire to look different for just that one documents.
Prior to the new exporter I simply added another #+HTML_STYLE line in the
file itself. The old exporter would add it after the lines from the
#+SETUPFILE and all would look correct. The new exporter skips any such
lines from the file while still including the ones from the common file.


Re: [O] Online manual

2013-02-24 Thread Mike McLean

On Feb 24, 2013, at 11:03 AM, Sebastian Wiesner lunary...@gmail.com wrote:

 Hello,
 
 how is the online manual of Org mode [1] rendered?  Especially, how is
 the awesome table of contents on the right sight created?

It is done through CSS and I do something similar with most of my HTML exports. 
I have a custom CSS that I load by having the following in every Org file.

#+begin_example
#+HTML_STYLE: link rel=stylesheet type=text/css 
href=/Users/mlm/Documents/OrgMaster/org/css/org-html.css /
#+end_example

Into my custom CSS I copied the TOC CSS from the Org mode home page (see 
below). I may have altered it slightly from what is on Org for colors and such, 
but I don't recall.

#+begin_example
@media screen {

/* TOC inspired by http://jashkenas.github.com/coffee-script */
#table-of-contents {
font-size: 10pt;
position: fixed;
right: 0em;
top: 0em;
background-color: #F3F5F7;
-webkit-box-shadow: 0 0 1em #77;
-moz-box-shadow: 0 0 1em #77;
-webkit-border-bottom-left-radius: 5px;
-moz-border-radius-bottomleft: 5px;
text-align: right;
/* ensure doesn't flow off the screen when expanded */
max-height: 80%;
overflow: auto;
}

#table-of-contents h2 {
font-size: 10pt;
max-width: 10em;
text-decoration: underline;
padding-left: 0.5em;
padding-left: 0.5em;
padding-top: 0.05em;
padding-bottom: 0.05em;
margin-bottom: 15px;
border: none;
}

#table-of-contents ul {
list-style-type: none;
}

#table-of-contents #text-table-of-contents {
display: none;
text-align: left;
}

#table-of-contents:hover #text-table-of-contents {
display: block;
padding: 0.5em;
margin-top: -1.5em;
}
}

@media print {
/* TOC inspired by http://jashkenas.github.com/coffee-script */
#table-of-contents {
font-size: 10pt;
background: white;
}

#table-of-contents h2 {
font-size: 10pt;
max-width: 10em;
text-decoration: underline;
padding-left: 0.5em;
padding-left: 0.5em;
padding-top: 0.05em;
padding-bottom: 0.05em;
margin-bottom: 15px;
border: none;
}

#table-of-contents ul {
list-style-type: none;
}

#table-of-contents #text-table-of-contents {
text-align: left;
}

#table-of-contents:hover #text-table-of-contents {
display: block;
padding: 0.5em;
margin-top: -1.5em;
}

}
#+end_example




Re: [O] [PATCH] Separate clocksum format for durations = 1 day

2012-11-21 Thread Mike McLean
On Tuesday, November 20, 2012, Nicolas Goaziou wrote:

 Toby Cubitt ts...@cantab.net javascript:; writes:

  Instead of changing org-hours-to-clocksum-string, it's probably
  preferable to make org-minutes-to-clocksum-string more robust, so it
  copes correctly with floating point arguments.
 
  The attached patch does this. Sorry for letting this slip through.

 Applied. Thank you.


Yes, thank you!


Re: [O] [PATCH] Separate clocksum format for durations = 1 day

2012-11-20 Thread Mike McLean
On Sat, Nov 17, 2012 at 11:02 AM, Toby Cubitt ts...@cantab.net wrote:

 On Sat, Nov 17, 2012 at 03:42:24PM +0100, Nicolas Goaziou wrote:
  Toby Cubitt ts...@cantab.net writes:
 
   I've replaced the cons cells with additional plist properties, as you
   suggested. The resulting customization ui still isn't wonderful in my
   opinion. But it does the job, and I'm not sure how much scope there is
   for improving it further. If you see a way, by all means feel free to
   make the changes yourself. I really don't mind what format you go with
   for org-time-clocksum-format, as long as it supports the new formatting
   features implemented in the patch.
 
  Considering I'm not an expert in customize ui, it's good enough as it
  is.

 OK. If someone thinks of a way to improve the customization ui (keeping
 the same data type), it's easy to change it later without breaking
 anything.

  I've applied your patch (with some small changes in a docstring). Thank
  you again for all that work.

 Glad we finally found a good implementation. Thanks to you for all your
 helpful feedback.


I like the new implementation and customization options, but now when I do
~C-c C-x C-c~ to get a sub-tree time, I get nothing but zeros (~0d 0:00~)
for every subtree.

Mike


Re: [O] GTD - Natural Planning Model properties - add automatically

2012-10-17 Thread Mike McLean
On Sat, Oct 13, 2012 at 6:06 PM, Chris Henderson henders...@gmail.comwrote:

 If I create a project (C-c c and press 'p' for Project) in the
 project.org file, I would like the project to automatically inherit a
 few properties like: Purpose, Outcome, Todo's and also date when the
 project was added to the list.

 How can I configure my .emacs file to achieve this?

 I currently have:

 (setq org-capture-templates
'((t Todo entry (file+headline ~/org/gtd.org Tasks)
   ** TODO %?\n  %i Added:%U)
  (j Journal entry (file+datetree ~/org/journal.org)
   * %?\nEntered on %U\n  %i\n  %a)))

 Also: I would be interested to see how others implement natural
 planning model in org-mode (I am currently reading Charles Cave's
 write-up on this)


I do something similar; I used to use a nearly full David Allen Natural
Planning but now have simplified it and use the “As personal role, I want
goal so reason” Mad-Libs style.

I have the following as my Project capture:

(P Proposed Project
 entry (file ~/Documents/OrgMaster/org/refile.org)
 * PROPOSED %?\n%U\n** Project Definition\n%U\n- Summary\n  + As personal
role, I want goal so reason\n- Completion Criteria (Don't do too
much)\n  + \n
 :clock-in t :clock-resume t)

The key point is that you can put “\n” into the string for new lines, and
spaces after the “\n” for indentation.

Mike


[O] bug#9536: bug#9536: 24.0.50; org-capture do not work together org-crypt.el

2012-09-25 Thread Mike McLean

On Sep 25, 2012, at 10:33 AM, Bastien b...@gnu.org wrote:

 Hi Guilherme,
 
 Guilherme Gondim seme...@taurinus.org writes:
 
 I would use `org-capture' to add a entry in a subtree encrypted using
 `org-encrypt'.
 
 `org-capture' currently do not identify and decrypt a encrypted subtree
 before save the entry.
 
 This is now fixed in Org's git repository.
 
 It will be part of Org 7.9.2.

I don't use org-crypt. After updating Org to this patch level, I get the 
following error on every attempt to capture.

org-capture-set-target-location: Symbol's function definition is void: 
org-at-encrypted-entry-p







Re: [O] [OT][GTD] GTDish next action todo keyword, could that influence your productivity in any way?

2012-08-21 Thread Mike McLean

On Aug 19, 2012, at 10:59 PM, Marcelo de Moraes Serpa celose...@gmail.com 
wrote:

 What do you think; and what word do you use as your TODO keyword?

I use:

(sequence BACKLOG(b!) TODO(t!) DOING(o!)  | DONE(d!))

I treat my Task sequence as a form of a non-visual Kanban. I self-impose 
workflow limits on the number of items that are allow to be DOING (currently in 
process) and TODO (committed to doing). I use BACKLOG for items that I have 
captured but not necessarily committed to yet. I try to always select work from 
my DOING list. If that has space available in the workflow limit I review my 
TODO list and “pull” into DOING. If the TODO list has space available, I review 
BACKLOG and pull forward into doing. I have agenda view for each of these 
“Kanban Lanes”.

I have a grand thought of someday writing an agenda view or mode that looks 
like a Kanban board -- I've seen some of what can be done with respect to views 
in Emacs from the ~calfw~ package, so it is just a matter of time.

Other's have mentioned ideas like waiting on someone else, needs to be 
verified, etc. I keep those as a separate ~org-todo-keywords~ sequences so that 
I can use ~S-left~ nearly exclusively as my keystroke to “pull” an item 
forward in the value stream. So for completeness, my task sequence also 
includes:

(sequence WAITING(W@) VERIFY(v@/!) | NOT_DONE(N@/!))
(sequence ERRANDS(E!) | DONE(d!))
(sequence RECURRENT(!) | DONE(!))

I only have to use a direct task selection (not S-left) when moving a task 
out of the main flow into WAITING or VERIFY or moving a task back from WAITING 
or VERIFY into the main sequence. 

HTH

Mike



Re: [O] [OT][GTD] GTDish next action todo keyword, could that influence your productivity in any way?

2012-08-21 Thread Mike McLean

On Aug 21, 2012, at 6:50 PM, Bastien b...@altern.org wrote:

 Hi Mike,
 
 Mike McLean mike.mcl...@pobox.com writes:
 
 I have a grand thought of someday writing an agenda view or mode that
 looks like a Kanban board -- I've seen some of what can be done with
 respect to views in Emacs from the ~calfw~ package, so it is just a
 matter of time.
 
 Just a thought: isn't this already possible with Agenda Blocks?  
 
 You get the columns as rows, but you get the various categories
 displayed at once.

That is what I am doing now as my “non-visual” version. It actually works 
pretty well. My thought is to create something like one of the online Kanban 
boards for more visual impact.

I didn't elaborate before since the question was about TODO states, but I have 
4 Kanban-named views in my ~org-agenda-custom-commands~; one view each for 
BACKLOG, TODO, and DOING so that I can look at each stage individually and a 
fourth with all three of those blocks as you suggest to get them all at once.

With Org babel, and my org-mode configuration being a ~.org~ file, I also 
manage to achieve DRY. My three individual agenda blocks are defined once, and 
the complete view just references them with  noweb syntax.

Did I mention how awesome Org mode is ? I should have :)

Mike






[O] Question About New Exporter

2012-08-20 Thread Mike McLean
Hello

I use Org mode quite a bit to:
a) Export raw HTML that I use on my corporate Sharepoint site (currently via 
copy/paste) for Wiki entries, Blog posts, etc.
b) Export HTML to a browser that I copy/paste into corporate Outlook for Mac 
client for formatted email
c) PDF documents via LaTeX

On point (c), I have 3 custom LaTeX classes (each based off of and ultimately 
including the memoir class). These classes are similar in function and exist 
for format a corporate document via corporate branding, personal documents in a 
way that pleases me, and documents for my non-profit volunteer efforts in a 
style that match that branding.

For all 3 I use the LaTeX biblatex-chicago package, and to help the tex build 
process use latexmk.

I am on a Mac so I use xelatex instead of pdflatex to get system fonts, Open 
Type fonts, etc.

My Org mode LaTeX build is:

(setq texcmd latexmk -gg -f -shell-escape -xelatex -pdf %f)
(setq org-latex-to-pdf-process (list texcmd))

Given all of that; what do I need to be wary of before I switch to the e-html 
and e-latex exporters?

Are they far enough along that I should be able to just swap and have every 
thing “just work” or “mostly work” ?

Thanks





Re: [O] [bug] Text macros don't get replaced

2012-06-21 Thread Mike McLean




On Jun 20, 2012, at 6:34 AM, Nicolas Goaziou wrote:

 Hello,
 
 Sebastien Vauban
 wxhgmqzgwmuf-genee64ty+gs+fvcfc7...@public.gmane.org writes:
 
 I'm using text macros, and want them to be replaced both in the text body, 
 but
 as well in the title or date of the document:
 
 #+MACRO: thesoft ABC
 #+MACRO: thedate November 2011
 
 #+TITLE: Data Sheet: {{{thesoft}}}
 #+AUTHOR:{{{thesoft}}}
 #+DATE:  Copyright (c) {{{thedate}}}
 
 With the new LaTeX exporter, it does work for TITLE and AUTHOR, but not for
 DATE.
 
 It should be fixed in master.  Thank you.

Any chance of getting them to work in Clocktable and/or Dynamic Block lines? 
Example:

#+MACRO: when lastweek
#+TITLE: Summary Report for {{{when}}}

* Clock Report for {{{when}}}
#+BEGIN: clocktable :block {{{when}}}







Re: [O] if both schedule and deadline, appear only once in agenda

2012-06-05 Thread Mike McLean

On Jun 1, 2012, at 4:09 AM, Eric S Fraga wrote:

 SW sabrewo...@gmail.com writes:
 However, this is not what my question is about. My question relates to 
 advance
 warning that an item is scheduled in the future. I want to know on Friday 
 that I
 have scheduled a large project to start on Monday. That is, I would like to 
 know
 beforehand that I need to start working on a large project in a few days 
 time.
 
 One approach is to consider that thinking about a large project about
 to start is itself a task so you could look at adding a task for the
 Friday, when you first scheduled the large task for the Monday, to tell
 you start thinking...
 
 This might sound silly but it can actually be quite useful if you get
 into the habit of thinking about such aspects when you schedule tasks.

I agree with this sentiment wholeheartedly. My default “project” org-capture 
template has a sub task for defining the project. You could setup your template 
in whatever way works for you. 

I used to use a version of the GTD Natural Planning model with bullets for 
Purpose, Principles, Vision, Outcome, etc. I have since simplified to a MadLibs 
user story format: 
http://www.mountaingoatsoftware.com/blog/advantages-of-the-as-a-user-i-want-user-story-template

If I know the broad outlines of project at the time of capture, I fill it all 
in with the capture template. If I do not yet have the project fully thought 
out, I add a TODO keyword to the “Project Definition” subheading. Depending on 
the project I add scheduled and/or deadline dates to the project itself and/or 
the Project Definition TODO. The relevant snippet from my org-capture is:

#+begin_src emacs-lisp
(setq org-capture-templates (quote (
(P project entry (file ~/Documents/OrgMaster/org/refile.org) * 
%?   :Project_Backlog: \n  %U\n** Project Definition\n- Summary\n  + As 
personal role, I want goal so reason\n- Completion Criteria (Don't do too 
much)\n  + \n :clock-in t :clock-resume t)
)))
#+end_src

Since I have clocking as part of my capture template, I also record the time I 
spend writing the project requirements against the project -- when I refile the 
project that time moves with the refile to be charged against the broader 
desired outcome. I get quite a bit of quantified self information this way :)




Re: [O] org-capture and org-link-type for Outlook mail messages on Mac OSX

2012-06-05 Thread Mike McLean

On Jun 3, 2012, at 6:56 AM, Christopher J. White wrote:

 Hi Folks,
 
 I thought I'd share a bit of hacking I've been doing over the last couple 
 days.
 
 I had 2 basic needs:
  * create a TODO entry associated with an email message
  * include a clickable link back to that message in the entry
 
 For work email I use Outlook on a Mac.  After some digging, I managed to 
 cobble together an AppleScript with some glue lisp that solves both of the 
 above.

Well, wow. I've had “write an Outlook / Org integration” on my TODO list for 
too long. I too use Outlook for Mac at work and will certainly be testing this 
over the next few days. Thank you!


Re: [O] Strange Custom Agenda Problem

2012-05-23 Thread Mike McLean
On May 23, 2012, at 6:17 AM, Bastien wrote:

 Hi Mike,
 
 Mike McLean mike.mcl...@pobox.com writes:
 
 I have attached a minimal Org Mode setup that replicates this
 problem. The files are minimal-org.el and test.org. The lisp file is
 the minimum configuration for org-mode and the org-file is a
 simplified test file.
 
 Thanks a lot for this.  
 
 I finally fixed this, please test and confirm.

I can confirm that this fixes my full block agenda where I first noticed the 
problem.

Org-mode version 7.8.10 (release_7.8.10-587-g31aa82 @ 
/Users/mlm/.emacs.d/el-get/org-mode/lisp/)
(without my branch to revert  
[[http://orgmode.org/w/?p%3Dorg-mode.git%3Ba%3Dcommit%3Bh%3Dc50f0c][Commit 
c50f0c]])

Thanks for the fix.

I really need to start leaning the Org-Mode code base, especially seeing how 
simple this fix was.

Mike




Re: [O] Strange Custom Agenda Problem

2012-05-21 Thread Mike McLean
I have attached a minimal Org Mode setup that replicates this problem. The
files are minimal-org.el and test.org. The lisp file is the minimum
configuration for org-mode and the org-file is a simplified test file.

The minimal configuration assumes:

   - A working directory of ~/tmp/tags-test when it sets org-agenda-files
   - The Git Checkout of Org-Mode is located in
   ~/.emacs.d/el-get/org-mode/lisp

Additionally, the minimal configuration has the troublesome agenda command
both as one block in a Block Agenda and listed separately as its one agenda
command. (My “real” environment uses this only in a block agenda so I was
covering all bases).

In each of the two cases below I have started Emacs with:


/Applications/Emacs.app/Contents/MacOS/Emacs -Q -l ./minimal-org.el test.org

Non Working Test Case:

   - Switch to Org-Mode HEAD


   cd /Users/mike.mclean/.emacs.d/el-get/org-mode
   git --no-pager checkout master
   make clean
   make autoloads

   - Launch Emacs as Above
   - Note the two version strings from message buffer


   GNU Emacs 24.1.50.1 (x86_64-apple-darwin, NS apple-appkit-1038.36)
of 2012-05-20 on bob.porkrind.org
   Org-mode version 7.8.10 (release_7.8.10-579-g372948 @
/Users/mike.mclean/.emacs.d/el-get/org-mode/lisp/)

   - M-x org-agena followed by t
   - Org Agenda Buffer contains just the following


   Headlines with TAGS match: +Outcome+PRIORITY=A+LEVEL=4-{.*Backlog$}
   Press `C-u r' to search again with new search string

   - M-x org-agena followed by b
   - Org Agenda Buffer contains just the following


   Headlines with TAGS match: +Outcome+PRIORITY=A+LEVEL=4-{.*Backlog$}


Working Test Case

   - Switch to Org Mode version just prior to Commit
c50f0chttp://orgmode.org/w/?p=org-mode.git;a=commit;h=c50f0c


   cd /Users/mike.mclean/.emacs.d/el-get/org-mode
   git co c50f0c~1
   make clean
   make autoloads

   - Launch Emacs as Above
   - Note the two version strings from message buffer


   GNU Emacs 24.1.50.1 (x86_64-apple-darwin, NS apple-appkit-1038.36)
of 2012-05-20 on bob.porkrind.org
   release_7.8.09-33-g0ebeb
   Org-mode version 7.8.09 (release_7.8.09.33.g0ebeb)

   - M-x org-agena followed by t
   - Org Agenda Buffer contains the following (note that the correct Level
   4 outline item is selected)


   Headlines with TAGS match: +Outcome+PRIORITY=A+LEVEL=4-{.*Backlog$}
   Press `C-u r' to search again with new search string
 test:   WIP [#A] Level 4 - should be in agenda
:noexport:Outcome::

   - M-x org-agena followed by b
   - Org Agenda Buffer contains just the following


   Headlines with TAGS match: +Outcome+PRIORITY=A+LEVEL=4-{.*Backlog$}
 test:   WIP [#A] Level 4 - should be in agenda
:noexport:Outcome::




On Thu, May 17, 2012 at 1:25 PM, Bastien b...@altern.org wrote:

 Mike McLean mike.mcl...@pobox.com writes:

  I will, but I'm booked in meetings today so it may take a day ...
 
  Though in lieu of proper debugging and bug-reporting I reversed the
  above referenced commit in my local copy of org and now my full,
  complex setup works as expected as does the test case above with the
  tag moved to level 2.

 I tried to replicate the problem with emacs -Q and
 `org-use-tag-inheritance' set to nil and t -- no luck.

 Maybe there is something weird in the format of your entries
 (the ones that do not display correctly.)

 Can you send some examples?

 --
  Bastien



minimal-org.el
Description: Binary data


test.org
Description: Binary data


Re: [O] Strange Custom Agenda Problem

2012-05-17 Thread Mike McLean
On Thursday, May 17, 2012, Bastien wrote:

 Hi Mike,

 Mike McLean mike.mcl...@pobox.com javascript:; writes:

  I have the following (amount other things) in my
 org-agenda-custom-commands:
 
  (setq org-agenda-custom-commands
  '((x test tags-todo +Outcome+LEVEL=4)))
 
  When I custom-command select “x”, I get no results.

 I tested with your `org-agenda-custom-commands' value and this

 * Test
 ** Test1
 *** Test2
  TODO Do I see this?   :Outcome:

 I correctly get :Outcome:.


In my case the Outcome tag is on Test1 with =org-use-tag-inheritance= set
to =t=.



 This is with both the maint and master branches of the git repo.

  If I select the default, built-in lower case “m” agenda command and type
  +Outcome+LEVEL=4 I get a long list of results (as expected).

 The m agenda command is for `tags', not `tags-todo'.


Understood; to be clear I get a results using m that include both TODO
items and non-TODO items. My expectation from my x test case is to get a
subset of the results I get from m, but not an empty list.



  Did something change recently in the agenda construction related to
  tags-todo?

 This: http://orgmode.org/w/?p=org-mode.git;a=commit;h=c50f0c

 Please help us reproduce the problem, perhaps by sharing some
 of the impacted entries.


I will, but I'm booked in meetings today so it may take a day ...




 Thanks,

 --
  Bastien



Re: [O] Strange Custom Agenda Problem

2012-05-17 Thread Mike McLean
On Thursday, May 17, 2012, Mike McLean wrote:



 On Thursday, May 17, 2012, Bastien wrote:

 Hi Mike,

 Mike McLean mike.mcl...@pobox.com writes:

  I have the following (amount other things) in my
 org-agenda-custom-commands:
 
  (setq org-agenda-custom-commands
  '((x test tags-todo +Outcome+LEVEL=4)))
 
  When I custom-command select “x”, I get no results.

 I tested with your `org-agenda-custom-commands' value and this

 * Test
 ** Test1
 *** Test2
  TODO Do I see this?   :Outcome:

 I correctly get :Outcome:.


 In my case the Outcome tag is on Test1 with =org-use-tag-inheritance= set
 to =t=.



 This is with both the maint and master branches of the git repo.

  If I select the default, built-in lower case “m” agenda command and type
  +Outcome+LEVEL=4 I get a long list of results (as expected).

 The m agenda command is for `tags', not `tags-todo'.


 Understood; to be clear I get a results using m that include both TODO
 items and non-TODO items. My expectation from my x test case is to get a
 subset of the results I get from m, but not an empty list.



  Did something change recently in the agenda construction related to
  tags-todo?

 This: http://orgmode.org/w/?p=org-mode.git;a=commit;h=c50f0c

 Please help us reproduce the problem, perhaps by sharing some
 of the impacted entries.


 I will, but I'm booked in meetings today so it may take a day ...


Though in lieu of proper debugging and bug-reporting I reversed the above
referenced commit in my local copy of org and now my full, complex setup
works as expected as does the test case above with the tag moved to level 2.




[O] Strange Custom Agenda Problem

2012-05-16 Thread Mike McLean
In the past few days one of my custom agenda commands stopped working as it 
used to. I haven't (yet) bisected my Org-Mode configuration (*) and org-mode to 
find the exact cause, but was wondering if anyone had any ideas.

I have the following (amount other things) in my org-agenda-custom-commands:

(setq org-agenda-custom-commands
'((x test tags-todo +Outcome+LEVEL=4)))

When I custom-command select “x”, I get no results. 

If I select the default, built-in lower case “m” agenda command and type 
+Outcome+LEVEL=4 I get a long list of results (as expected).

Did something change recently in the agenda construction related to tags-todo?

Mike



(*) Which has not changed much


Re: [O] Feedback on org-collector Worg page

2012-05-12 Thread Mike McLean

On May 11, 2012, at 4:41 PM, Eric Schulte wrote:

 John Hendy jw.he...@gmail.com writes:
 
 I'm happy to do the updating that might come out of these comments.

Eric and John

I use org-collector in quite a few places in my daily setup. I can't say thank 
you enough for creating it (Eric) and helping the Worg documentation can only 
increase the interest in this cool add on. John, if there is anything I can do 
to help, please let me know. I typically run 1-2 days behind on the Org-Mode 
mailing list, but will see direct emails to me.

Mike





Re: [O] Ever used org-mode contrib packages?

2012-05-10 Thread Mike McLean

On May 8, 2012, at 4:25 PM, Bastien wrote:

 Marc-Oliver Ihm marc-oliver@online.de writes:
 
 Just fixed the broken link to org-refer-by-number.el;
 
 Thanks!
 
 hopefully this gives others a better chance to actually use it :-)
 
 Let's give it more chances :)
 
  http://orgmode.org/worg/code/elisp/org-refer-by-number.el

Well now, that is a pretty cool hack to org. Thank you !





Re: [O] Capturing to current file

2012-04-30 Thread Mike McLean

On Apr 29, 2012, at 4:59 AM, Bastien wrote:

 Hi Charles,
 
 Charles mill...@verizon.net writes:
 
 If I may I'll throw in my 2 cents, since I made the error in the first place
 
 Why not in Section 9.2.1 immediately before or after the special way for
 using capture from the agenda?
 
 The documentation reads as follows in org-capture.el at
 
 (defun org-capture (optional goto keys)
  Capture something.
 \\org-capture-mode-map
 
 .  .  .
 
 When called with a `C-0' (zero) prefix, insert a template at point.
 .  .  .
 
 I added this in 9.1.2:
 
 To insert the capture at point in an Org buffer, call @code{org-capture} with
 a @code{C-0} prefix argument.

Well thank you all for the discussion at least. I've been using Org Mode for 2+ 
years, didn't know this, and it is now my favorite “feature” :)


Re: [O] Org Clock Table / Subtree Export subtle bug

2012-04-29 Thread Mike McLean

On Apr 28, 2012, at 7:19 PM, Bastien wrote:

 Hi Mike,
 
 thanks very much for the detailed bug report.
 
 Mike McLean mike.mcl...@pobox.com writes:
 
 The general symptom is that if:
 
You have org-update-all-dblocks added
to org-export-first-hook with the goal of ensuring that dynamic
blocks are current before every export; AND
You are exporting only a region of the file, for example
using C-c C-e 1 b (buffer/subtree export)
 
 The Mark terminating the end of the region to be exported is carried
 into the org-clocktable-write-default formatting function and the
 call of (backward-delete-char 1) on line 2352 oforg-clock.el deletes
 a region (between the Mark of the initial call and point, which is
 immediately before the #+END: construct of the clock table). Deletion
 of the #+END: construct malforms the clock table and ultimately the
 export fails leaving the Org file is a corrupt state.
 
 The trick is to use (let ((delete-active-region nil)) ...) so that 
 the active region is not deleted by such adjustments.

Interesting, I was going to play a bit today and try things like 
(save-excursion (deactivate-mark) … ) but didn't know if that was the right 
approach or not. The delete-active-region sure seems simpler :)

 I pushed a fix.

Thank you




Re: [O] Org Clock Table / Subtree Export subtle bug

2012-04-29 Thread Mike McLean
On Apr 29, 2012, at 7:49 AM, Mike McLean wrote:

 
 On Apr 28, 2012, at 7:19 PM, Bastien wrote:
 
 The trick is to use (let ((delete-active-region nil)) ...) so that 
 the active region is not deleted by such adjustments.
 
 Interesting, I was going to play a bit today and try things like 
 (save-excursion (deactivate-mark) … ) but didn't know if that was the right 
 approach or not. The delete-active-region sure seems simpler :)
 
 I pushed a fix.
 
 Thank you

I can confirm that the single-tree-export no longer corrupts the Org file and 
works with the EMF file.

Strange though that now in my full setup the generated export does not include 
the Clock Report table. (This works fine with the test file in ~emacs -q~ so 
this is my issue).


[O] Org Clock Table / Subtree Export subtle bug

2012-04-27 Thread Mike McLean
Hello

I have found a bug with clock tables and even have localized the exact
point in org-clock.el where it occurs. I don’t know enough of the Org Mode
code base to figure out the best solution and submit a patch.

The general symptom is that if:

   - You have org-update-all-dblocks added to org-export-first-hook with
   the goal of ensuring that dynamic blocks are current before every export;
   AND
   - You are exporting only a region of the file, for example using C-c C-e
   1 b (buffer/subtree export)

The Mark terminating the end of the region to be exported is carried into
the org-clocktable-write-default formatting function and the call of
(backward-delete-char
1) on line 2352 oforg-clock.el deletes a region (between the Mark of the
initial call and point, which is immediately before the #+END: construct of
the clock table). Deletion of the #+END: construct malforms the clock table
and ultimately the export fails leaving the Org file is a corrupt state.
 1 Detailed steps to reproduce
 1.1 Emacs Initialization

Launch Emacs clean:


/Applications/Emacs.app/Contents/MacOS/Emacs -Q

Add the update to org-export-first-hook by evaluating the follwing line in
*scratch*


(add-hook 'org-export-first-hook 'org-update-all-dblocks)

Report versions (note this report is done from the non-Git-HEAD Org 7.8.09
included with Emacs, but the problem also exists in HEAD):


M-x emacs-version
GNU Emacs 24.1.50.1 (x86_64-apple-darwin, NS apple-appkit-1038.36) of
2012-04-27 on bob.porkrind.org

M-x org-version
Org-mode version 7.8.09

1.2 Baseline and Error Tests
 1.2.1 Test File

Open the following test file

* Project A#+BEGIN: clocktable :maxlevel 2 :scope subtree
Clock summary at [2012-04-27 Fri 14:30]
| Headline | Time   |  ||--++--||
*Total time* | *2:59* |  ||--++--||
Project A| 2:59   |  || Task A1  || 2:00 || Task
A2  || 0:59 |  #+END:** Task A1
   CLOCK: [2012-04-26 Fri 11:58]--[2012-04-26 Thu 13:58] =  2:00** Task A2
   CLOCK: [2012-04-27 Fri 09:00]--[2012-04-27 Fri 09:59] =  0:59*
Project B** Task B1

1.2.2 Baseline test

Export the entire buffer as a baseline test


C-c C-e b

The result is as expected:

   - A valid HTML export
   - The Clock Summary line changes to reflect the current time (showing
   that org-update-all-dblocks) ran correctly

1.2.3 Reproduce the Error

Put the cursor on the Project A line and attempt to export just the Project
A subtree


C-c C-e 1 b

The expected result is a (smaller than before) valid HTML export.

The actual result is:

   - org-map-dblocks: Dynamic block not terminated in the echo area
   - Lines between #+END: and Project B are deleted from the file resulting
   in the following invalid Org file


#+STARTUP: showeverything
* Project A
#+BEGIN: clocktable :maxlevel 2 :scope subtree
Clock summary at [2012-04-27 Fri 14:15]

| Headline | Time   |  |
|--++--|
| *Total time* | *2:59* |  |
|--++--|
| Project A| 2:59   |  |
| Task A1  || 2:00 |
| Task A2  || 0:59 |

* Project B

1.3 Diagnosis

Tracing through org-clock.el I found the culprit on line 2352, if I add a
(debug) statement immediately before that line I see the following:

   - on a normal clock table update (C-c C-c on the #+BEGIN: line) the
   debugger enters and there is no region highlighted
   - when trying the subtree export the debuggers enters and there is a
   highlighted active region in test.org from the end of the table (Point)
   to the end of the entire Project Asubtree (Mark, from the selection made
   by the export subtree code)


test.org
Description: Binary data


Re: [O] LaTeX-export to ACM SIG Proceedings format

2012-04-25 Thread Mike McLean
On Wednesday, April 25, 2012, Achim Gratz wrote:


 Here's my chance to upsell the new build system to you: to use code from
 contrib, just link or copy it into lisp, then do whatever you let make
 normally do.  You usually don't need any extra requires since the
 autoload cookies do their magic.  If it turns out you don't want or need
 that code from contrib, simply remove the files from lisp and re-make.


So if I do not copy/move/link code from contrib/lisp/ to lisp/ I could
still be using old contrib code from my Emacs system directories?


Re: [O] LaTeX-export to ACM SIG Proceedings format

2012-04-25 Thread Mike McLean
On Wednesday, April 25, 2012, Achim Gratz wrote:

 Mike McLean writes:
  So if I do not copy/move/link code from contrib/lisp/ to lisp/ I could
  still be using old contrib code from my Emacs system directories?

 There is no contrib code in Emacs unless you yourself installed it
 there.  The advantage of copying to lisp is that you don't need to add
 contrib to the load-path and mostly don't need any further setup beyond
 (require 'org-install).


Sorry for the noise, I completely forgot that I added two directories (lisp
and contrib/lisp) to my load path. If I had thought a few more seconds
before replying, I would not have :(


Re: [O] error on opening org-file with #+startup: indent

2012-04-24 Thread Mike McLean

On Apr 23, 2012, at 7:15 PM, Bastien wrote:

 fkunze fku...@gmail.com writes:
 
  When I open an org file with  #+startup: indent in the header, the cursor 
 immediately goes to the bottom of the buffer and can not be moved upward.
 
 I can't reproduce this error...
 
 This behavior does not occur in Org 6.36.
 
 ... and that's surely why.

Actually he/she said that he had just upgraded to Org 7.8.09 (the test on 6.36 
was his/her regression test) -- so I don't think the absolute version of Org is 
the problem. 

Fkunze - I am suspecting that you have mis-matched org-mode installs, i.e. 
pieces and parts of both. What does =M-x org-version= say when you are 
experiencing the problem?

Can you completely clean/remove the old Org 6.36 version to ensure no conflict?





Re: [O] Org tasks from gnus

2012-04-23 Thread Mike McLean

On Apr 23, 2012, at 10:57 AM, Rasmus wrote:

 jca+...@wxcvbn.org (Jérémie Courrèges-Anglas) writes:
 
 Rasmus ras...@gmx.us writes:
 [...]
 As others said, use org-complete.  Most of my TODOs link to a mail.
 [...]
 I think you meant org-capture, as described by your example setup. :)
 Org-capture works indeed fine for me.
 
 Sure, that's what I meant :)

And here I was looking for an Org Mode feature (org-complete) that would have 
new to me :)


Re: [O] Default show all archived entries for agenda

2012-04-23 Thread Mike McLean

On Apr 23, 2012, at 2:50 PM, Marcelo de Moraes Serpa wrote:

 Hi guys,
 
 How could I configure it so that the agenda always shows archived entries by 
 default? It's a nice way to get a log of what I accomplished chronologically 
 without having to keep a specific log file per se (work log, food log, 
 whatever-log). I could always just use v A in the agenda filter, but I'd 
 rather just make it the default if it's easy to do.

I have something similar to what you are looking for. I have a custom agenda 
view that shows the clock check mode. The trick is the list of option settings 
when defining the custom agenda view. (Do a describe-variable on 
org-agenda-custom-commands).

Using this idea you could have several custom agenda views; a work-log that 
selects on your work tag, sets archives mode, log mode, etc. and a second that 
selects your food log tag and the same archives and log mode options, and so on 
and so on.

HTH

(c Clock Review
 (
  (agenda 
  (
   (org-agenda-overriding-header Clocking Review)
   (org-agenda-archives-mode t)
   (org-agenda-span 'day)
   (org-agenda-show-log 'clockcheck)
   (org-agenda-clockreport-mode t)))
  )
 )


 Thanks,
 
 - Marcelo.




Re: [O] Flexible plain list bullets

2012-04-22 Thread Mike McLean

On Apr 20, 2012, at 6:35 PM, Bastien wrote:

 Don't underestimate the Unpredictable -- I'm sure if you write something 
 with overlays and funny Unicode chars for list bullets people will start
 using it.  Speaking for me, I'd be curious to test it!

Speaking of unpredictable; Emacs 24 now supports Unicode 6 and specifically U6 
Emoticons (assuming a font that supports them, also).

http://j.mp/Ih9NZS

I actually see more of a use for new unicode characters for Tags than for 
bullet lists, but either one could be cool.

Mike



Re: [O] Org Mode new Makefile and el-get

2012-04-22 Thread Mike McLean

On Apr 22, 2012, at 2:49 AM, Achim Gratz wrote:

 Mike McLean writes:
 If anyone uses el-get (https://github.com/dimitri/el-get) the recipe
 for building OrgMode broke with the recent Makefile changes. I
 submitted a patch to el-get to change the OrgMode build
 (https://github.com/dimitri/el-get/pull/719).
 
 This is more easily accomplished using the target oldorg.

I did see the “oldorg” references in the email thread; my question is which one 
is more future proof? I guess (and please tell me if I am incorrect) that the 
oldorg build is just there for backwards compatibility and that the compile, 
autoloads, info was the “correct” way.





[O] Org Mode new Makefile and el-get

2012-04-21 Thread Mike McLean
If anyone uses el-get (https://github.com/dimitri/el-get) the recipe for 
building OrgMode broke with the recent Makefile changes. I submitted a patch to 
el-get to change the OrgMode build (https://github.com/dimitri/el-get/pull/719).

Specifically, this patch references Samuel Wales’ message: 
http://permalink.gmane.org/gmane.emacs.orgmode/55022





Re: [O] Ever used org-mode contrib packages?

2012-04-12 Thread Mike McLean
On Wednesday, April 11, 2012, François Allisson wrote:

 Hello,

 I've just updated the index of contributed packages on Worg [1]. Have
 a look, it is full of treasures...


I use org-collector pretty extensively for meeting workflows. I use
concepts similar to Org Mode Tips for Team Management (
http://juanreyero.com/article/emacs/org-teams.html ) but without the custom
code from it. Each meeting is a level 1 head in an org file dedicated to
the team I am leading, I track meeting notes, tasks, etc. using normal
org-mode features. I have a top-level task summary header that has a few
sections that populate tables based on different criteria using
org-collector. I circulate meeting notes as a PDF export via LaTeX limited
to the task summary header and the most current meeting (using a no export
tag on past/completed meetings so that they do not export).


Re: [O] conditional TODOs

2012-04-12 Thread Mike McLean
I typically handle this using the ordered property.


* Project
:PROPERTIES:
:ORDERED: t
:END:
** VERIFY Task I am waiting on (I have a TODO state named VERIFY in my normal 
setup)
** TODO Task I need to do first (after waiting)
** TODO Task I need to do second (after waiting and after the do first)
---

Note that on the VERIFY task I usually also have a person-based tag that tells 
me who it is that I'm waiting on

HTH

Mike

On Apr 12, 2012, at 11:37 AM, Daniel Krenn wrote:

 I have the following situation: In a Project someone else has to do
 something and I have to wait until that is finished. If it is finished,
 then there are several TODOs. How do I that in a clever way? I.e. how to
 write that future TODOs, so that they do not appear as TODOs now (e.g.
 in the agenda) but only then, when the status of the project is changed
 from WAIT (until the other person has finished) to a state where I have
 to do something?
 
 Daniel
 




Re: [O] Bug: Tag Completion Not Prompting for all tags

2012-04-11 Thread Mike McLean
Yes, there is still the original bug (re-occurring after the reverts).
Matt's comment was accurate but related to the implementation of the fix
not th concept of the bug. If you switch two free-tag entry mode from fast
tag selection, the tags listed in the alist are not available for
completion.

The trick, it appears, is to fix this in a way that a) works with and
without Ido mode and b) doesn't also introduce the duplication that Matt
reported.

On Wednesday, April 11, 2012, Bastien wrote:

 Hi Mike,

 Mike McLean mike.mcl...@pobox.com javascript:; writes:

  The bug was after shifting to free tag selection mode, the
  tags defined in org-tag-alist are not available for completion.

 Not sure I understand.  Do you suggest there is still a bug,
 considering that we want to skip to Matt's quote about historical
 behavior?  Please let me know if so.

 --
  Bastien



Re: [O] Bug: Tag Completion Not Prompting for all tags

2012-04-11 Thread Mike McLean
And c) with :startgroup and :endgroup in the alist :)

On Wednesday, April 11, 2012, Mike McLean wrote:

 Yes, there is still the original bug (re-occurring after the reverts).
 Matt's comment was accurate but related to the implementation of the fix
 not th concept of the bug. If you switch two free-tag entry mode from fast
 tag selection, the tags listed in the alist are not available for
 completion.

 The trick, it appears, is to fix this in a way that a) works with and
 without Ido mode and b) doesn't also introduce the duplication that Matt
 reported.

 On Wednesday, April 11, 2012, Bastien wrote:

 Hi Mike,

 Mike McLean mike.mcl...@pobox.com writes:

  The bug was after shifting to free tag selection mode, the
  tags defined in org-tag-alist are not available for completion.

 Not sure I understand.  Do you suggest there is still a bug,
 considering that we want to skip to Matt's quote about historical
 behavior?  Please let me know if so.

 --
  Bastien




Re: [O] Bug: Tag Completion Not Prompting for all tags

2012-04-10 Thread Mike McLean
Interesting

The very first report I submitted (
http://comments.gmane.org/gmane.emacs.orgmode/53824 ) showed the historic
behavior correct (the two tags defined in org-tag-alist show up in the fast
tag completion window). The bug was after shifting to free tag selection
mode, the tags defined in org-tag-alist are not available for completion.

The behavior that Matt Lundin reported was/is a side effect of the fix
(implementation). I think that the idea of the fix is valid, e.g. the free
tag entry should autocomplete tags defined in org-tag-alist to match the
behavior of the fast tag completion window.

On Tuesday, April 10, 2012, Bastien wrote:

 Hi Mike,

 I just reverted the commits I pushed for fixing this issue.

 Mike McLean mike.mcl...@pobox.com javascript:; writes:

  The expected result is a completion list of tag_a and tag_b, this
  does not work and the Minibuffer prompts [No match]

 I cannot do any better than to quote Matt Lundin on this:

 Historically, only tags explicitly defined in org-tag-alist or via an
 in-buffer heading show up in the fast tag completion window.

 So, let's stick to the current behavior.

 Thanks for your patience!

 --
  Bastien



Re: [O] Bug: Tag Completion Not Prompting for all tags

2012-04-10 Thread Mike McLean
On Tuesday, March 27, 2012, Bastien wrote:


  Shouldn't free tag entry always show all possible tags, regardless of
  the setting of or use of fast tag completion?

 I think so -- thanks a lot for the detailed report.


Yes, this is the crux of the problem as first reported. Note that the fixes
were in two parts because the first patch worked without
org-completion-use-ido (part of a minimal test case) and the second attempt
was to fix it with org-completion-use-ido enabled.


Re: [O] Bug: Tag Completion Not Prompting for all tags

2012-04-04 Thread Mike McLean
FYI

I saw the other thread related to org-tag-fast-selection and Ido mode, so I
just re tested my minimal example below. I get the same error with:

release_7.8.07-207-g5d9c
Org-mode version 7.8.08 (release_7.8.07.207.g5d9c)

This version includes the April 3 commit e48d67ed6 that mentions bug when
gathering tag completion options

Mike

On Tuesday, April 3, 2012, Mike McLean wrote:

 OK - sorry, it took an extra day. Here is the new (third, and hopefully
 last) test case.
 1 Steps to Reproduce:
 1.1 Start Emacs clean

 /Applications/Emacs.app/Contents/MacOS/Emacs -Q

 1.1.1 Note: Emacs Version

 M-x emacs-version RET
 GNU Emacs 24.0.95.1 (x86_64-apple-darwin, NS apple-appkit-1038.36) of 
 2012-04-03 on bob.porkrind.org

 1.2 Clone Git HEAD Org-Mode (to get the new commit)

 $ git clone git://orgmode.org/org-mode.git

 1.3 Load Cloned version of org-mode

 Evaluate the following Lisp in *scratch*

 (require 'ido)
 (ido-mode t)

 (setq load-path (cons ~/tmp/new-new-new/org-mode/lisp load-path))
 (setq load-path (cons ~/tmp/new-new-new/org-mode/contrib/lisp load-path))
 (require 'org-install)
 (setq org-completion-use-ido t)
 (setq org-tag-alist (quote (
 (:startgroup)
 (tag_a . ?a)
 (tag_b . ?b)
 (:endgroup)
 (tag_c . ?c)
 )))

 1.4 Open the following org-mode file

 * Header 1
 ** Header 1.1
 * Header 2
   :Personal:

 1.4.1 Note: Org-Version

 M-x org-version RET
 release_7.8.07-201-g72d9
 Org-mode version 7.8.08 (release_7.8.07.201.g72d9)

 1.5 Point should be on the first asterisk for “Header 1”
 1.6 Type C-c C-q to bring up Tag selection

 The expected result is the fast tag selection window-split; this works
 1.7 Type TAB to enter free tag selection

 The expected result is that the Minibuffer prompts with Tag: and the ido 
 completion
 (this works)
 1.8 Type t to begin to ido select one of the tags

 The expected result is the ido completion narrowing the choices; the
 result

 Error in post-command-hook (ido-exhibit): (wrong-type-argument sequencep 97)

 Note that M-x toggle-debug-on-error doesn’t show anything different than
 the above.

 On Apr 2, 2012, at 11:50 AM, Bastien wrote:

 Hi Mike,

 Mike McLean mike.mcl...@pobox.com javascript:_e({}, 'cvml',
 'mike.mcl...@pobox.com'); writes:

 The dangers of minimal testing setups is rearing its ugly head.


 You bet :)

 I can

 confirm that your latest patch does fix the minimal example that I

 provided. It does not, sadly, fix a similar case where the

 org-tag-alist variable includes the :startgroup and :endgroup tokens.

 If you can my most recent steps to reproduce, step 1.3, and add those

 tokens, the error is Wrong type argument: stringp, :endgroup


 Can you resubmit the full test case?

 Thank you for you patience :)


 Thanks for your collaboration :)

 --
 Bastien





Re: [O] Bug: Tag Completion Not Prompting for all tags

2012-04-03 Thread Mike McLean
OK - sorry, it took an extra day. Here is the new (third, and hopefully last) 
test case.

1 Steps to Reproduce:

1.1 Start Emacs clean

/Applications/Emacs.app/Contents/MacOS/Emacs -Q
1.1.1 Note: Emacs Version

M-x emacs-version RET
GNU Emacs 24.0.95.1 (x86_64-apple-darwin, NS apple-appkit-1038.36) of 
2012-04-03 on bob.porkrind.org
1.2 Clone Git HEAD Org-Mode (to get the new commit)

$ git clone git://orgmode.org/org-mode.git
1.3 Load Cloned version of org-mode

Evaluate the following Lisp in *scratch*

(require 'ido)
(ido-mode t)

(setq load-path (cons ~/tmp/new-new-new/org-mode/lisp load-path))
(setq load-path (cons ~/tmp/new-new-new/org-mode/contrib/lisp load-path))
(require 'org-install)
(setq org-completion-use-ido t)
(setq org-tag-alist (quote (
(:startgroup)
(tag_a . ?a)
(tag_b . ?b)
(:endgroup)
(tag_c . ?c)
)))
1.4 Open the following org-mode file

* Header 1
** Header 1.1
* Header 2  
:Personal:
1.4.1 Note: Org-Version

M-x org-version RET
release_7.8.07-201-g72d9
Org-mode version 7.8.08 (release_7.8.07.201.g72d9)
1.5 Point should be on the first asterisk for “Header 1”

1.6 Type C-c C-q to bring up Tag selection

The expected result is the fast tag selection window-split; this works

1.7 Type TAB to enter free tag selection

The expected result is that the Minibuffer prompts with Tag: and the ido 
completion (this works)

1.8 Type t to begin to ido select one of the tags

The expected result is the ido completion narrowing the choices; the result

Error in post-command-hook (ido-exhibit): (wrong-type-argument sequencep 97)
Note that M-x toggle-debug-on-error doesn’t show anything different than the 
above.


On Apr 2, 2012, at 11:50 AM, Bastien wrote:

 Hi Mike,
 
 Mike McLean mike.mcl...@pobox.com writes:
 
 The dangers of minimal testing setups is rearing its ugly head. 
 
 You bet :)
 
 I can
 confirm that your latest patch does fix the minimal example that I
 provided. It does not, sadly, fix a similar case where the
 org-tag-alist variable includes the :startgroup and :endgroup tokens.
 If you can my most recent steps to reproduce, step 1.3, and add those
 tokens, the error is Wrong type argument: stringp, :endgroup
 
 Can you resubmit the full test case?
 
 Thank you for you patience :)
 
 Thanks for your collaboration :)
 
 -- 
 Bastien
 



Re: [O] Bug: Tag Completion Not Prompting for all tags

2012-04-02 Thread Mike McLean
Bastion

The dangers of minimal testing setups is rearing its ugly head. I can
confirm that your latest patch does fix the minimal example that I
provided. It does not, sadly, fix a similar case where the org-tag-alist
variable includes the :startgroup and :endgroup tokens. If you can my most
recent steps to reproduce, step 1.3, and add those tokens, the error is
Wrong type argument: stringp, :endgroup

Thank you for you patience :)

On Saturday, March 31, 2012, Bastien wrote:

 Hi Mike,

 Mike McLean mike.mcl...@pobox.com javascript:; writes:

  Bastien
 
  I can verify that this has fixed the problem with tag completion not
  prompting for all tags. I see that commit
  647396464d563634b980127673cf61769663407e has added a wrapper
  (append that combines buffer-tags with (mapcar 'car table).
 
  This has, however, exposed a new bug and conflict
  with org-completion-use-ido that I can minimally reproduce below.

 This is now fixed, thanks!

 --
  Bastien



Re: [O] Bug: Tag Completion Not Prompting for all tags

2012-04-02 Thread Mike McLean
Apologies, I blame my iOS spell check for the correction of the spelling
on your name :(

Of course I should have seen it before I hit send, too ... Sigh

On Monday, April 2, 2012, Mike McLean wrote:

 Bastion

 The dangers of minimal testing setups is rearing its ugly head. I can
 confirm that your latest patch does fix the minimal example that I
 provided. It does not, sadly, fix a similar case where the org-tag-alist
 variable includes the :startgroup and :endgroup tokens. If you can my most
 recent steps to reproduce, step 1.3, and add those tokens, the error is
 Wrong type argument: stringp, :endgroup

 Thank you for you patience :)

 On Saturday, March 31, 2012, Bastien wrote:

 Hi Mike,

 Mike McLean mike.mcl...@pobox.com writes:

  Bastien
 
  I can verify that this has fixed the problem with tag completion not
  prompting for all tags. I see that commit
  647396464d563634b980127673cf61769663407e has added a wrapper
  (append that combines buffer-tags with (mapcar 'car table).
 
  This has, however, exposed a new bug and conflict
  with org-completion-use-ido that I can minimally reproduce below.

 This is now fixed, thanks!

 --
  Bastien




Re: [O] Bug: Tag Completion Not Prompting for all tags

2012-04-02 Thread Mike McLean
Yes,  but not until later tonight at the earliest. I have limited access to
personal email at work (iPad only) which is not conducive to emailing test
cases

On Monday, April 2, 2012, Bastien wrote:


 Can you resubmit the full test case?



 --
  Bastien




[O] Bug: Tag Completion Not Prompting for all tags

2012-04-02 Thread Mike McLean
Yes,  but not until later tonight at the earliest. I have limited access to
personal email at work (iPad only

On Monday, April 2, 2012, Bastien wrote:


 Can you resubmit the full test case?



 --
  Bastien




[O] [PATCH] Fix Org-Collector Error in Global Scope

2012-03-24 Thread Mike McLean
When calling Org-Collector with =:id global=, the call to 
=(org-narrow-to-subtree)= generates an error when the first line of the org 
file is not a header. Given that =:id global= is designed to use the entire 
file, the call to =(org-narrow-to-subtree)= is not even necessary. This patch 
skips it for global scope collector calls.

This is a TINYCHANGE

Mike


Modified   contrib/lisp/org-collector.el
diff --git a/contrib/lisp/org-collector.el b/contrib/lisp/org-collector.el
index ad198ed..eac97f9 100644
--- a/contrib/lisp/org-collector.el
+++ b/contrib/lisp/org-collector.el
@@ -131,7 +131,8 @@ preceeding the dblock, then update the contents of the 
dblock.
  ((setq idpos (org-find-entry-with-id id))
   (goto-char idpos))
  (t (error Cannot find entry with :ID: %s id
- (org-narrow-to-subtree)
+ (unless (equal id 'global)
+ (org-narrow-to-subtree))
  (setq stringformat (if noquote %s %S))
  (setq table (org-propview-to-table
   (org-propview-collect cols stringformat conds match 
scope inherit




[O] Bug: Tag Completion Not Prompting for all tags

2012-03-24 Thread Mike McLean
Steps to Reproduce:

1 Start Emacs clean

/Applications/Emacs.app/Contents/MacOS/Emacs -Q
1.1 Note: Emacs Version

emacs-version is a variable defined in `C source code'.
Its value is 24.0.94.1
2 Load Org Mode and some sample tags

Evaluate the following in the scratch buffer

(require 'org-install)
(setq org-tag-alist (quote (
(tag_a . ?a)
(tag_b . ?b
3 Open the following org-mode file

* Header 1
** Header 1.1
* Header 2  
:Personal:
4 Point should be on the first asterisk for “Header 1”

5 Type C-c C-q to bring up Tag selection

The expected result is the fast tag selection; this works

6 Type TAB to enter free tag selection

The expected result is that the Minibuffer prompts with Tag:; this works

7 Type Per followed by TAB

The expected result is a completion of the file-tag Personal; this works

8 Type tag_ followed by TAB

The expected result is a completion list of tag_a and tag_b, this does not work 
and the Minibuffer prompts [No match]

Note that if I were to remove the single characters for tag_a and tag_b 
completion works for those two but not for the Personal tag from the file

Shouldn't free tag entry always show all possible tags, regardless of the 
setting of or use of fast tag completion?

Re: [O] Bug: Tag Completion Not Prompting for all tags

2012-03-24 Thread Mike McLean

On Mar 24, 2012, at 12:03 PM, Bastien wrote:

 Hi Mike,
 
 Mike McLean mike.mcl...@pobox.com writes:
 
 Steps to Reproduce:
 
 1 Start Emacs clean
 
 /Applications/Emacs.app/Contents/MacOS/Emacs -Q
 
 1.1 Note: Emacs Version
 
 emacs-version is a variable defined in `C source code'.
 Its value is 24.0.94.1
 
 What shows M-x org-version RET?
 

In my daily environment (keeping org-mode current):

Org-mode version 7.8.06 (release_7.8.06.118.g50563)

In my Emacs -Q environment (the version of org-mode that comes with Emacs 24 
nightly from http://emacsforosx.com/

Org-mode version 7.8.03

The behavior I am seeing happens in both, in fact I noticed it first in my 
daily use environment and was testing with Emacs -Q to eliminate possible 
configuration problems on my part.

Mike




  1   2   >