Re: [O] mail integration, advice?

2012-04-27 Thread Stephen Eglen
A relatively new emacs mailer, mu4e, is worth mentioning:

http://www.djcbsoftware.nl/code/mu/mu4e.html

I really like it so far + it has support for org mode links.

Stephen




[O] local.mk and SUDO

2012-04-27 Thread Martyn Jago

I have a local.mk set up with my particular settings, and with SUDO
set to blank, as per the comment in default.mk:

,[default.mk]
| # How to obtain administrative privileges
| # SUDO=   # leave blank if you don't need this
| SUDO  = sudo
`

...since my org-mode files location doesn't require supervisor access
(typically I have 4 org-mode installs, and 4 Emacs versions for testing,
although currently I'm just running my working system).

However, when I've just gone to run `make up2' (awesome command by the
way), I get the error:

--8---cut here---start-8---
 make up2
git remote update
Fetching origin
git pull
Updating abd49c8..0233eb9
error: Your local changes to the following files would be overwritten by merge:
contrib/lisp/org-export.el
lisp/ob-R.el
lisp/ob-python.el
lisp/ob.el
lisp/org-agenda.el
lisp/org-beamer.el
lisp/org-bibtex.el
lisp/org-capture.el
lisp/org-clock.el
lisp/org-colview-xemacs.el
lisp/org-colview.el
lisp/org-ctags.el
lisp/org-exp.el
lisp/org-faces.el
lisp/org-footnote.el
lisp/org-gnus.el
lisp/org-latex.el
lisp/org-mouse.el
lisp/org-odt.el
lisp/org-publish.el
lisp/org-table.el
lisp/org.el
--8---cut here---end---8---

After investigation it turns out the problem is a permissions issue:

--8---cut here---start-8---
diff --git a/lisp/org-mobile.el b/lisp/org-mobile.el
old mode 100644
new mode 100755
--8---cut here---end---8---

After further investigation, I have modified git config to overide the
core.filemode setting which works for me:

,
| core.fileMode
|If false, the executable bit differences between the index and the
|working copy are ignored; useful on broken filesystems like FAT.
|See git-update-index(1). True by default.
`

--8---cut here---start-8---
git config core.filemode false
--8---cut here---end---8---


So really - this is just a heads-up of my experience setting SUDO to
blank, but it would be nice to know if this is expected behavior? If it
turns out that it is, then perhaps I can supply a documentation patch
(an extra comment in default.mk).

HTH

Best, Martyn




[O] var `date' lacks a prefix warnings

2012-04-27 Thread Martyn Jago

Regarding the remaining Org-mode `lacks a prefix' warnings and
particularly in light of the recent message on emacs.devel [1] would it
not be sufficient to simply alias date and entry locally:

--8---cut here---start-8---
(defvaralias 'org--date 'date)
(defvaralias 'org--entry 'entry)
--8---cut here---end---8---

Presumably this would be backwardly-compatible, and given a subsequent
name change in diary-lib.el a very simple integration test could catch
that very quickly.

If I get a positive response I can perhaps look at a patch and tests,
but if my understanding is amiss I will appreciate the heads-up.

Best, Martyn

p.s. I should point out that my personal view is that a serious well
maintained Emacs library such as Org-mode should have a zero warning
policy for official releases.

Footnotes: 
[1]  From: Chong Yidong c...@gnu.org
 Subject: Evil defvars in org.el
 Newsgroups: gmane.emacs.devel
 To: Bastien Guerry b...@gnu.org
 Cc: emacs-de...@gnu.org
 Date: Fri, 27 Apr 2012 11:17:37 +0800 (9 hours, 36 minutes, 57 seconds ago)






Re: [O] [babel] hide inline source code blocks by results

2012-04-27 Thread Eric Fraga
Eric Schulte eric.schu...@gmx.com writes:


[...]

 I think both this and Torsten's original idea would both be nice
 options.  Preferably the final solution would subsume either use case.
 Unfortunately either implementation would require a fairly significant
 amount of work on the inline source block system, work which I
 unfortunately do not have time for at the moment (although I'm happy to
 help if anyone else wants to jump into the code).

Understood!!  You don't have to tell me about finite time resources :(
But it *is* nice to ponder new syntax for org :-) I even started
thinking of other link type syntax:

 [[inline:octave(3*x+5)]]
 [[call:f(5)]]
 etc.

It's fun.

Thanks,
eric

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.1.50.1
: using Org-mode version 7.8.09 (release_7.8.09-392-ge02226 @ 
/home/ucecesf/git/org-mode/lisp/org-install.el)




Re: [O] [bug] new exporter fails on read only files

2012-04-27 Thread Eric Fraga
Bastien b...@gnu.org writes:

 Hi Eric,

 Eric Fraga e.fr...@ucl.ac.uk writes:

 Specifically, I have added

(require 'org-export)
(require 'org-e-latex)

 to my org customisation.  Then, while visiting a read only file, I try

M-x org-export-dispatch RET p

 Mhh.. I can't reproduce this error with latest Org.

Arghhh.  Strange.


 and I get the error:

 ,
 | org-refresh-category-properties: Buffer is read-only: #buffer 
 proposal.org
 `

 Maybe you have a hook which call this function?

I do not believe so.  Grepping for category in my .el files (including
custom variable setting) finds nothing org related.

Obviously, I can try emacs -Q etc and will do so later this weekend
hopefully.

In the meantime:

 In any case, as the other place where `org-refresh-category-properties'
 is called is `org-prepare-agenda-buffers' and those buffers might be
 read-only (for some obscure reason), I pushed a fix that make sure 
 `org-refresh-category-properties' can modify the buffer correctly.

 Please let me know if this fixes your problem.

Actually, I have updated (one minute ago) and the problem has now
changed!  I now get this error:

,
| and: Wrong type argument: stringp, (latex-fragment (:value 
\\ref{sec:evaporative} :begin 11957 :end 11978 :post-blank 0))
`

and I have no idea what is happening here.  For this error, I do get a
debug trace but it is rather long and my org file has material I cannot
post. The old exporter still works perfectly fine.

I will try emacs -Q later and will also see if I can come up with a
minimal example that fails in the same way as my longer confidential
document.

Thanks,
eric

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.1.50.1
: using Org-mode version 7.8.09 (release_7.8.09-392-ge02226 @ 
/home/ucecesf/git/org-mode/lisp/org-install.el)




[O] [BUG?] Fontification broken

2012-04-27 Thread suvayu ali
Hi,

I think the following commit in Emacs 24 broke fontification in several
places (inside and outside Org). Inside Org I noticed it in certain
headlines and parts of file headers.

http://repo.or.cz/w/emacs.git/commit/2faa2c5d69f36c29cdd3b654f4cc9c4b89c81e5a

I'm not entirely sure, as I have not looked at this in detail. Could
someone take a look and confirm one way or the other?

Thanks,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] [BUG?] Fontification broken

2012-04-27 Thread Bastien
Hi Suvayu,

suvayu ali fatkasuvayu+li...@gmail.com writes:

 I think the following commit in Emacs 24 broke fontification in several
 places (inside and outside Org). Inside Org I noticed it in certain
 headlines and parts of file headers.

can you post a screenshot displaying the problem?

 http://repo.or.cz/w/emacs.git/commit/2faa2c5d69f36c29cdd3b654f4cc9c4b89c81e5a

 I'm not entirely sure, as I have not looked at this in detail. Could
 someone take a look and confirm one way or the other?

My Emacs is a bit older than this version and I don't have time 
to compile right now.  Dare posting an Emacs bug report, if that's 
a bug in Emacs!

Thanks,

-- 
 Bastien



Re: [O] var `date' lacks a prefix warnings

2012-04-27 Thread Bastien
Hi Martyn,

Martyn Jago martyn.j...@btinternet.com writes:

 Regarding the remaining Org-mode `lacks a prefix' warnings and
 particularly in light of the recent message on emacs.devel [1] would it
 not be sufficient to simply alias date and entry locally:

 (defvaralias 'org--date 'date)
 (defvaralias 'org--entry 'entry)

 Presumably this would be backwardly-compatible, and given a subsequent
 name change in diary-lib.el a very simple integration test could catch
 that very quickly.

We first need to fix Calendar so that it doesn't use ̀date' and `entry'
as the name for dynamically variables that are passed around.

Then preparing a patch for Org would be great.

I'll ping Glenn on the emacs-devel mailing list about this.

 p.s. I should point out that my personal view is that a serious well
 maintained Emacs library such as Org-mode should have a zero warning
 policy for official releases.

We are close to zero.  If you have time to work on some warning,
could you have a look into the one for `buffer-substring-filters'?
Also the one for name should be fixed.  With these two, and when
the problems from calendar are fixed, we will be closer to zero.

Thanks!

-- 
 Bastien



Re: [O] [bug] new exporter fails on read only files

2012-04-27 Thread Bastien
Eric Fraga e.fr...@ucl.ac.uk writes:

 In the meantime:

 In any case, as the other place where `org-refresh-category-properties'
 is called is `org-prepare-agenda-buffers' and those buffers might be
 read-only (for some obscure reason), I pushed a fix that make sure 
 `org-refresh-category-properties' can modify the buffer correctly.

 Please let me know if this fixes your problem.

 Actually, I have updated (one minute ago) and the problem has now
 changed!  I now get this error:

 ,
 | and: Wrong type argument: stringp, (latex-fragment (:value 
 \\ref{sec:evaporative} :begin 11957 :end 11978 :post-blank 0))
 `

 and I have no idea what is happening here.  For this error, I do get a
 debug trace but it is rather long and my org file has material I cannot
 post. The old exporter still works perfectly fine.

 I will try emacs -Q later and will also see if I can come up with a
 minimal example that fails in the same way as my longer confidential
 document.

Thanks -- hopefully Nicolas will be able to have a look and reproduce 
your problem.

Best,

-- 
 Bastien



Re: [O] [BUG?] Fontification broken

2012-04-27 Thread suvayu ali
Hi Bastien

On Fri, Apr 27, 2012 at 16:22, Bastien b...@gnu.org wrote:
 Hi Suvayu,

 suvayu ali fatkasuvayu+li...@gmail.com writes:

 I think the following commit in Emacs 24 broke fontification in several
 places (inside and outside Org). Inside Org I noticed it in certain
 headlines and parts of file headers.

 can you post a screenshot displaying the problem?


I might have spoken too soon. I can't replicate it any more. I think
what I was seeing earlier was a result of mixed versions of Emacs 24,
the version running was without that commit and the version on disk had
that change.

Sorry for the noise.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] mail integration, advice?

2012-04-27 Thread Eric Schulte
Myles English mylesengl...@gmail.com writes:

 Matt,

 On Thu, 26 Apr 2012 09:47:40 -0400, Matt Price said:
So, I'm wondering what solutions other org users have settled on.

 I use gnus, offline imap, dovecot, notmuch, msmtp, bbdb3.  And org-mode
 capture including links to emails works fine.

 The end result is very good and stable through updates (I am using Arch
 Linux too) but I have to say though it did take a LOT of configurating.


As a long-time user of gnus with imap my only complaints are the
inability to work offline and the relatively poor sorting rules of my
web-mail imap servers.  It sounds like dovecot and offline-imap could
solve both of these problems.

Was the offline-imap/dovecot combo difficult to configure?

Are there perhaps online instructions to which you could direct me?
FWIW I also use Arch as my OS.

Thanks,

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



Re: [O] [BUG?] Fontification broken

2012-04-27 Thread Zack Mayson
On 27/04/2012 16:04, suvayu ali wrote:
 Hi Bastien

 On Fri, Apr 27, 2012 at 16:22, Bastien b...@gnu.org wrote:
 Hi Suvayu,

 suvayu ali fatkasuvayu+li...@gmail.com writes:

 I think the following commit in Emacs 24 broke fontification in several
 places (inside and outside Org). Inside Org I noticed it in certain
 headlines and parts of file headers.
 can you post a screenshot displaying the problem?

 I might have spoken too soon. I can't replicate it any more. I think
 what I was seeing earlier was a result of mixed versions of Emacs 24,
 the version running was without that commit and the version on disk had
 that change.

 Sorry for the noise.

What version of Emacs 2.4?





Re: [O] Org referring to Gnus mail

2012-04-27 Thread François Pinard
William Gardella gardell...@gmail.com writes:

 If you close the group with `gnus-summary-exit-no-update' (the Q key
 in default binding), these messages will not be marked as read.

Indeed, thanks William!

Now, I just have to be careful enough to remember to use Q instead of
q!  When flying around between Emacs buffers and duties, one may get
distracted and forget.  Besides, fast key typing too often comes from
the spinal chord rather than the brain! ☺

Maybe I could temporarily unbind q, or something.

 So you have a command to automatically populate an Org tree from local
 newsgroups?  Wow, sounds cool.

Well, only those articles matching some given pattern, not all of them.
I have had this reoccurring need to do wide searches in big set of email
folders, which I used /very/ intensely at times.

The lack of inter-operability in both WorkFlowy and Thunderbird (which I
both liked very much otherwise) was my incentive for switching into Org
and Gnus, but I did not yet re-implement wide searches in Gnus.  Having
the need again recently, I tried nnvirtual, which is *way* too slow, and
this is why I quickly kludged a solution which, fun enough, is fast!

 I've long wondered if Org would make a good mailreader, and it sounds
 like you've determined that yes, it could :)

While I clearly see the smiley, let me underline that I do not see Org
as a good mail reader.  Gnus is!  However, for me, it was much, much
easier to generate an Org tree for matching messages than to write a new
Gnus backend, thanks to the nice integration between Org and Gnus!

François




Re: [O] [BUG?] Fontification broken

2012-04-27 Thread suvayu ali
On Fri, Apr 27, 2012 at 17:42, Zack Mayson zmayso...@googlemail.com wrote:
 What version of Emacs 2.4?

Well I update my emacs once a week. I ran a git bisect and narrowed
down all my fontification issues to the commit I mentioned earlier.
However my observation that org is also affected was probably
incorrect, as I noted in my previous email.

Hope that clears any confusion.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] [BUG?] Fontification broken

2012-04-27 Thread Zack Mayson
On 27/04/2012 16:04, suvayu ali wrote:
 Hi Bastien

 On Fri, Apr 27, 2012 at 16:22, Bastien b...@gnu.org wrote:
 Hi Suvayu,

 suvayu ali fatkasuvayu+li...@gmail.com writes:

 I think the following commit in Emacs 24 broke fontification in several
 places (inside and outside Org). Inside Org I noticed it in certain
 headlines and parts of file headers.
 can you post a screenshot displaying the problem?

 I might have spoken too soon. I can't replicate it any more. I think
 what I was seeing earlier was a result of mixed versions of Emacs 24,
 the version running was without that commit and the version on disk had
 that change.

 Sorry for the noise.



-- 
*Signature? /What signature?/*


[O] [BUG] org-fill-paragraph seems broken

2012-04-27 Thread Nick Dokos
Running M-q in a draft message with orgstruct++-mode enabled gives me
the appended backtrace.

The problem seems to have been introduced by commit 84a358e3.  Git blame
fingers the following two as the most recent commits that affected
org-fill-paragraph:

187f77a2 2012-04-04
84a358e3 2012-04-26

With the first one in force, I don't get the problem; with
the second, I do.

Nick

Debugger entered--Lisp error: (wrong-number-of-arguments #[(arg) 
(/usr/local/share/emacs/24.0.95/lisp/mail/sendmail.elc . 26697) nil 4] 0)
  mail-mode-fill-paragraph()
  funcall(mail-mode-fill-paragraph)
  (cond ((and (equal (char-after (point-at-bol)) 42) (save-excursion (goto-char 
(point-at-bol)) (looking-at org-outline-regexp))) t) (table\.el-p t) (table-p 
(org-table-align) t) (itemp (let* ((struct (save-excursion (goto-char itemp) 
(org-list-struct))) (parents (org-list-parents-alist struct)) (children 
(org-list-get-children itemp struct parents)) beg end prev next prefix) (cond 
((not children) (setq prefix (make-string (org-list-item-body-column itemp) 32) 
beg itemp end (org-list-get-item-end itemp struct))) (( (point) (setq next 
(car children))) (setq prefix (make-string (org-list-item-body-column itemp) 
32) beg itemp end next)) (( (point) (setq prev (car ...))) (setq beg 
(org-list-get-item-end prev struct) end (org-list-get-item-end itemp struct) 
prefix (save-excursion (goto-char beg) (skip-chars-forward) 
(make-string ... 32 (t (catch (quote exit) (while (setq next ...) (if ... 
... ... ...) (flet ((fill-context-prefix (from to optional flr) prefix)) 
(sav
 e-restriction (narrow-to-region beg end) (save-excursion (fill-paragraph 
justify t)) ((and (derived-mode-p (quote org-mode)) (save-excursion 
(forward-paragraph -1) (setq itemp (org-in-item-p (let ((struct 
(save-excursion (goto-char itemp) (org-list-struct (save-restriction 
(narrow-to-region (org-list-get-bottom-point struct) (save-excursion 
(forward-paragraph 1) (point))) (fill-paragraph justify) t))) ((and (eq 
major-mode (quote org-mode)) (save-excursion (forward-paragraph -1) (or 
(looking-at (concat ^[^\n]* org-scheduled-regexp .*$)) (looking-at (concat 
^[^\n]* org-deadline-regexp .*$) (save-restriction (narrow-to-region 
(1+ (match-end 0)) (save-excursion (forward-paragraph 1) (point))) 
(fill-paragraph justify) t)) (org-fill-paragraph-fallback-function (funcall 
org-fill-paragraph-fallback-function)) (t nil))
  (let ((table-p (org-at-table-p)) (table\.el-p (org-at-table\.el-p)) (itemp 
(org-in-item-p))) (cond ((and (equal (char-after (point-at-bol)) 42) 
(save-excursion (goto-char (point-at-bol)) (looking-at org-outline-regexp))) t) 
(table\.el-p t) (table-p (org-table-align) t) (itemp (let* ((struct 
(save-excursion (goto-char itemp) (org-list-struct))) (parents 
(org-list-parents-alist struct)) (children (org-list-get-children itemp struct 
parents)) beg end prev next prefix) (cond ((not children) (setq prefix 
(make-string ... 32) beg itemp end (org-list-get-item-end itemp struct))) (( 
(point) (setq next ...)) (setq prefix (make-string ... 32) beg itemp end next)) 
(( (point) (setq prev ...)) (setq beg (org-list-get-item-end prev struct) end 
(org-list-get-item-end itemp struct) prefix (save-excursion ... ... ...))) (t 
(catch (quote exit) (while ... ... (flet ((fill-context-prefix (from to 
optional flr) prefix)) (save-restriction (narrow-to-region beg end) 
(save-excursion (fill-p
 aragraph justify t)) ((and (derived-mode-p (quote org-mode)) 
(save-excursion (forward-paragraph -1) (setq itemp (org-in-item-p (let 
((struct (save-excursion (goto-char itemp) (org-list-struct 
(save-restriction (narrow-to-region (org-list-get-bottom-point struct) 
(save-excursion (forward-paragraph 1) (point))) (fill-paragraph justify) t))) 
((and (eq major-mode (quote org-mode)) (save-excursion (forward-paragraph -1) 
(or (looking-at (concat ^[^\n]* org-scheduled-regexp .*$)) (looking-at 
(concat ^[^\n]* org-deadline-regexp .*$) (save-restriction 
(narrow-to-region (1+ (match-end 0)) (save-excursion (forward-paragraph 1) 
(point))) (fill-paragraph justify) t)) (org-fill-paragraph-fallback-function 
(funcall org-fill-paragraph-fallback-function)) (t nil)))
  org-fill-paragraph(nil)
  fill-paragraph(nil t)
  call-interactively(fill-paragraph)
  (let (orgstruct-mode) (call-interactively (or (key-binding \361) (quote 
orgstruct-error
  (if (org-context-p (quote headline) (quote item) (and orgstruct-is-++ nil 
(quote item-body))) (org-run-like-in-org-mode (quote fill-paragraph)) (let 
(orgstruct-mode) (call-interactively (or (key-binding \361) (quote 
orgstruct-error)
  orgstruct-hijacker-command-22(1)
  call-interactively(orgstruct-hijacker-command-22 nil nil)



Re: [O] [BUG] org-fill-paragraph seems broken

2012-04-27 Thread Bastien
Hi Nick,

Nick Dokos nicholas.do...@hp.com writes:

 Running M-q in a draft message with orgstruct++-mode enabled gives me
 the appended backtrace.

 The problem seems to have been introduced by commit 84a358e3.  Git blame
 fingers the following two as the most recent commits that affected
 org-fill-paragraph:

 187f77a2 2012-04-04
 84a358e3 2012-04-26

 With the first one in force, I don't get the problem; with
 the second, I do.

Can you try this patch against sendmail.el and report?

=== modified file 'lisp/mail/sendmail.el'
--- lisp/mail/sendmail.el	2012-04-27 03:10:38 +
+++ lisp/mail/sendmail.el	2012-04-27 17:18:43 +
@@ -803,7 +803,7 @@
 	  t)))
 (do-auto-fill)))
 
-(defun mail-mode-fill-paragraph (arg)
+(defun mail-mode-fill-paragraph (optional arg)
   ;; Do something special only if within the headers.
   (if ( (point) (mail-header-end))
   (let (beg end fieldname)

-- 
 Bastien


Re: [O] [BUG] org-fill-paragraph seems broken

2012-04-27 Thread Nick Dokos
Bastien b...@gnu.org wrote:

 Hi Nick,
 
 Nick Dokos nicholas.do...@hp.com writes:
 
  Running M-q in a draft message with orgstruct++-mode enabled gives me
  the appended backtrace.
 
  The problem seems to have been introduced by commit 84a358e3.  Git blame
  fingers the following two as the most recent commits that affected
  org-fill-paragraph:
 
  187f77a2 2012-04-04
  84a358e3 2012-04-26
 
  With the first one in force, I don't get the problem; with
  the second, I do.
 
 Can you try this patch against sendmail.el and report?
 
 === modified file 'lisp/mail/sendmail.el'
 --- lisp/mail/sendmail.el 2012-04-27 03:10:38 +
 +++ lisp/mail/sendmail.el 2012-04-27 17:18:43 +
 @@ -803,7 +803,7 @@
 t)))
  (do-auto-fill)))
  
 -(defun mail-mode-fill-paragraph (arg)
 +(defun mail-mode-fill-paragraph (optional arg)
;; Do something special only if within the headers.
(if ( (point) (mail-header-end))
(let (beg end fieldname)
 

That fixes it - but is it really a problem with sendmail.el
and not with org?

Nick



[O] org-link-to-org-use-id question

2012-04-27 Thread François Pinard
Hi, Org friends.

I'm just noticing that ID: properties are now being created whenever I save
a link.  I presume this is a recent change.

The ID does not encode the file, so I'm tempted to presume that Org
ought to read the target Org files for discovering where are the IDs.
As Org is surely not going to read all my Org files at start (it might
not even have a clue to where I saved them), I wonder how this mechanism
works.  Would someone be kind enough to enlighten me?

François




Re: [O] local.mk and SUDO

2012-04-27 Thread Achim Gratz
Martyn Jago writes:
 However, when I've just gone to run `make up2' (awesome command by the
 way), I get the error:
[...]
 diff --git a/lisp/org-mobile.el b/lisp/org-mobile.el
 old mode 100644
 new mode 100755

That's a well-known problem with anything that expects POSIX file
semantics on Windows... and Git does rely very heavily on it.

 After further investigation, I have modified git config to overide the
 core.filemode setting which works for me:
[...]
 git config core.filemode false

You should preferrably set it before any commits to that repo (or rather
in global config).  Otherwise you could use Git from Cygwin (which
emulates POSIX on anything but FAT by default), but then you must never
use any native Git on that repo (and be sure that you never access it
via a filesystem that doesn't have ACL or that is mounted with noacl
in Cygwin).  This particular pitfall is extensively documented on the
Git side.

 So really - this is just a heads-up of my experience setting SUDO to
 blank, but it would be nice to know if this is expected behavior? If it
 turns out that it is, then perhaps I can supply a documentation patch
 (an extra comment in default.mk).

I'm not sure that orgmode should document limitations of some other
software that are caused be the underlying OS...


Regards,
Achim.
-- 
+[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+

Factory and User Sound Singles for Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds




[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] var `date' lacks a prefix warnings

2012-04-27 Thread Achim Gratz
Martyn Jago writes:
 Regarding the remaining Org-mode `lacks a prefix' warnings and
 particularly in light of the recent message on emacs.devel [1] would it
 not be sufficient to simply alias date and entry locally:

 (defvaralias 'org--date 'date)
 (defvaralias 'org--entry 'entry)

That doesn't work, AFAIK: defvaralias binds the symbol (it looks up
what is behind the symbol and creates another symbol for it), but
dynamic scoping does not (you look up what's behind the symbol each time
you use it).  The problem is that when a symbol gets dynamically scoped
it cannot be used as a lexical symbol after that, so any code that uses
date and entry after the defvar doesn't get a lexcial binding.  You
would need a language construct that would let you capture a symbol
dynamically, internalize it (in essence it would be renaming that symbol
in some scope) and then erase all traces of that symbol having been
symbolically scoped so that it can be used lexically again.  I don't
think anything like that currently exists.

 p.s. I should point out that my personal view is that a serious well
 maintained Emacs library such as Org-mode should have a zero warning
 policy for official releases.

Here's a problem that originates outside of our control.  At the very
least, we can't fix it just in org.


Regards,
Achim.
-- 
+[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+

Factory and User Sound Singles for Waldorf rackAttack:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds




Re: [O] local.mk and SUDO

2012-04-27 Thread Martyn Jago
Hi Achim

Achim Gratz strom...@nexgo.de writes:

 Martyn Jago writes:
 However, when I've just gone to run `make up2' (awesome command by the
 way), I get the error:
 [...]
 diff --git a/lisp/org-mobile.el b/lisp/org-mobile.el
 old mode 100644
 new mode 100755

 That's a well-known problem with anything that expects POSIX file
 semantics on Windows... and Git does rely very heavily on it.


I'm not on Windows, I'm on Mac OS X which usually handles Git nicely - I
use it all the time. 

Best, Martyn




Re: [O] mail integration, advice?

2012-04-27 Thread Myles English

Hi Eric,

 On Fri, 27 Apr 2012 09:34:46 -0400, Eric Schulte said:

   Myles English mylesengl...@gmail.com writes:
   I use gnus, offline imap, dovecot, notmuch, msmtp, bbdb3.  And
   org-mode capture including links to emails works fine.
  
   The end result is very good and stable through updates 

Having said that I did have trouble with offlineimap 6.4-ish and so i am
still on 6.3.3-1 but 6.5.2 is out so will give that a go soon.

   (I am using Arch Linux too) but I have to say though it did take a
   LOT of configurating.
  

   As a long-time user of gnus with imap my only complaints are the
   inability to work offline and the relatively poor sorting rules of
   my web-mail imap servers.  It sounds like dovecot and offline-imap
   could solve both of these problems.

   Was the offline-imap/dovecot combo difficult to configure?

Mostly, it was not difficult, the one thing that was tricky was setting
up dovecot to handle more than one account.  I ended up doing this:

# leave as the default setting
mail_location = maildir:/home/myles/Maildir

# specify a password file
passdb {
  args = /etc/dovecot/passwd
  default_fields =
  deny = no
  driver = passwd-file
  master = no
  override_fields =
  pass = no
}

# in /etc/dovecot/passwd overide the maildir for each of my three accounts:
mylesenglish:{plain}PASSWD_FOR_MYLES:1000:1000::/home/myles::userdb_mail=maildir:/home/myles/Maildir/mylesenglish
rh:{plain}PASSWORD_FOR_RH:1000:1000::/home/myles::userdb_mail=maildir:/home/myles/Maildir/rh
ed:{plain}PASSWORD_FOR_ED:1000:1000::/home/myles::userdb_mail=maildir:/home/myles/Maildir/ed

   Are there perhaps online instructions to which you could direct me?
   FWIW I also use Arch as my OS.

I remember this was quite useful if a bit outdated, it is a bit skimpy on 
Dovecot though:

http://roland.entierement.nu/blog/2010/09/08/gnus-dovecot-offlineimap-search-a-howto.html

The command 'dovecot -a' is useful to dump your config to stout then you
can easily tell what you have changed in between attempts.

I imagine that because you are already /au fait/ with gnus you have half
the battle won.  If need be I can dump my whole config but then where is
the fun in that?

Good luck.

Myles



Re: [O] mail integration, advice?

2012-04-27 Thread Eric Schulte
Myles English mylesengl...@gmail.com writes:

 Hi Eric,

 On Fri, 27 Apr 2012 09:34:46 -0400, Eric Schulte said:

Myles English mylesengl...@gmail.com writes:
I use gnus, offline imap, dovecot, notmuch, msmtp, bbdb3.  And
org-mode capture including links to emails works fine.
   
The end result is very good and stable through updates 

 Having said that I did have trouble with offlineimap 6.4-ish and so i am
 still on 6.3.3-1 but 6.5.2 is out so will give that a go soon.

(I am using Arch Linux too) but I have to say though it did take a
LOT of configurating.
   

As a long-time user of gnus with imap my only complaints are the
inability to work offline and the relatively poor sorting rules of
my web-mail imap servers.  It sounds like dovecot and offline-imap
could solve both of these problems.

Was the offline-imap/dovecot combo difficult to configure?

 Mostly, it was not difficult, the one thing that was tricky was setting
 up dovecot to handle more than one account.  I ended up doing this:

 # leave as the default setting
 mail_location = maildir:/home/myles/Maildir

 # specify a password file
 passdb {
   args = /etc/dovecot/passwd
   default_fields =
   deny = no
   driver = passwd-file
   master = no
   override_fields =
   pass = no
 }

 # in /etc/dovecot/passwd overide the maildir for each of my three accounts:
 mylesenglish:{plain}PASSWD_FOR_MYLES:1000:1000::/home/myles::userdb_mail=maildir:/home/myles/Maildir/mylesenglish
 rh:{plain}PASSWORD_FOR_RH:1000:1000::/home/myles::userdb_mail=maildir:/home/myles/Maildir/rh
 ed:{plain}PASSWORD_FOR_ED:1000:1000::/home/myles::userdb_mail=maildir:/home/myles/Maildir/ed

Are there perhaps online instructions to which you could direct me?
FWIW I also use Arch as my OS.

 I remember this was quite useful if a bit outdated, it is a bit skimpy on 
 Dovecot though:

 http://roland.entierement.nu/blog/2010/09/08/gnus-dovecot-offlineimap-search-a-howto.html

 The command 'dovecot -a' is useful to dump your config to stout then you
 can easily tell what you have changed in between attempts.


Wonderful, thanks for the instructions, with any luck I'll be reading
and writing email from the train by this time next week.


 I imagine that because you are already /au fait/ with gnus you have
 half the battle won.  If need be I can dump my whole config but then
 where is the fun in that?


No need, if I don't figure out at least some of the config myself I'll
not be able to maintain it later.

Thanks!


 Good luck.

 Myles

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



Re: [O] var `date' lacks a prefix warnings

2012-04-27 Thread Martyn Jago
Hi Achim

Achim Gratz strom...@nexgo.de writes:

 Martyn Jago writes:
 Regarding the remaining Org-mode `lacks a prefix' warnings and
 particularly in light of the recent message on emacs.devel [1] would it
 not be sufficient to simply alias date and entry locally:

 (defvaralias 'org--date 'date)
 (defvaralias 'org--entry 'entry)

 That doesn't work, AFAIK: defvaralias binds the symbol (it looks up
 what is behind the symbol and creates another symbol for it), but
 dynamic scoping does not (you look up what's behind the symbol each time
 you use it).  The problem is that when a symbol gets dynamically scoped
 it cannot be used as a lexical symbol after that, so any code that uses
 date and entry after the defvar doesn't get a lexcial binding.  You
 would need a language construct that would let you capture a symbol
 dynamically, internalize it (in essence it would be renaming that symbol
 in some scope) and then erase all traces of that symbol having been
 symbolically scoped so that it can be used lexically again.  I don't
 think anything like that currently exists.

I appreciate `defvaralias' doesn't work nicely with lexical variables,
but I am assuming somewhat that we are talking about dynamic variables
here?

If the global date / entry are dynamic then the dynamic `defvaralias'
alias will also be dynamic, and any prior use of the dynamic variable
will surely be a dynamic binding? I'm going to do some further testing
anyway, since I'm interested, but so far things appear to work.

 p.s. I should point out that my personal view is that a serious well
 maintained Emacs library such as Org-mode should have a zero warning
 policy for official releases.

 Here's a problem that originates outside of our control.  At the very
 least, we can't fix it just in org.

I agree we can't fix the source of the problem but IF we can fix the
warning by removing `lack of prefixes' in Org-mode, then we have
demonstrated that we acknowledge the warning and have dealt with it.

In other words, if we can fix the problem within Org-mode we are not
propagating the problem. If we don't, then perhaps we didn't fix the
warning because we don't fix warnings.

However, it may indeed be impossible to fix as you pointed out!

Best, Martyn





Re: [O] var `date' lacks a prefix warnings

2012-04-27 Thread Martyn Jago
Hi Bastien

Bastien b...@gnu.org writes:

 Hi Martyn,

 Martyn Jago martyn.j...@btinternet.com writes:


[...]

 We first need to fix Calendar so that it doesn't use ̀date' and `entry'
 as the name for dynamically variables that are passed around.

 Then preparing a patch for Org would be great.

 I'll ping Glenn on the emacs-devel mailing list about this.

I took in Glen's and Edward's replies - wow what a history lesson!

 - quote Edward Reingold: who'd have guessed how much it would grow
over almost 30 years, or that my code would still be around [1]

So it doesn't look like the problem will be fixed at source any time
quickly.  

I'm going to persevere until I've talked myself out of it since I'm
learning a lot!

Best, Martyn



bookmark: 

http://article.gmane.org/gmane.emacs.devel/150087






Re: [O] [bug] new exporter fails on read only files

2012-04-27 Thread Nicolas Goaziou
Hello,

Eric Fraga e.fr...@ucl.ac.uk writes:

 Actually, I have updated (one minute ago) and the problem has now
 changed!  I now get this error:

 ,
 | and: Wrong type argument: stringp, (latex-fragment (:value 
 \\ref{sec:evaporative} :begin 11957 :end 11978 :post-blank 0))
 `

This is a bit short to start investigations. Something is happening at
position 11957 in your buffer. You may want to narrow it to the
paragraph/table/construct around and try to export it again. It could
make a minimal example.

You may also try (org-element-parse-buffer) to see if the error comes
from the parser or the export engine. You could even try to export to
something else, like ASCII, to check if the error comes from the engine
itself or from the latex back-end.

 and I have no idea what is happening here.  For this error, I do get a
 debug trace but it is rather long and my org file has material I cannot
 post.

The last ten lines are usually good enough.

 I will try emacs -Q later and will also see if I can come up with a
 minimal example that fails in the same way as my longer confidential
 document.

Since I have no clue for now, I cannot help much. I will look at any
data you can provide, though.


Regards,

-- 
Nicolas Goaziou



Re: [O] [BUG] org-fill-paragraph seems broken

2012-04-27 Thread Bastien
Nick Dokos nicholas.do...@hp.com writes:

 -(defun mail-mode-fill-paragraph (arg)
 +(defun mail-mode-fill-paragraph (optional arg)
;; Do something special only if within the headers.
(if ( (point) (mail-header-end))
(let (beg end fieldname)
 

 That fixes it - but is it really a problem with sendmail.el
 and not with org?

Both -- I fixed the problem in Org, things should be okay now.
But still, I think the arg in `mail-mode-fill-paragraph' should
be optional.

Thanks for reporting this,

-- 
 Bastien



Re: [O] *Natural* language highlighting

2012-04-27 Thread Bastien
Alex Lane alex...@imap.cc writes:

 On a (somewhat) related note, might someone point me at the face
 description(s) used for orgmode definition lists (e.g., foo :: bar)? I
 would specifically like to make the 'foo' part of such a definition a
 bit more assertive.

From latest git, there is now `org-list-dt' for the definition terms 
in those lists.  Thanks for the suggestion and thanks to Nick for the
guidance!

-- 
 Bastien



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

2012-04-27 Thread Bastien
fkunze fku...@gmail.com writes:

 At the risk of redundancy (as I posted this paragraph earlier) the people 
 at the python sphinx documentation project have a similar problem (of 
 producing 
 a make for windows) and it might be possible to rapidly develop a make.bat 
 file for org-mode installations by making modifications of their make.bat 
 source file:
  
 https://trac.jmodelica.org/assimulo/browser/trunk/doc/sphinx/make.bat

 I am too far removed from the intricacies of mapping the unix make options to
 something that will work on windows - to produce something of real value in a
 reasonable time period.  But I do have a friend who might be able to rapidly
 develop an appropriate mapping.  Let me see if I can interest him in
 satisfying your request.

It would be highly appreciated -- thanks in advance!

-- 
 Bastien



Re: [O] [PATCH] Support hour in repeated task cookie

2012-04-27 Thread Bastien
Hi Takafumi,

Takafumi Arakaki aka@gmail.com writes:

 Anyway, I tried the head of master
 (580add2f4148fea949a4db5550577911ee6d756e) and it works fine for me.
 But I couldn't reproduce this behavior:

 Note that timestamps need to be well formatted.  If there is
 a +3d repeat cookie and the original timestamp doesn have any
 indication for the hour, it will produce an error.

 (BTW, you mean +3h, right?)  There is no change in the SCHEDULE time
 stamp, but I've got state change log and LAST_REPEAT in PROPERTIES.
 Note that I have `(setq org-log-into-drawer t)' in my configuration.
 Resulting tree was something like this (I changed the state to DONE
 three times):

 * TODO Test
   SCHEDULED: 2012-04-26 Thu +3h
   :LOGBOOK:
   - State DONE   from TODO[2012-04-26 Thu 16:16]
   - State DONE   from TODO[2012-04-26 Thu 16:16]
   - State DONE   from TODO[2012-04-26 Thu 16:16]
   :END:
   :PROPERTIES:
   :LAST_REPEAT: [2012-04-26 Thu 16:16]
   :END:

Yes -- please ping the list about this issue if you find it nagging
when using the feature an a regular basis.

 Regarding not using constant for dwmy.

 I didn't replace dwmy by a constant though, this is not expected
 to change anymore.

 I think somebody may want to have minute cookie.  

Well, let's wait for somebody to dare asking this!  Seriously, I would
put a constant if this game had no end, but luckily enough, I don't
think we can go beyond minutes... 

Thanks for the feedback!

-- 
 Bastien



Re: [O] Bad interaction between flyspell and org-mode with latest Emacs

2012-04-27 Thread Bastien
Hello Vladimir,

I can't reproduce the problem you describe, but maybe I misunderstood
some of the steps... if you can, please describe a reproducible recipe.
Also mention Org's version explicitely.

I'm not using flyspell regularily, only for testing, so perhaps 
others will have more helpful answers!

Thanks,

-- 
 Bastien



Re: [O] Org referring to Gnus mail

2012-04-27 Thread Wes Hardaker
François Pinard pin...@iro.umontreal.ca writes:

 Now, I just have to be careful enough to remember to use Q instead of
 q!  When flying around between Emacs buffers and duties, one may get
 distracted and forget.  Besides, fast key typing too often comes from
 the spinal chord rather than the brain! ☺

The other option is to teach gnus that read doesn't mean hide from me.

I have some groups that display read-mail for me, and require I expire
the articles before they're deleted.  EG, my inbox.  Other groups read
means don't show me again.  Like my orgmode group, for example, has
auto-expire set to be true.
-- 
Wes Hardaker 
My Pictures:  http://capturedonearth.com/
My Thoughts:  http://pontifications.hardakers.net/



Re: [O] local.mk and SUDO

2012-04-27 Thread Achim Gratz
Martyn Jago writes:
 diff --git a/lisp/org-mobile.el b/lisp/org-mobile.el
 old mode 100644
 new mode 100755

 That's a well-known problem with anything that expects POSIX file
 semantics on Windows... and Git does rely very heavily on it.


 I'm not on Windows, I'm on Mac OS X which usually handles Git nicely - I
 use it all the time. 

Then you yourself must most likely have changed the mode of those files
to executable.  There is nothing in the build system that even
attempts to change modes.


Regards,
Achim.
-- 
+[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+

SD adaptation for Waldorf Blofeld V1.15B11:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada




[O] Per file customisation of sectioning structure in latex export

2012-04-27 Thread Vikas Rawal
I would like to specify the correspondence between heading levels and
sectioning structure for latex export in a specific file. Could
somebody point me to the right method. I have checked
http://orgmode.org/worg/org-tutorials/org-latex-export.html on
worg. Isn't there a way by which I could specify this in the header.

I am using latex class article. Isn't it possible to the sectioning
structure through #+LATEX_CLASS_OPTIONS?

Vikas





Re: [O] Bad interaction between flyspell and org-mode with latest Emacs

2012-04-27 Thread Vladimir Lomov
Hello Bastien,
** Bastien [2012-04-27 23:49:06 +0200]:

 Hello Vladimir,

 I can't reproduce the problem you describe, but maybe I misunderstood
 some of the steps... if you can, please describe a reproducible recipe.
 Also mention Org's version explicitely.

 I'm not using flyspell regularily, only for testing, so perhaps 
 others will have more helpful answers!

It took me awhile to prepare minimal example.

Emacs: bzr revno 108056
org-mode: 7.8.09-413-g21e24f @ /usr/share/emacs/site-lisp/org/org-install.el

The same example file (~example.org~) and the same procecure to get
strange behavior (I don't know how to explain it more precisely than
that: run =C-c '= in src block, enter new line and immediately run =C-c
'= again), but now there is not message in echo area about 'flyspell'.

I prepared ~debug.el~ to run Emacs:
$ emacs -Q -l ~/tmp/debug.el

#+name: debug.el
#+begin_src elisp
(setq load-path (cons /usr/share/emacs/site-lisp/org load-path))

(custom-set-variables
  '(show-paren-mode t)
)

(require 'org-install)
#+end_src

Again, it is rather hard to catch this, once I run the sequence of
commands and seems it is ok, but next time it hangs (I run emacs in
cgroup controlled environment with switched off swap so emacs is killed
when memory is exhausted)

Revno 108011 is ok with this example.

P.S. There is similar bug report already (bug#11351), I posted my
original message there, but now I not sure if it is the same problem.

---
WBR, Vladimir Lomov

-- 
Usage: fortune -P [-f] -a [xsz] Q: file [rKe9] -v6[+] file1 ...



Re: [O] footnotes and mouse

2012-04-27 Thread Samuel Wales
On 2012-04-22, Nicolas Goaziou n.goaz...@gmail.com wrote:
 I've pushed a patch on both maint and master. Could you tell me if it
 solves the problem?

That fixes it.  Thank you.

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com



Re: [O] org-link-to-org-use-id question

2012-04-27 Thread Bernt Hansen
François Pinard pin...@iro.umontreal.ca writes:

 Hi, Org friends.

 I'm just noticing that ID: properties are now being created whenever I save
 a link.  I presume this is a recent change.

 The ID does not encode the file, so I'm tempted to presume that Org
 ought to read the target Org files for discovering where are the IDs.
 As Org is surely not going to read all my Org files at start (it might
 not even have a clue to where I saved them), I wonder how this mechanism
 works.  Would someone be kind enough to enlighten me?

 François

This normally happens when you have org-id in org-modules.  Unique id's
are generated when you link to a task (using org-id-get-create).

Id's are saved in ~/.emacs.d/org-id-locations-saved on my system.

Regards,
Bernt