Re: [O] Problem with autoloads

2011-06-27 Thread Michael Markert
On 28 Jun 2011, Nick Dokos wrote:
> 
>
> Suvayu and I worked on this in an email exchange: it turns out that
> Michael was right in that (recent) emacs 24 is indeed the culprit. In
> particular, the variable generated-autoload-file is now initialized to
> nil:
>
> ,
> | (defvar generated-autoload-file nil
> |   "File into which to write autoload definitions.
> | A Lisp file can set this in its local variables section to make
> | its autoloads go somewhere else.
> |
> | If this is a relative file name, the directory is determined as
> | follows:
> |  - If a Lisp file defined `generated-autoload-file' as a
> |file-local variable, use its containing directory.
> |  - Otherwise use the \"lisp\" subdirectory of `source-directory'.
> |
> | The autoload file is assumed to contain a trailer starting with a
> | FormFeed character.")
> `
>
> whereas before (e.g. in the version of emacs 24 that I'm running: GNU
> Emacs 24.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.22.0) of
> 2011-04-13) it was initialized to "loaddefs.el":
>
>
> , | (defvar generated-autoload-file "loaddefs.el" | "*File
> \\[update-file-autoloads] puts autoloads into.  | A `.el' file can set
> this in its local variables section to make its | autoloads go
> somewhere else.  The autoload file is assumed to contain a | trailer
> starting with a FormFeed character.")  `
>
> The particular value is not that important: the fact that it was
> a relative file name is, as indicated by the comment above.
>
> I think the following patch fixes it and does not break any earlier
> versions of org. Suvayu, Michael (and anybody else who cares to try
> it): would you mind checking and reporting back?

Hi Nick,

thanks for looking into it.

But the patch doesn't work. I think that stems from the fact, that the
first thing `generate-file-autoloads' does is to bind it new:

,
| (defun generate-file-autoloads (file)
|   "Insert at point a loaddefs autoload section for FILE.
| Autoloads are generated for defuns and defmacros in FILE
| marked by `generate-autoload-cookie' (which see).
| If FILE is being visited in a buffer, the contents of the buffer
| are used.
| Return non-nil in the case where no autoloads were added at point."
|   (interactive "fGenerate autoloads for file: ")
|   (let ((generated-autoload-file buffer-file-name))
| (autoload-generate-file-autoloads file (current-buffer
`

And because we feed it a relative file name it's bound to a relative
file name.

Michael


pgp8SChQWFTRG.pgp
Description: PGP signature


Re: [O] [PATCH] org-crypt: only warn about auto-save-mode when running org-decrypt

2011-06-27 Thread Pieter Praet
On Mon, 27 Jun 2011 18:31:58 +0200, Bastien  wrote:
> Hi Pieter,
> 
> Thanks for the patch at the end of this thread.
> 
> Pieter Praet  writes:
> 
> > Ideally, we'd have a defcustom `org-crypt-auto-save' with the following 
> > options:
> > - 'ask : Ask the user whether or not to decrypt the entry.
> > - 'disable : Disable auto-save-mode for the current buffer before 
> > decrypting.
> > - 'ignore  : Decrypt the entry regardless.
> > - 'encrypt : Re-encrypt the entries before auto-save kicks in.
> >
> > I've implemented this, but it fails miserably:
> >
> > Since the function `auto-save-mode' doesn't set an buffer-local
> > var to indicate whether or not it's enabled for the current buffer, we
> > can only check for `auto-save-default'. 
> 
> I think we should first ask emacs-devel to fix this, then implement your
> clean solution.  Would you like to report this problem?

No need. It appears I'm a veritable moron, with apologies to the Emacs folks.

2 lessons I've learned today:
- DON'T test this stuff in a *scratch* buffer (seriously...)
- DO consume sufficient quantities of coffee (IOW, org-encrypt-entries
  doesn't encrypt entries unless they're *tagged* to be)

> I'm not confident in disabling auto-save-mode globally by default, this
> would surprise users -- even with a **BiG WaRnInG** message.

No worries, it's buffer-local.

And I've now changed the default to "ask first, shoot in the foot later".

> What do you think?

"I should send my patch" comes to mind :)

Traffic allowing (lots of sweaty tourists on the road),
it should be there in T-10sec.

> -- 
>  Bastien


Peace

-- 
Pieter



Re: [O] FSF France supporting Org-mode since March and Flattr

2011-06-27 Thread Noorul Islam
On Fri, Jun 24, 2011 at 4:11 PM, Bastien  wrote:
> I'm glad to announce that The Free Software Foundation France* is
> supporting Org's development by a large donation of 100€ each month.
>
> Thanks a lot to the FSF France for this!  (http://fsffrance.org)
>
> I will happily share this amount with the rest of the Org community by
> sponsoring OrgCamps or other events around the world -- just ask.
>
> From this donation, 15$ will go each month to help John Wiegley pay the
> server expenses for the Patchwork bug tracker.  Thanks to John for the
> maintainance of this service.  We will use it as long as we need it --
> so please send patches !
>
> Org is also using Flattr -- not only to _be flattr'd_ but also to let
> other projects know that we like them.  So, if people want to flattr
> some projects, just suggest them on the mailing list (with a [FLTR]
> label in the subject of the email) and I'll flattr the project for you.
> The monthly amount dedicated to flattr is 10€ so far, but I could raise
> it if people find it useful.
>
> Worg pages are open to personal flattr buttons: if you take special care
> of a particular page or directory and want to be flattr'd (either by the
> Anonymous Surfer or by the Org community itself), please ask me to add
> such a flattr button - I'll let Matt Lundin, as the Great Worg Gardner,
> decide whether it's relevant or not in each case.
>
> Thanks to all, happy Org'ing!
>

Great news! Long live Org!

Thanks and Regards
Noorul



Re: [O] [PATCH] Minor doc fix.

2011-06-27 Thread Noorul Islam
On Mon, Jun 27, 2011 at 10:43 AM, Achim Gratz  wrote:
> Noorul Islam K M  writes:
> [...]
>
> My patch for CLOCK_INTO_DRAWER already includes a fix for that, albeit a
> different one — using @pxref instead of @xref, as seems to have been
> intended all along.
>

Ok, cool!

- Noorul



Re: [O] Problem with autoloads

2011-06-27 Thread Nick Dokos
Suvayu Ali  wrote:

> Hi Nick,
> 
> On Mon, 27 Jun 2011 20:13:25 -0400
> Nick Dokos  wrote:
> 
> > The generated org-install.el looks like this:
> > 
> 
> [...]
> 
> > | 
> > | (autoload 'org-mode "org" "\
> > | Outline-based notes management and organizer, alias
> > | \"Carsten's outline-mode for keeping track of everything.\"
> > | ...
> > `
> > 
> 
> I also run emacs24 and my autoloads look like this. Obviously the
> leading lisp/ is the problem.
> 
> (autoload 'org-mode "lisp/org" ...)
> 
> This is my setup:
> 
> emacs 24 is installed in /opt/emacs-lisp I changed the Makefile to point
> EMACS to /opt/emacs-lisp/bin/emacs and ran make. It still generates the
> same autoloads (with the leading lisp/).
> 
> I setup org by evaluating the following lines in an emacs session
> started as emacs -Q:
> 
> (add-to-list 'load-path (expand-file-name "~/build/org-mode/lisp"))
> (add-to-list 'load-path (expand-file-name "~/build/org-mode/contrib/lisp"))
> 
> ;; activate org
> (require 'org-install)
> 
> I get the same error again, its trying to load lisp/org instead of org.
> I tried this with a fresh clone of the org-mode repository. I can't see
> where I could have gone wrong here.
> 

Suvayu and I worked on this in an email exchange: it turns out that
Michael was right in that (recent) emacs 24 is indeed the culprit. In
particular, the variable generated-autoload-file is now initialized to
nil:

,
| (defvar generated-autoload-file nil
|   "File into which to write autoload definitions.
| A Lisp file can set this in its local variables section to make
| its autoloads go somewhere else.
| 
| If this is a relative file name, the directory is determined as
| follows:
|  - If a Lisp file defined `generated-autoload-file' as a
|file-local variable, use its containing directory.
|  - Otherwise use the \"lisp\" subdirectory of `source-directory'.
| 
| The autoload file is assumed to contain a trailer starting with a
| FormFeed character.")
`

whereas before (e.g. in the version of emacs 24 that I'm running: GNU
Emacs 24.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.22.0) of
2011-04-13) it was initialized to "loaddefs.el":


,
| (defvar generated-autoload-file "loaddefs.el"
|"*File \\[update-file-autoloads] puts autoloads into.
| A `.el' file can set this in its local variables section to make its
| autoloads go somewhere else.  The autoload file is assumed to contain a
| trailer starting with a FormFeed character.")
`

The particular value is not that important: the fact that it was
a relative file name is, as indicated by the comment above.

I think the following patch fixes it and does not break any earlier
versions of org. Suvayu, Michael (and anybody else who cares to try it):
would you mind checking and reporting back?

Thanks,
Nick

diff --git a/Makefile b/Makefile
index 239ab2e..08e3a08 100644
--- a/Makefile
+++ b/Makefile
@@ -230,6 +230,7 @@ autoloads: lisp/org-install.el
 
 lisp/org-install.el: $(LISPFILES0) Makefile
$(BATCH) --eval "(require 'autoload)" \
+   --eval '(setq generated-autoload-file "org-install.el")' \
--eval '(find-file "org-install.el")'  \
--eval '(erase-buffer)' \
--eval '(mapc (lambda (x) (generate-file-autoloads (symbol-name 
x))) (quote ($(LISPFILES0' \



Re: [O] Email -> Org-mode: charset problem

2011-06-27 Thread Richard Lawrence

> At Mon, 27 Jun 2011 10:30:06 +0200,
> Karl Voit wrote:
>> Is there somebody who managed to develop an email to Org-mode bridge
>> without having charset problems? (No, I do not use Emacs as a
>> MUA[4])

David Maus  writes:
> I do use an Emacs base mua (Wanderlust) and recently started to file
> reference notes for certain messages. Because in cases I want to keept
> the message (e.g. an interesting usenet post) I save the raw message
> to a temporary file and add it as an attachment. This works nice,
> although I'd really like to have an automated way of save+attache when
> capturing.
>
> So, what about org-capture? You could use a script that serializes the
> raw message to disk and -- somehow -- calls capture with a reference
> to this file. Emacs opens the mail file and extracts information
> required for the template using the build-in MIME libaries (mml-*
> IIRC) which are capable of correctly parsing and if necessary decoding
> (e.g. quoted printable encoded letters in the subject). After
> extracting the information Emacs creates the appropriate capture
> entry, somehow adds the message file as attachment and finishes the
> capture process.

I do something like this, though I also use Emacs as an MUA (Gnus).  

My approach was to write a little parser that binds the various parts of
a message in a pre-determined format to variables that I grab in an Org
capture template, and dynamically scope those variables into a call to
org-capture.  I have included my code below.

But to address your original question:  unfortunately, I do not have a
solution to the encoding problem.  Despite my "pre-determined format",
the emails I got (student paper submissions) were often in strange
encodings that I ended up fixing by hand during the capture process.

However, as David points out, I believe that it would be possible to use
Emacs' MIME libraries to do the dirty work.  I just haven't had time (or
desire, honestly) to figure out how.  If you figure it out, though, I'd
love to hear about it!

My (quite simplistic) code is below.  I hope you find it useful if you
decide to go this route!

Best,
Richard


 simple working example: Gnus side
; handling paper submissions
(defun capture-paper-part ()
  "Call parse-paper and capture the result using org-capture"
  (interactive)
  (let ((paper (parse-paper *phil100-paper-header-re*)))
(if paper
  (org-capture nil "ap") ; "ap" is Org-capture key combo for template 
shown below
  (message "No paper found in this part"

(if (not (boundp 'gnus-mime-action-alist))
(setq gnus-mime-action-alist '())) 
(add-to-list 'gnus-mime-action-alist '("capture paper" . capture-paper-part))

(defconst *phil100-paper-header-re*
  "^\\(?1:.*\\)\n\\(?2:.*\\)\n\\(?3:[Pp]aper *\\(?31:[0-9]+\\).*\\)")

(defun parse-paper (header-re)
  "Return an alist representing a paper, by parsing the buffer using header-re"
  (save-excursion
(goto-char (point-min))
(if (re-search-forward header-re nil t)
(list `(header . ,(or (match-string 0) ""))
  `(author . ,(or (match-string 2) ""))
  `(title . ,(or (match-string 1) ""))
  `(date . ,(or (match-string 3) ""))
  `(num . ,(or (match-string 31) ""))
  `(body . ,(buffer-substring (match-end 0) (point-max
  nil)))

(defun paper-property (key)
  ; paper is dynamically scoped in by capture-paper-part
  (or (cdr (assoc key paper)) ""))
  
(defun string-replace-downcase (from to in)
  "Replace FROM with TO in string IN, and also downcase the result"
  (with-temp-buffer
(insert in)
(goto-char (point-min))
(while (search-forward from nil t)
  (replace-match to nil t))
(downcase-region (point-min) (point-max))
(buffer-substring (point-min) (point-max

 simple working example: Org capture template
** %(paper-property 'author)
   :PROPERTIES:
   :EXPORT_TITLE: %(paper-property 'title)
   :EXPORT_AUTHOR: %(paper-property 'author)
   :EXPORT_DATE: Paper %(paper-property 'num)
   :EXPORT_FILE_NAME: %(concat (paper-property 'num) "-" 
(string-replace-downcase " " "-" (paper-property 'author)) ".tex")
   :END:

%(paper-property 'body)




Re: [O] worg page problem?

2011-06-27 Thread Nick Dokos
Rustom Mody  wrote:

> Some special symbols in
> http://orgmode.org/worg/org-tutorials/org-publish-html-tutorial.html#sec-9
> eg 'and' 'or' are not translated properly.
> 
> Dunno if its my firefox problem or a bug...
> 

Neither I think: the top of the section you refer to says

,
| "Note though, that not all symbols are translated to HTML. They are
| listed anyway, since they may be used for LaTeX export nonetheless."
`

But it's not clear to me why \and and \or appear in the list: as far
as LaTeX is concerned, they are not symbols (afaik): they are boolean
operators in the ifthen package. Similarly for \divide which is an
arithmetic operator in the calc package.

OTOH, there are several symbols which seem to be misspelled:

\Agrav  \Agrav-> should be \Agrave
\Aacut  \Aacut-> should be \Aacute
   \Acirc
\Atild  \Atild-> should be \Atilde

Nick



[O] worg page problem?

2011-06-27 Thread Rustom Mody
Some special symbols in
http://orgmode.org/worg/org-tutorials/org-publish-html-tutorial.html#sec-9
eg 'and' 'or' are not translated properly.

Dunno if its my firefox problem or a bug...



Re: [O] tangle paths

2011-06-27 Thread Herbert Sitz
skip  gmail.com> writes:
> 
> Is there a way I can produce output of tangle blocks to specific file paths?
> 

I haven't tested, but one way might be to use the org-babel-post-tangle-hook to
write a function to move files wherever you want:

http://orgmode.org/manual/Extracting-source-code.html#index-tangling-1720 

-- Herb







Re: [O] Problem with autoloads

2011-06-27 Thread Suvayu Ali
Hi Nick,

On Mon, 27 Jun 2011 20:13:25 -0400
Nick Dokos  wrote:

> The generated org-install.el looks like this:
> 

[...]

> | 
> | (autoload 'org-mode "org" "\
> | Outline-based notes management and organizer, alias
> | \"Carsten's outline-mode for keeping track of everything.\"
> | ...
> `
> 

I also run emacs24 and my autoloads look like this. Obviously the
leading lisp/ is the problem.

(autoload 'org-mode "lisp/org" ...)

This is my setup:

emacs 24 is installed in /opt/emacs-lisp I changed the Makefile to point
EMACS to /opt/emacs-lisp/bin/emacs and ran make. It still generates the
same autoloads (with the leading lisp/).

I setup org by evaluating the following lines in an emacs session
started as emacs -Q:

(add-to-list 'load-path (expand-file-name "~/build/org-mode/lisp"))
(add-to-list 'load-path (expand-file-name "~/build/org-mode/contrib/lisp"))

;; activate org
(require 'org-install)

I get the same error again, its trying to load lisp/org instead of org.
I tried this with a fresh clone of the org-mode repository. I can't see
where I could have gone wrong here.

> Nick

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Problem with autoloads

2011-06-27 Thread Nick Dokos
Michael Markert  wrote:

> On 27 Jun 2011, Suvayu Ali wrote:
> > Hi Michael,
> >
> > On Mon, 27 Jun 2011 18:51:01 +0200
> > Michael Markert  wrote:
> >
> >> A fix/workaround is to adjust the loadpath to:
> >>
> >> (add-to-list 'load-path (expand-file-name "~/build/org-mode"))
> >>
> >> After quick browsing through the logs I found nothing that could have
> >> caused this, but my guess is that someone adjusted the autoloads from
> >> "file.el" to "lisp/file.el".
> >
> > That seems to work for now. But I think this should still be
> > addressed.  At least if this is how org behaves now, the instructions
> > on Worg should reflect that.
> >
> > Thanks a lot. :)
> 
> I think I tracked it down: The problem is emacs24, that is the
> autoload.el that it bundles.
> 
> With emacs23 it doesn't honor the path of the file it's passed, but with
> emacs24 it does, resulting in "lisp/file" autoloads.
> 
> I don't see an easy solution, that's not plain dirty.[1]
> 
> Michael
> 
> I consider adding the base directory along with the `lisp' and maybe
> `contrib/lisp' directories quite dirty ;)

I run emacs24 and I don't have this problem - and I made sure that I was
running emacs24 by modifying the makefile appropriately:

,
| $ make lisp/org-install.el
| /usr/local/bin/emacs -batch -q -no-site-file -eval "(setq load-path (cons 
(expand-file-name \"./lisp/\") (cons \"/usr/local/share/emacs/site-lisp\" 
load-path)))" -eval "(message (emacs-version))" --eval "(require 'autoload)" \
|   --eval '(find-file "org-install.el")'  \
|   --eval '(erase-buffer)' \
|   --eval '(mapc (lambda (x) (generate-file-autoloads (symbol-name 
x))) (quote (lisp/org.el lisp/org-agenda.el lisp/org-ascii.el 
lisp/org-attach.el lisp/org-archive.el lisp/org-bbdb.el lisp/org-beamer.el 
lisp/org-bibtex.el lisp/org-capture.el lisp/org-clock.el lisp/org-colview.el 
lisp/org-colview-xemacs.el lisp/org-compat.el lisp/org-pcomplete.el 
lisp/org-crypt.el lisp/org-ctags.el lisp/org-datetree.el lisp/org-docview.el 
lisp/org-entities.el lisp/org-exp.el lisp/org-exp-blocks.el lisp/org-docbook.el 
lisp/org-faces.el lisp/org-feed.el lisp/org-footnote.el lisp/org-freemind.el 
lisp/org-gnus.el lisp/org-habit.el lisp/org-html.el lisp/org-icalendar.el 
lisp/org-id.el lisp/org-indent.el lisp/org-info.el lisp/org-inlinetask.el 
lisp/org-jsinfo.el lisp/org-irc.el lisp/org-latex.el lisp/org-list.el 
lisp/org-mac-message.el lisp/org-macs.el lisp/org-mew.el lisp/org-mhe.el 
lisp/org-mks.el lisp/org-mobile.el lisp/org-mouse.el lisp/org-publish.el 
lisp/org-plot.el lisp/org-protocol.el lisp
 /org-remember.el lisp/org-rmail.el lisp/org-special-blocks.el lisp/org-src.el 
lisp/org-table.el lisp/org-taskjuggler.el lisp/org-timer.el lisp/org-vm.el 
lisp/org-w3m.el lisp/org-wl.el lisp/org-xoxo.el lisp/ob.el lisp/ob-table.el 
lisp/ob-lob.el lisp/ob-ref.el lisp/ob-exp.el lisp/ob-tangle.el 
lisp/ob-comint.el lisp/ob-eval.el lisp/ob-keys.el lisp/ob-awk.el lisp/ob-C.el 
lisp/ob-calc.el lisp/ob-ditaa.el lisp/ob-haskell.el lisp/ob-perl.el 
lisp/ob-sh.el lisp/ob-R.el lisp/ob-dot.el lisp/ob-mscgen.el lisp/ob-latex.el 
lisp/ob-lisp.el lisp/ob-ledger.el lisp/ob-python.el lisp/ob-sql.el 
lisp/ob-asymptote.el lisp/ob-emacs-lisp.el lisp/ob-matlab.el lisp/ob-ruby.el 
lisp/ob-sqlite.el lisp/ob-clojure.el lisp/ob-ocaml.el lisp/ob-sass.el 
lisp/ob-css.el lisp/ob-gnuplot.el lisp/ob-octave.el lisp/ob-screen.el 
lisp/ob-plantuml.el lisp/ob-org.el lisp/ob-js.el lisp/ob-scheme.el)))' \
|   --eval '(insert "\n(provide (quote org-install))\n")' \
|   --eval '(save-buffer)'
| GNU Emacs 24.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.22.0)
|  of 2011-04-13 on alphaville.dokosmarshall.org
| Loading vc-git...
| Generating autoloads for lisp/org.el...
| Generating autoloads for lisp/org.el...done
| Generating autoloads for lisp/org-agenda.el...
| ...
`

The generated org-install.el looks like this:

,
| 
| ;;;### (autoloads (org-customize org-reload org-require-autoloaded-modules
| ;;  org-submit-bug-report org-cycle-agenda-files org-switchb
| ;;  org-map-entries org-open-link-from-string org-open-at-point-global
| ;;  org-insert-link-global org-store-link org-run-like-in-org-mode
| ;;  turn-on-orgstruct++ turn-on-orgstruct orgstruct-mode org-global-cycle
| ;;  org-mode org-babel-do-load-languages) "org" "lisp/org.el"
| ;;  (19976 50297))
| ;;; Generated autoloads from lisp/org.el
| 
| (autoload 'org-babel-do-load-languages "org" "\
| Load the languages defined in `org-babel-load-languages'.
| 
| \(fn SYM VALUE)" nil nil)
| 
| (autoload 'org-mode "org" "\
| Outline-based notes management and organizer, alias
| \"Carsten's outline-mode for keeping track of everything.\"
| ...
`

Nick



Re: [O] [dev] footnotes improvements

2011-06-27 Thread Christian Moe

Hi,

Tested on the test document you supplied earlier. Everything checks out.

Yours,
Christian


On 6/27/11 8:29 PM, Nicolas Goaziou wrote:

Hello,

I've made some additional changes to the footnote branch, and fixed
a merge conflict due to a recent patch.

Since Org 7.6 is about to be released, I'd appreciate if someone using
footnotes could test it and report back the results here. If some
serious problem arises, its integration will be delayed until 7.7.

Thank you for any help,

Regards,






Re: [O] Problem with autoloads

2011-06-27 Thread Michael Markert
On 27 Jun 2011, Suvayu Ali wrote:
> Hi Michael,
>
> On Mon, 27 Jun 2011 18:51:01 +0200
> Michael Markert  wrote:
>
>> A fix/workaround is to adjust the loadpath to:
>>
>> (add-to-list 'load-path (expand-file-name "~/build/org-mode"))
>>
>> After quick browsing through the logs I found nothing that could have
>> caused this, but my guess is that someone adjusted the autoloads from
>> "file.el" to "lisp/file.el".
>
> That seems to work for now. But I think this should still be
> addressed.  At least if this is how org behaves now, the instructions
> on Worg should reflect that.
>
> Thanks a lot. :)

I think I tracked it down: The problem is emacs24, that is the
autoload.el that it bundles.

With emacs23 it doesn't honor the path of the file it's passed, but with
emacs24 it does, resulting in "lisp/file" autoloads.

I don't see an easy solution, that's not plain dirty.[1]

Michael

I consider adding the base directory along with the `lisp' and maybe
`contrib/lisp' directories quite dirty ;)


pgpdp7MaY1rno.pgp
Description: PGP signature


Re: [O] Email -> Org-mode: charset problem

2011-06-27 Thread David Maus
At Mon, 27 Jun 2011 10:30:06 +0200,
Karl Voit wrote:
> 
> Hi!
> 
> Is there somebody who managed to develop an email to Org-mode bridge
> without having charset problems? (No, I do not use Emacs as a
> MUA[4])
> 
> Disclaimer: This is not directly related to Org-mode but I guess
> there are people here with the very same problem.
> 
> I am using a procmail[1] with an entry to forward emails containing
> a keyword in the subject into my inbox.org (where also MobileOrg[2]
> entries are written to).
> 
> This is quite handy since some tasks arrive at emails and I want to
> capture this everywhere (smartphone, webmail, ...) using a simply
> email forward.
> 
> Unfortunately I get weird stuff like uuencoded things, UTF-8 in
> ASCII, ... which messes up my inbox.org and I am not able to read it
> afterwards.[5]
> 
> I guess this is because procmail and formail[3] – the tools I am
> using to extract mail infos to append to the org-file – are
> 7-bit-only or similar.
>
> If this is the case, I guess I'll have to find a different approach
> for this purpose.
> 
> Any ideas?


As far as I know a lot, if not most, email messages are transfered in
7bit for backward compatibility reasons and getting things other than
text/plain; charset=us-ascii across the net via email requires a lot
of things to consider (RFC2045-49 in all their glory). And if you
receive message from others, their mua might get things wrong and you
end up with things like utf-8 in ascii.

So dumping the raw message won't help, you need functions for
processing the raw message informaton.

Here's an idea (or two).

I do use an Emacs base mua (Wanderlust) and recently started to file
reference notes for certain messages. Because in cases I want to keept
the message (e.g. an interesting usenet post) I save the raw message
to a temporary file and add it as an attachment. This works nice,
although I'd really like to have an automated way of save+attache when
capturing.

So, what about org-capture? You could use a script that serializes the
raw message to disk and -- somehow -- calls capture with a reference
to this file. Emacs opens the mail file and extracts information
required for the template using the build-in MIME libaries (mml-*
IIRC) which are capable of correctly parsing and if necessary decoding
(e.g. quoted printable encoded letters in the subject). After
extracting the information Emacs creates the appropriate capture
entry, somehow adds the message file as attachment and finishes the
capture process.

-or-

Don't dump the message in the org buffer "as is", but wrap it in a
#+begin_src  where MIME-MODE is the build in mode for
decoding MIME messages. You could then view the original message with
C-c ' -- only task left is dealing with the subject line for the entry
headline.

Best,
  -- David
-- 
OpenPGP... 0x99ADB83B5A4478E6
Jabber dmj...@jabber.org
Email. dm...@ictsoc.de


pgp5PBOeMPntH.pgp
Description: PGP signature


Re: [O] [dev] Reduce warnings on org-contacs compilation

2011-06-27 Thread Julien Danjou
On Mon, Jun 27 2011, Michael Markert wrote:

> I noticed two easily fixable compile warnings. The first one tackles the
> wl code and the second includes cl on compilation.

Thanks, merged!

-- 
Julien Danjou
❱ http://julien.danjou.info


pgploAdywfnK8.pgp
Description: PGP signature


Re: [O] [babel] Maxima code blocks do not work

2011-06-27 Thread Bernd Weiss
Am 27.06.2011 10:32, schrieb Eric S Fraga:
> Bernd Weiss  writes:
> 
> [...]
> 
>> #+results:
>> : incorrect syntax: / is not a prefix operator
>> : incorrect syntax: aLH is not an infix operator
>> : incorrect syntax: hCp is not an infix operator
>> : incorrect syntax: Premature termination of input at $.
>> : Maxima encountered a Lisp error:
>> :  parser: end of file while scanning expression.
>> : Automatically continuing.
>> : To enable the Lisp debugger set *debugger-hook* to nil.
>>
>> This message is 'related' (see lines 3 "aLH is not an infix operator"
>> and 4 "hCp is not an infix operator") to the following Maxima call
>> ("aLH/maxima-17716hCp"):
>>
>> maxima --very-quiet -r
>> 'batchload("c:/Users/weiss/AppData/Local/Temp/babel-17716aLH/maxima-17716hCp")$'
>> nil
> 
> The error messages look like maxima is trying to evaluate the actual
> string within double quotes!
> 
>> Unfortunately, my elisp knowledge is too low to understand what's going
>> on in ob-maxima.el. Is it a MS-Windows-thing ('/' vs '\')?
> 
> Good question. Has anybody else used maxima with org babel on Windows?
> I don't even have such a system to try...  
> 
> My guess would be that the "shell" command required to invoke maxima on
> Windows needs to be significantly different than what we are using here
> (which works on Linux).  Then again, I've never really used Windows
> (beyond starting Word on somebody else's document on somebody else's
> machine... ;-) so I don't have a clue what Windows expects...

Hi Eric,

Again, thanks a lot for your help!

Okay, it definitely is a Windows problem. If I run the following command
in a cygwin shell, everything works as expected:

maxima --very-quiet -r
'batchload("c:/Users/weiss/AppData/Local/Temp/babel-17716aLH/maxima-17716hCp")$'
nil

However, it does not work in a Windows shell. But this is no longer an
org issue.

Bernd




Re: [O] Patch on org-read-property-name

2011-06-27 Thread Vincent Belaïche


> Applied, thanks a lot.
> 
> -- 
>  Bastien
> 
You're welcome,  Vincent. 

Re: [O] [dev] footnotes improvements

2011-06-27 Thread Nicolas Goaziou
Hello,

Thanks for trying this.

Christian Moe  writes:

> git pull

It should be git pull -f : I had to rebase.

Regards,

-- 
Nicolas Goaziou



Re: [O] org and microsoft exchange

2011-06-27 Thread Matthieu Lemerre
On Mon, 27 Jun 2011 18:14:19 +0100, Eric S Fraga  wrote:
> Matthieu Lemerre  writes:
> 
> > Hi,
> >
> > After some digging I found the following setup to share my calendar with
> > people using outlook.
> 
> [...]
> 
> Matthieu,
> 
> thanks for this.  I am unable to test it but will likely have to do so
> at the end of the summer (northern hemisphere) when we are supposedly
> going to be expected to start using various MS tools for collaboration
> (yech).  I'll come back to you then! ;-)

Eric,

No problem. But note that currently I am able to synchronize with people
using Outlook, but not really with Exchange, if that's what you would
like to do...
For the record, here are some other things that I tried/maybe worth
trying:

- Davmail + thunderbird: allows accessing exchange mail and calendar and
  syncinc with it, but did not manage to import org ics into that.

- Evolution and the openexchange client may be other things to try.

- With a bit of elisp (to implement RFC-2446 compliant export), I think
  full outlook/exchange compliance could be really doable.

Matthieu






Re: [O] [dev] footnotes improvements

2011-06-27 Thread Christian Moe

Hi,

I get merge conflicts (see below), and this is not a good time to work 
on improving my git skills (deadlines looming). If there's something 
simple you can tell me to do, I'll try it. Otherwise I'll have to pass 
on the testing, sorry.


Yours,
Christian


git checkout footnote-fix
git pull
remote: Counting objects: 78, done.
remote: Compressing objects: 100% (21/21), done.
remote: Total 69 (delta 56), reused 61 (delta 48)
Unpacking objects: 100% (69/69), done.
From git://github.com/ngz/org-mode-lists
 + fab506e...0431c5f footnote-fix -> ngz/footnote-fix  (forced update)
   d6aba4d..2422172  master -> ngz/master
Auto-merging lisp/org-docbook.el
CONFLICT (content): Merge conflict in lisp/org-docbook.el
Auto-merging lisp/org-exp.el
CONFLICT (content): Merge conflict in lisp/org-exp.el
Auto-merging lisp/org-footnote.el
CONFLICT (content): Merge conflict in lisp/org-footnote.el
Auto-merging lisp/org-html.el
CONFLICT (content): Merge conflict in lisp/org-html.el
Auto-merging lisp/org-latex.el
CONFLICT (content): Merge conflict in lisp/org-latex.el
Auto-merging lisp/org.el
CONFLICT (content): Merge conflict in lisp/org.el
Automatic merge failed; fix conflicts and then commit the result.


On 6/27/11 8:29 PM, Nicolas Goaziou wrote:
> Hello,
>
> I've made some additional changes to the footnote branch, and fixed
> a merge conflict due to a recent patch.
>
> Since Org 7.6 is about to be released, I'd appreciate if someone using
> footnotes could test it and report back the results here. If some
> serious problem arises, its integration will be delayed until 7.7.
>
> Thank you for any help,
>
> Regards,
>





[O] [dev] Reduce warnings on org-contacs compilation

2011-06-27 Thread Michael Markert

Hi,

I noticed two easily fixable compile warnings. The first one tackles the
wl code and the second includes cl on compilation.

Michael

>From 057b14ebe412a6085b5ba61559211d1d2402c16b Mon Sep 17 00:00:00 2001
Message-Id: 
<057b14ebe412a6085b5ba61559211d1d2402c16b.1309198827.git.markert.mich...@googlemail.com>
From: Michael Markert 
Date: Mon, 27 Jun 2011 20:17:53 +0200
Subject: [PATCH 1/2] org-contacts: Use `with-current-buffer' instead of
 `save-excursion'+`with-current-buffer'.
To: emacs-orgmode@gnu.org

Signed-off-by: Michael Markert 
---
 contrib/lisp/org-contacts.el |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/contrib/lisp/org-contacts.el b/contrib/lisp/org-contacts.el
index 63ba005..9b08d67 100644
--- a/contrib/lisp/org-contacts.el
+++ b/contrib/lisp/org-contacts.el
@@ -418,8 +418,7 @@ This adds `org-contacts-gnus-check-mail-address' and
   "Retrieve the content of the `From' header of an email.
 Works from wl-summary-mode and mime-view-mode - that is while viewing email.
 Depends on Wanderlust been loaded."
-  (save-excursion
-(set-buffer (org-capture-get :original-buffer))
+  (with-current-buffer (org-capture-get :original-buffer)
 (cond
  ((eq major-mode 'wl-summary-mode) (when wl-summary-buffer-elmo-folder
  (elmo-message-field
--
1.7.5.4

>From 31c1d3a859b5aeb6bb12b68a86c30b8454c7b39c Mon Sep 17 00:00:00 2001
Message-Id: 
<31c1d3a859b5aeb6bb12b68a86c30b8454c7b39c.1309198827.git.markert.mich...@googlemail.com>
In-Reply-To: 
<057b14ebe412a6085b5ba61559211d1d2402c16b.1309198827.git.markert.mich...@googlemail.com>
References: 
<057b14ebe412a6085b5ba61559211d1d2402c16b.1309198827.git.markert.mich...@googlemail.com>
From: Michael Markert 
Date: Mon, 27 Jun 2011 20:19:23 +0200
Subject: [PATCH 2/2] org-contacts: Require cl on compilation.
To: emacs-orgmode@gnu.org

Signed-off-by: Michael Markert 
---
 contrib/lisp/org-contacts.el |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/contrib/lisp/org-contacts.el b/contrib/lisp/org-contacts.el
index 9b08d67..f846fe2 100644
--- a/contrib/lisp/org-contacts.el
+++ b/contrib/lisp/org-contacts.el
@@ -36,6 +36,9 @@
 ;;
 ;;; Code:

+(eval-when-compile
+  (require 'cl))
+
 (eval-and-compile
   (require 'org))

--
1.7.5.4


pgpkgVSdRGHgh.pgp
Description: PGP signature


Re: [O] tangle paths

2011-06-27 Thread Herbert Sitz
Eric Schulte  gmail.com> writes:
> skip  gmail.com> writes:
> 
> > Is there a way I can produce output of tangle blocks to specific file paths?
> >
> 
> The manual is useful: http://orgmode.org/manual/tangle.html
> 

Eric --

I was wondering similar thing, but manual wasn't clearing things up for me.  As
far as I know, 'basename' conventionally refers to a filename (root plus
extension) that does _not_ include a directory path to the file itself.  See,
e.g., http://en.wikipedia.org/wiki/Basename

Is the manual using 'basename' to refer to a full path designation, minus the
extension?  E.g.,

/path/to/file/filename

-- Herb 






Re: [O] [PATCH] Introduce CLOCK_INTO_DRAWER property like the existing LOG_INTO_DRAWER

2011-06-27 Thread Achim Gratz
Bastien  writes:
> Applied, thanks a lot.  Let take at least one day to let people test
> this patch -- feedback welcome.

Here's a template I've been using for testing.  Try it with different
settings for both global and file local variables.

--8<---cut here---start->8---
#+DRAWERS:LOGBOOK GLOBLOG GLOBCLOCK FILELOG FILECLOCK FANCYLOG FANCYCLOCK 
PROPERTIES
#+STARTUP:lognotestate
#+SEQ_TODO:   TODO(t) INPROGRESS(i) WAITING(w@) | DONE(d) CANCELED(c@)

* Example Project Log

Try state changes and clocking into the two different project trees.
Project 1 has properties overriding logging and clocking, both with
fallback and explicit configuration (subproject 1.1), inherited along
the hierarchy.

** Project 1
   :PROPERTIES:
   :LOG_INTO_DRAWER: FANCYLOG
   :END:

*** Subproject 1.1
   :PROPERTIES:
   :CLOCK_INTO_DRAWER: FANCYCLOCK
   :END:

 Subproject 1.1.1

 Inherits two properties.

** Project 2

   No inheritance, using either global scope or file local variables,
   depending on how you load the file.

* Global variables

  Try with different customizations for these variables (apply "for this
  session only"):

  - org-log-into-drawer: "GLOBALLOG"
  - org-clock-into-drawer: "GLOBALCLOCK"


### Local Variables:
### org-log-into-drawer: "FILELOG"
### org-clock-into-drawer: "FILECLOCK"
### End:
--8<---cut here---end--->8---


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

DIY Stuff:
http://Synth.Stromeko.net/DIY.html




Re: [O] [babel] using #+call for inline results

2011-06-27 Thread Christian Moe

Hi,

Yes, these all checked out (assuming you meant the second one /should/ 
be exported -- as quoted code -- but not evaluated).


This is a nice addition, and rather cleaner and more intuitive than 
the workarounds I've been playing with. (Faking an inline call to 
block A with an inline src block B that takes a variable from calling 
A in the header args, and shortening it with a macro that expands to B...)


Yours,
Christian

On 6/27/11 7:43 PM, Eric Schulte wrote:

 I believe that I have fixed these
issues.  The following examples should now all export as described.

--8<---cut here---start->8---
The following exports as a normal call line
#+call: double(it=1)

Now here is an inline call call_double(it=1) stuck in the middle of
some prose.

This one should not be exported =call_double(it=2)= because it is
quoted.

Finally this next one should export, even though it starts a line
call_double(it=3) because sometimes inline blocks fold with a
paragraph.

And, a call with raw results call_double(4)[:results raw] should not
have quoted results.
--8<---cut here---end--->8---




Re: [O] ob-lilypond

2011-06-27 Thread Eric Schulte
Hi Martyn,

This looks great, I look forward to testing it out, although my music
composition experience is limited to using Finale in a high-school music
theory class.

It sounds like your plan is to keep this on github during the first
trial and debugging stages.  At some point I would love to include this
into the Org-mode core.

Part of me is tempted to push for immediate integration so that this is
released with Emacs24 (we could push bug fixes throughout the fall),
however this may be too much code for just before an Org-mode release.

Thanks for sharing! -- Eric

Martyn Jago  writes:

> Hi
>
> This is an invitation to try / test ob-lilypond - enabling LilyPond 
> Score Generation / Arrangement from within org-mode.
>
> Available on Github at https://github.com/mjago/ob-lilypond
>
> This is a beta release, but includes examples, instructions, and 
> tests, and has been tested on OSX and nix.
>
> Any further testing would be helpful.
>
> Following is the readme.org file which is rendered correctly on 
> Github...
>
> --->
>
> * Emacs Org Babel LilyPond Mode
> ** Purpose
> Allow LilyPond Score Generation to take place within Emacs Org-mode
> using literate programming principles.
>
> ** Examples
> Several examples are included
> *** Misty (Jazz Standard utilising org-mode to organise voice and other data)
>   - Here is an example Org LilyPond File]] exported as HTML
>   - Resultant Score exported in pdf format
>   - Generated Score export of individual Pages (png)
> *** Modal Cycles (Utilises org-babel and noweb to generate notes)
>   - Generated Score
>   - Generated Midi File
> *** Modal Cycles 2 (Utilises org-babel and noweb to generate notes)
>   - Generated Score
>   - Generated Midi File
> *** Modes in the Key of C (another example of polyglot lilypond programming)
>   - Generated Score
>   Generated MIDI File
>
> ** Features
>  - Optional Automated LilyPond Compilation following the "Tangling"
>   of a "Literate Org LilyPond" file
>  - Optional Automated display of resultant Musical Score following compilation
>  - Optional Automated playing of the resultant MIDI file following compilation
>  - Highlights syntax errors in Org file following a failed compilation
>  - Integrates with LilyPond-Mode
>  - Cross-Platform (OSX, nix, win32)
>
> ** Usage
>
> *** Compiling lilypond source
> Hitting 'C-c C-c' within a lilypond block initiates ly-tangle (tangling of all
> lilypond blocks). Depending on the feature settings, ob-lilypond will 
> then either display a pdf of the score, play the generated midi file,
> both, or neither. 
>
> 'M-x ly-tangle' can also be called from anywhere in the file
> and can be tied to a function key with something like...
>
> #+begin_src emacs-lisp
>
>  (global-set-key [f8] 'ly-dev-tangle)
>
> #+end_src
>
> *** Commands
>
> Some commands are included to quickly disable certain post-tangle
> activities...
>  - ly-toggle-midi-play (toggle whether midi will be played following a 
>  successful compilation)
>  - ly-toggle-pdf-display (toggle whether pdf will be displayed following 
> a successful compilation)
>
>
> NOTE:- If using Timidity for midi playback, kill the midi stream with 
> C-g in Emacs
>
> ** Setup (add to emacs init file)
> *** Cloning ob-lilypond
>
> The Files need to be downloaded to your relevant dotfiles directory...
>
> #+BEGIN_SRC sh
>
> git clone https://github.com/mjago/ob-lilypond.git ob-lilypond
>
> #+END_SRC
>
> *** Emacs Initialisation file setup 
>
> Require library...
> #+BEGIN_SRC emacs-lisp
>
> (add-to-list 'load-path
>  (concat dotfiles-dir  "ob-lilypond/lib"))
> (require 'ob-lilypond)
>
> #+END_SRC
>
>
> Add lilypond to your list of babel languages...
>
> #+BEGIN_SRC emacs-lisp
> (org-babel-do-load-languages
>  'org-babel-load-languages
>  '((ruby . t)
>(C . t)
>(emacs-lisp . t)
>(sh t)
>(dot t)
>(clojure t)
>(ditaa t)
>(lilypond t)
>))
>
> #+END_SRC
>  
> ** Requirements
> *** Mac OS X
>  - [[http://lilypond.org/][Lilypond]] can be obtained 
> [[http://lilypond.org/][here]]
>
> *** nix
>  - Lilypond is available here or via the the package manager
>  - For MIDI, [[http://timidity.sourceforge.net/][Timidity]] is available 
> [[http://timidity.sourceforge.net/][here]] or via the package manager
>  - For PDF, [[http://live.gnome.org/Evince/Downloads][Evince]] is available 
> [[http://live.gnome.org/Evince/Downloads][here]] or via package manager
>
> *** Win32
>  - Currently untested
>
> ** Testing
>
> Tests are provided and can be run by opening
> test/ob-lilypond-tests.org and running the following commands...
>
>  - M-x eval-buffer (within ob-lilypond-tests.org
>  - M-x ert (t) 
>
> Tests are run automatically on source/test file save if ly-project
> (below) has been executed
>
> ** Development
>
> Included also is dev/ob-lilypond.org which includes various helper
> commands used for development, and the development todo list
>  - ly-project (code block - eval

Re: [O] a window with my agenda at all times

2011-06-27 Thread D M German

Hi Erick,

 Eric> D M German  writes:
 >> Hi everybody,
 >> 
 >> I struggle to keep (in emacs) a window with the agenda at all times. If
 >> anybody has any pointers on how to get a window or a frame to "stick" at
 >> all times with the contents of a frame, and basically be ignored from
 >> any window-related command (split, kill, etc), I would be grateful.
 >> 
 >> For a long time I have wanted a sticky window that keeps this
 >> information. Like a sticky note on my desktop (think a widget in
 >> Android). 

 Eric> I can't answer your question directly but I have done this in the past
 Eric> by using /conky/ to display the contents of a file (updating
 Eric> automatically) where the file is created by Emacs to consist of the
 Eric> output of the agenda command.  This elisp snippet writes out the agenda
 Eric> to a specified file (untested):

(save-window-excursion
  (org-batch-agenda "a")
  (org-write-agenda "some-file-name"))

I do something similar, but in the "after-save-hook"

(defun dmg-org-update-agenda-file (&optional force)
  (interactive)
  (save-excursion
(save-window-excursion
  (let ((file "/tmp/agenda.html"))
(org-agenda-list)
(org-write-agenda file)


 Eric> In conky, you can use the /head/ directive to output a specified number
 Eric> of lines.

 Eric> Conky can write to the root window (i.e. the screen) or to a window.
 Eric> The former works better, in my opinion, but this may depend on the
 Eric> window manager you use.

Thanks for the hint. Sometimes the problem is knowing the name of a tool.

I though about doing something like this, but I wanted rendering in
HTML. Searching on the Internet I found an alternative that does HTML 
(gtk-desktop-info).

https://code.launchpad.net/~m-buck/+junk/gtk-desktop-info

I think at the end it is a matter of taste. With my utility a window is
created with scrollbars if the agenda is too large.

But it seems to be making a difference to me, which is what matters ;)

--dmg

 Eric> HTH,
 Eric> eric

 Eric> -- 
 Eric> : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
 Eric> : using Org-mode version 7.5 (release_7.5.461.g6d18)


-- 
--
Daniel M. German  
http://turingmachine.org/
http://silvernegative.com/
dmg (at) uvic (dot) ca
replace (at) with @ and (dot) with .



Re: [O] [babel] using #+call for inline results

2011-06-27 Thread Eric Schulte
Eric S Fraga  writes:

> Eric Schulte  writes:
>>
>> I've just pushed up an implementation for inline call blocks, the new
>> syntax is described in the documentation but a simple example is below.
>>
>> #+source: square
>> #+begin_src emacs-lisp :var it=0
>>   (* it it)
>> #+end_src
>>
>> Here is a call_square(it=4) stuck in the middle of some prose.
>>
>> Please let me know how it works and if you have any problems or
>> recommendations.
>>
>> Cheers -- Eric
>
> Eric,
>
> this was working on Friday but seems to have stopped working for me now
> completely.  For instance, your snippet above exports as
>
> \lstset{language=Lisp}
> \begin{lstlisting}
> (* it it)
> \end{lstlisting}
>
>
>
>
>   Here is a call$_{\mathrm{square}}$(it=4) stuck in the middle of some prose.
>
> I do not believe I have changed anything in my settings...
>
> I do note from the git log that you have made quite a few changes.  Has
> some setting crept in that I need to configure?
>

Hmm, have you updated Org-mode in the last hour/minutes, there have
indeed been a number of changes recently.  I believe that the above
should be working now, without requiring any special configuration.

>
> Also, I note from the comments that you expect the inline call to be
> whitespace delimited.  I haven't tested this but, just in case, could I
> request that the delimiting be either whitespace or punctuation?

As this behaves currently there need only be whitespace _before_ the
inline call line, not after, so most normal punctuation usage should
work.  For example the following exports as expected on my system.

--8<---cut here---start->8---
#+source: square
#+begin_src emacs-lisp :var it=0
  (* it it)
#+end_src

Here is a call_square(it=4), stuck in the middle of some prose.
--8<---cut here---end--->8---

> There are cases where I would like the inline evaluation to be at the
> end of a sentence, for instance, or even something like:
>
>   25^2=call_square(it=25)
>

hmm, good example, so what set of characters should be allowed to prefix
and postfix such a block?  For example, = before should export however =
both before and after would be a literal example.

Cheers -- Eric

>
> Thanks,
> eric

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



Re: [O] Problem with autoloads

2011-06-27 Thread Michael Markert
On 27 Jun 2011, Suvayu Ali wrote:

> On Mon, 27 Jun 2011 20:08:26 +0200
> Michael Markert  wrote:
>
>>> A fix/workaround is to adjust the loadpath to:
>>>
>>> (add-to-list 'load-path (expand-file-name "~/build/org-mode"))
>>
>> Scratch that. You need that line _additionally_ to the your other
>> two.
>
> I noticed something strange; if you do (load-library "org-capture")
> for example (with the load path set to ~/build/orgmode/lisp), the
> libraries get loaded without any errors and then on everything works
> as usual. This seems like a strange behaviour to me.

No, it's perfectly fine. With the autoloads you search for
`lisp/file.el' so the directory that includes the lisp directory has to
be in the load-path.
If you search only for the `file.el' the `lisp' directory itself has to
be in the load-path. This is exactly the problem if you change your
load-path according to my first mail: If you (or a file -- in my case it
was org-contacts.el) load the file directly, you'll fail.

With org-mode this is especially hairy, because the bundled org-mode is
by default still in the load-path, so you'll load the old ones -- in the
best case this results in cryptic and incomprehensible error messages on
load.

Michael


pgp7R3DEoz3G6.pgp
Description: PGP signature


Re: [O] exporting HTML - content only

2011-06-27 Thread Samuel Wales
Hi Tamas,

As a partial solution for you, here is the latest complete solution
for me.  Perhaps you can tailor it to your needs.

I also include a pretty fast exact word count command.

Samuel


(defconst alpha-org-blog-html-buffer "alpha-org-blog.html")
(defun alpha-org-blog-subtree ()
  "Copy the subtree, converted to HTML, for pasting into Blogger
as a blog post.

If there is an active region, use that instead.

No other software needs to be installed.  No temporary file is
created.

For an example of this code in action, see
http://thekafkapandemic.blogspot.com/ .

===

You have to turn off Blogger's conversion of newline to br tags
in two places in settings.  This requires the new Blogger post
editor.

The HTML code is left in a buffer.  To display it in a browser,
use M-x browse-url-of-buffer or similar.

mail2blogger is a very intriguing option here and I'd like to do
that.  Avoids the web entirely.  See comments.

===

The top level headline is not interpreted with Blogger title
semantics.  By default it is not exported at all, because Blogger
already has a title.  For both posts and pages, Blogger's title
field forms the URL and is therefore manually entered.

===

Advanced:

You can export the top level headline with :title:.  For pasting
into Blogger, I don't do this, because it shows up with what
looks like two titles.  In the future, we can make it work with
backends like mail2blogger.  Then it will have title
semantics (the top level will become the title).

In Blogger, pages are different from posts.  They are accessed by
tabs like About, Contribute, Contact.

:title: is also useful if you want to try a different strategy.
I did this for my first blog post.  You can change whether to
include title fields in Blogger settings.  You can only do this
for posts.  Turning off titles has one convenience: you don't
have to enter them manually.  It also has two
drawbacks: (1) people who link to your post by copying that link
cannot do so (they can get it from other places, including the
URL bar and Archives in the sidebar) and (2) the URL gets formed
a litle funnily.

===

I use Blogger.com for hosted blogging instead of Wordpress.com
because Google has a better attitude toward accessibility.
"
  (interactive)

;;; todo list
;;;
;;; === mail2blogger ===
;;;
;;; I tried using mail2blogger, but the HTML got posted.  There might
;;; be a way to fix this.  How do you do an HTML email in a format
;;; that gets recognized as HTML?
;;;
;;; We want to use raw programmatic email, such as sent using msmtp
;;; or the built-in Emacs client.  The ability to do so will obviate
;;; the need to use Google's command line client or to run Emacs 23.
;;;
;;; Patch welcome.
;;;
;;; ===
;;;
;;; Another good thing to try would be to automate grabbing the source from
;;; the page automatically to compare what you just created with ediff or
;;; git diff --color-words.  This is for edits.
;;;
;;; Also, export whole blog before each post for git.  Requires post
;;; method maybe.  How to do that?
;;;
;;; Also, check for fixmes.  (Or org could check for fixmes before
;;; all export.  Is there a hook?)
;;;
;;; Also, remind you to extract big chunks of comments for possible ohter
;;; blog entries.
;;;
;;; /Also, remind you to make sure all links work and review formatting/.
;;;
;;; ===
;;;
;;; Is there HTML for a title?  I will guess not.

  ;;say about to publish editing or about to publish post.  with
  ;;mail2blogger or weblogger.el or atom, we can automate this and assume
  ;;publish.
  ;;
  ;;technically, this should be later in case you kill something inside the
  ;;note.  for some reason org adds this to the post command hook instead of
  ;;just doing it at the time.  need to get this to just do it.  maybe
  ;;call-interactively will work?  no, that does not fix it.
  ;;
  ;;(let ((k kill-ring))
  ;;(let ((c (car kill-ring)))

  ;;(org-add-note)

  (save-excursion
(save-window-excursion
  ;;i have an issue with "--", which is perfect for emdash in ascii, but
  ;;gets converted to endash in html.  i'd like it to be emdash in html.
  ;;is there an option for that?

  ;;org converts headlines to html h numbers according to the level in
  ;;the org file, not the level in the region.  i prefer the latter.
  ;;
  ;;here we kludge it to do it my way.
  ;;
  ;;top 1 means that the very top level in org is h1 (even if you don't
  ;;export it because you manually enter a title).  it is large.  the
  ;;second level in org is h2.
  ;;
  ;;blogger does not format h2 bold on firefox in the watermark
  ;;template.  so h3 looks bigger than h2.  removing the h2 css in edit
  ;;html seems to fix things.  so all you have to do is make sure level
  ;;2 in org is a bit smaller than title.  you can do that by making org
  ;;level 2 start with h3 or lower level to make org level 2 smaller.
  ;;
  ;;therefore, we start with h3.  if we used the top level headline
  

Re: [O] [dev] footnotes improvements

2011-06-27 Thread Nicolas Goaziou
Hello,

I've made some additional changes to the footnote branch, and fixed
a merge conflict due to a recent patch.

Since Org 7.6 is about to be released, I'd appreciate if someone using
footnotes could test it and report back the results here. If some
serious problem arises, its integration will be delayed until 7.7.

Thank you for any help,

Regards,

-- 
Nicolas Goaziou



Re: [O] a window with my agenda at all times

2011-06-27 Thread dmg
here is a patch worg (org-hacks.org) describing the hack.

Hopefully somebody with write access to can commit it.

--dmg
diff --git a/org-hacks.org b/org-hacks.org
index 024eaf3..19b67c9 100644
--- a/org-hacks.org
+++ b/org-hacks.org
@@ -2259,3 +2259,30 @@ position in the track.
 
 See the file [[file:code/elisp/org-player.el][org-player.el]]
 
+** Under X11 Keep a window with the current agenda items at all time
+
+I struggle to keep (in emacs) a window with the agenda at all times.
+For a long time I have wanted a sticky window that keeps this
+information, and then use my window manager to place it and remove its
+decorations (I can also force its placement in the stack: top always,
+for example).
+
+I wrote a small program in qt that simply monitors an HTML file and
+displays it. Nothing more. It does the work for me, and maybe somebody
+else will find it useful. It relies on exporting the agenda as HTML
+every time the org file is saved, and then this little program
+displays the html file. The window manager is responsible of removing
+decorations, making it sticky, and placing it in same place always.
+
+Here is a screenshot (see window to the bottom right). The decorations
+are removed by the window manager:
+
+http://turingmachine.org/hacking/org-mode/orgdisplay.png
+
+Here is the code. As I said, very, very simple, but maybe somebody will
+find if useful.
+
+http://turingmachine.org/hacking/org-mode/
+
+--daniel german
+


Re: [O] Problem with autoloads

2011-06-27 Thread Suvayu Ali
On Mon, 27 Jun 2011 20:08:26 +0200
Michael Markert  wrote:

> > A fix/workaround is to adjust the loadpath to:
> >
> > (add-to-list 'load-path (expand-file-name "~/build/org-mode"))  
> 
> Scratch that. You need that line _additionally_ to the your other two.

I noticed something strange; if you do (load-library "org-capture") for
example (with the load path set to ~/build/orgmode/lisp), the
libraries get loaded without any errors and then on everything works as
usual. This seems like a strange behaviour to me.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] org and microsoft exchange

2011-06-27 Thread Eric S Fraga
Matthieu Lemerre  writes:

> Hi,
>
> After some digging I found the following setup to share my calendar with
> people using outlook.

[...]

Matthieu,

thanks for this.  I am unable to test it but will likely have to do so
at the end of the summer (northern hemisphere) when we are supposedly
going to be expected to start using various MS tools for collaboration
(yech).  I'll come back to you then! ;-)

Thanks again,
eric
-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.5 (release_7.5.461.g6d18)



Re: [O] org-babel -- Improper syntax error in session mode?

2011-06-27 Thread Herbert Sitz
Eric Schulte  gmail.com> writes:

> You are suggesting that code to be run "interactively" should be written
> to an external file then loaded into the interactive session.  

Generally, yes, because babel's definition of "interactive" (execute an
arbitrary collection of code lines all at once) is different from an interactive
shell session's (execute a single statement of statement block at a time, giving
output after each).

> This
> would certainly work around the syntax limitation of the current setup.
> My two concerns here are that
> 
> 1. users who use interactive babel blocks side-by-side with the session
>may be used jumping into the session to play with code interactively
>and debug, in such cases rather than seeing their code in the session
>history they would only see execfile('/tmp/blahblah').  Note I do
>recall discussion on list related to user's reading their session
>code in the inferior session buffer.

I see your point, that's a valuable tool.  Ideally, it seems to me, the session
blocks could be evaluated _either_ "interactively" (with a history in shell
session) or as a block-as-a-whole.  Having a named session (e.g., ':session
debug') designated to use the interactive mode and other :sessions use
"non-interactive" mode would be one way to do this.

> 2. similarly error messages would now point into this temporary file,
>rather than back into the session history

I think the ':session debug' behavior in paragraph above could get around this.
 (I think there are also ways to feed the source lines through  but that
doesn't get around your issue 2., anyway.)

> 
> Basically you would prefer more decoupling from the interpreter and I'm
> not sure for the average user if this would be a worthwhile exchange
> simply to be able to avoid syntax errors like your originally mentioned
> example (which was the first such post I've seen on this list).
> 
> I'm disinclined to make such a change without a wider base of support
> for the request from the Babel/Python user community -- or at least
> without more complaints about the existing behavior.
> 

Yeah, I completely get you here.  If there are no other complaints about
existing behavior, and with limited resources, there's no good reason to change
things.

Regards,

Herb






Re: [O] [babel] using #+call for inline results

2011-06-27 Thread Eric S Fraga
Eric Schulte  writes:
>
> I've just pushed up an implementation for inline call blocks, the new
> syntax is described in the documentation but a simple example is below.
>
> #+source: square
> #+begin_src emacs-lisp :var it=0
>   (* it it)
> #+end_src
>
> Here is a call_square(it=4) stuck in the middle of some prose.
>
> Please let me know how it works and if you have any problems or
> recommendations.
>
> Cheers -- Eric

Eric,

this was working on Friday but seems to have stopped working for me now
completely.  For instance, your snippet above exports as

--8<---cut here---start->8---
\lstset{language=Lisp}
\begin{lstlisting}
(* it it)
\end{lstlisting}




  Here is a call$_{\mathrm{square}}$(it=4) stuck in the middle of some prose.
--8<---cut here---end--->8---

I do not believe I have changed anything in my settings...

I do note from the git log that you have made quite a few changes.  Has
some setting crept in that I need to configure?

Also, I note from the comments that you expect the inline call to be
whitespace delimited.  I haven't tested this but, just in case, could I
request that the delimiting be either whitespace or punctuation?  There
are cases where I would like the inline evaluation to be at the end of a
sentence, for instance, or even something like:

  25^2=call_square(it=25)

Thanks,
eric

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.5 (release_7.5.461.g6d18)



Re: [O] a window with my agenda at all times

2011-06-27 Thread dmg
On Mon, Jun 27, 2011 at 12:42 PM, Bastien  wrote:
> Hi Mr German,
>
> D M German  writes:
>
>> For a long time I have wanted a sticky window that keeps this
>> information. Like a sticky note on my desktop (think a widget in
>> Android).
>
> I would use a new frame:
>
> C-x 5 2 ; create a new frame
> C-c a a ; create a new agenda

I used to that too, but the new frame gets on the way, and it is
difficult to control its placement and
window decorations using the window manager.


> Nice - could you mention it on Worg?
>
>  http://orgmode.org/worg/org-hacks.html

I will


>
> Thanks!
>
> --
>  Bastien
>



-- 
--dmg

---
Daniel M. German
http://turingmachine.org



Re: [O] a window with my agenda at all times

2011-06-27 Thread Eric S Fraga
D M German  writes:

> Hi everybody,
>
> I struggle to keep (in emacs) a window with the agenda at all times. If
> anybody has any pointers on how to get a window or a frame to "stick" at
> all times with the contents of a frame, and basically be ignored from
> any window-related command (split, kill, etc), I would be grateful.
>
> For a long time I have wanted a sticky window that keeps this
> information. Like a sticky note on my desktop (think a widget in
> Android). 

I can't answer your question directly but I have done this in the past
by using /conky/ to display the contents of a file (updating
automatically) where the file is created by Emacs to consist of the
output of the agenda command.  This elisp snippet writes out the agenda
to a specified file (untested):

--8<---cut here---start->8---
(save-window-excursion
  (org-batch-agenda "a")
  (org-write-agenda "some-file-name"))
--8<---cut here---end--->8---

In conky, you can use the /head/ directive to output a specified number
of lines.

Conky can write to the root window (i.e. the screen) or to a window.
The former works better, in my opinion, but this may depend on the
window manager you use.

HTH,
eric

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.5 (release_7.5.461.g6d18)



Re: [O] Problem with autoloads

2011-06-27 Thread Suvayu Ali
Hi Michael,

On Mon, 27 Jun 2011 18:51:01 +0200
Michael Markert  wrote:

> A fix/workaround is to adjust the loadpath to:
> 
> (add-to-list 'load-path (expand-file-name "~/build/org-mode"))
> 
> After quick browsing through the logs I found nothing that could have
> caused this, but my guess is that someone adjusted the autoloads from
> "file.el" to "lisp/file.el".

That seems to work for now. But I think this should still be addressed.
At least if this is how org behaves now, the instructions on Worg
should reflect that.

Thanks a lot. :)

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] org-babel -- Improper syntax error in session mode?

2011-06-27 Thread Herbert Sitz
Eric Schulte  gmail.com> writes:
> There are times when I explicitly do not want a session to start fresh.
> Generally this is related to caching, for example if I have some value
> which is expensive (say a couple of minutes of computation) to compute,
> and it is currently alive in the session, then I'd probably rather keep
> my session active across multiple exports as I'm working on other (say
> visual/prose tweaks) to the exported document.
> 
> Does that make sense?
> 
> If the user did want to refresh the session on _every_ export I believe
> they could add such a function to the `org-export-preprocess-hook'.
> 
> Cheers -- Eric
> 

Eric --

That makes perfect sense.  However to the extent reproducibility is a concern it
would make me uneasy to have a default that does nothing to enforce
reproducibility; and instead to have it controlled in a hook behind-the-scenes.

An acceptable alternative it seems to me, would be to put an elisp source block
at begin of document to reset the session, and then to use that block to control
whether session is reset.  That way it's clear to user exactly what's happening.

-- Herb





Re: [O] exporting HTML - content only

2011-06-27 Thread Christian Moe

Hi,

try all or part of this:
- select a region to export
- do C-u C-c C-e R

(C-u prefix: body only, R: region only)

Yours,
Christian

On 6/27/11 4:18 PM, Tamas K Papp wrote:

Hi,

I started using org-mode to write blog posts for posting on
blogger.com.  I am aware of org-googlecl, but I am looking for a more
lightweight solution to the following problem:

How can I export only the _content_ of a page as HTML into a buffer?

Specifically,

1. I only want the stuff inside the  ...,
2. Disabling the generation of a H1 heading from the title,
3. no postamble/preamble.

I would like to give the appropriate options at the beginning of the
file to achieve this and just do C-c C-e H or something similar, but I
don't know what options to use.

I can do all of this manually, but automating it would be easier.

Thanks,

Tamas








Re: [O] Problem with autoloads

2011-06-27 Thread Michael Markert
On 27 Jun 2011, Michael Markert wrote:
> On 26 Jun 2011, suvayu ali wrote:
>
>> $ make cleanall && make all
>>
>> and I load org from my init file like this:
>>
>> ;; the org repo is at ~/build/org-mode (add-to-list 'load-path
>> (expand-file-name "~/build/org-mode/lisp")) (add-to-list 'load-path
>> (expand-file-name "~/build/org-mode/contrib/lisp"))
>>
>> (require 'org-install)
>>
>> 
>>
>> I have faced this once earlier, not sure how I resolved it back
>> then. What am I doing wrong here?
>
> I faced this, too.
>
> A fix/workaround is to adjust the loadpath to:
>
> (add-to-list 'load-path (expand-file-name "~/build/org-mode"))

Scratch that. You need that line _additionally_ to the your other two.

Michael


pgpUYfcVt9DYf.pgp
Description: PGP signature


Re: [O] [babel] using #+call for inline results

2011-06-27 Thread Eric Schulte
Christian Moe  writes:

> Fixed, thanks. I should have guessed that might be it.
>
> Evaluating inline calls now works, but there are some ramifications
> for output and export that I hadn't thought about when I seconded the
> request.
>
>
> * Export
>
> The call itself should not be exported, but I'm seeing:
>
> : 
> : Here is a callsquare(it=4) 16 stuck in the
> middle of some prose.
> : 
>
>
> * Output
>
> To get rid of the literal equals-signs, I try:
>
> : Here is a call_square(it=4)[:results raw] stuck in the middle of
> some prose.
>
> I expect to get the result inline, but instead it comes as a normal
> call results block (aligned with the call):
>
> :  #+results: square(it=4)
> :  16
>

Hi Christian,

Thanks for sharing these issues, it appears I messed some functionality
up with some of my recent changes.  I believe that I have fixed these
issues.  The following examples should now all export as described.

--8<---cut here---start->8---
The following exports as a normal call line
#+call: double(it=1)

Now here is an inline call call_double(it=1) stuck in the middle of
some prose.

This one should not be exported =call_double(it=2)= because it is
quoted.

Finally this next one should export, even though it starts a line
call_double(it=3) because sometimes inline blocks fold with a
paragraph.

And, a call with raw results call_double(4)[:results raw] should not
have quoted results.
--8<---cut here---end--->8---

Please let me know if you experience any more problems, and thanks for
helping to get this sorted before the impending release!

Cheers -- Eric

>
>
> Yours,
> Christian
>
> On 6/27/11 2:14 AM, Eric Schulte wrote:
>>>
>>> But I seem to have a problem (running your example):
>>>
>>> Debugger entered--Lisp error: (invalid-function (nonempty (a b) (let
>>> ((it (match-string a))) (if (= (length it) 0) (match-string b) it
>>>(nonempty (a b) (let (...) (if ... ... it)))()
>>>org-babel-lob-get-info()
>>>org-babel-lob-execute-maybe()
>>>org-babel-execute-maybe()
>>>org-babel-execute-safely-maybe()
>>>run-hook-with-args-until-success(org-babel-execute-safely-maybe)
>>>org-ctrl-c-ctrl-c(nil)
>>>call-interactively(org-ctrl-c-ctrl-c nil nil)
>>>
>>
>> I believe this is due to my forgetting to require 'cl at compile time.
>> I've just pushed up a fix, please let me know if the problem persists.
>>
>> Thanks -- Eric
>>
>

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



Re: [O] a window with my agenda at all times

2011-06-27 Thread Bastien
Hi Mr German,

D M German  writes:

> For a long time I have wanted a sticky window that keeps this
> information. Like a sticky note on my desktop (think a widget in
> Android). 

I would use a new frame:

C-x 5 2 ; create a new frame
C-c a a ; create a new agenda

Note that new restrictions in agenda buffers, or new calls 
to agenda commands will update this "agenda frame".  But at 
least you have one single frame for one single task: display
the agenda.

> http://turingmachine.org/hacking/org-mode/

Nice - could you mention it on Worg? 

  http://orgmode.org/worg/org-hacks.html

Thanks!

-- 
 Bastien



Re: [O] Documentation suggestion re: buffers containing crypted entries

2011-06-27 Thread Bastien
Hi Eric,

Eric S Fraga  writes:

> The question is where should this information be most appropriate to
> appear.  In my view, this should be in the documentation (highlighted
> etc), not in the Emacs mini-buffer!  I don't know enough texi (any at
> all, actually) so cannot suggest a patch.  However, I would suggest that
> the warning that is in the code be moved into the entry for org-crypt.el
> in the info manual. 

I did so -- I added this to the config example in org.texi:

,
| (setq auto-save-default nil)
|   ;; Auto-saving does not cooperate with org-crypt.el: so you need
|   ;; to turn it off if you plan to use org-crypt.el quite often.
|   ;; Otherwise, you'll get an (annoying) message each time you 
|   ;; start Org.
| 
|   ;; To turn it off only locally, you can insert this:
|   ;;
|   ;; # -*- buffer-auto-save-file-name: nil; -*-
`

> Or, as originally proposed, the warning in the code
> could be wrapped in a customisable variable but this seems like overkill
> to me.

To me too, unless we have a clean way to disable auto-save-mode locally.

> Just my 2¢!

2thx!

-- 
 Bastien



Re: [O] [PATCH] org-crypt: only warn about auto-save-mode when running org-decrypt

2011-06-27 Thread Bastien
Hi Pieter,

Thanks for the patch at the end of this thread.

Pieter Praet  writes:

> Ideally, we'd have a defcustom `org-crypt-auto-save' with the following 
> options:
> - 'ask : Ask the user whether or not to decrypt the entry.
> - 'disable : Disable auto-save-mode for the current buffer before decrypting.
> - 'ignore  : Decrypt the entry regardless.
> - 'encrypt : Re-encrypt the entries before auto-save kicks in.
>
> I've implemented this, but it fails miserably:
>
> Since the function `auto-save-mode' doesn't set an buffer-local
> var to indicate whether or not it's enabled for the current buffer, we
> can only check for `auto-save-default'. 

I think we should first ask emacs-devel to fix this, then implement your
clean solution.  Would you like to report this problem?

I'm not confident in disabling auto-save-mode globally by default, this
would surprise users -- even with a **BiG WaRnInG** message.

What do you think?

-- 
 Bastien



Re: [O] Documentation suggestion re: buffers containing crypted entries

2011-06-27 Thread Bastien
Hi Bill,

Bill Day  writes:

> # -*- buffer-auto-save-file-name: nil; -*-

Do you know if this hack works for recent Emacsen without side-effects?

-- 
 Bastien



Re: [O] How to attach data in clipboard directly?

2011-06-27 Thread Bastien
Hi Carlos,

Carlos Russo  writes:

> Nevertheless, it's a good pointer: I was able to cook up an elisp function
> that calls an applescript to do the osx-dependent stuff.

A good start, then -- could someone add this to Worg hacks?

Thanks,

-- 
 Bastien



Re: [O] Bug: org-time-stamp loses repeater interval

2011-06-27 Thread Bastien
Karl Voit  writes:

> Same to me. Unfortunately I am using timestamps not only in the
> context of DEADLINE or SCHEDULED but also for events that should
> simply show up on the agenda (without deadline or scheduled
> timestamp at all).
>
> To me this *is* a bug since my expected behavior of org-time-stamp
> to modify an existing timestamp is different.

Yes, this is a bug.

> So, how reaches this bug report a person who is able to fix it?

You've just done so :)  

It is now fixed in the latest git version.  Please test and report, 
if possible.

> PS: Sorry, I still don't know ELISP yet and therefore can't fix it
> by myself.

No problem!

-- 
 Bastien



Re: [O] Problem with autoloads

2011-06-27 Thread Michael Markert
On 26 Jun 2011, suvayu ali wrote:

> $ make cleanall && make all
>
> and I load org from my init file like this:
>
> ;; the org repo is at ~/build/org-mode
> (add-to-list 'load-path (expand-file-name "~/build/org-mode/lisp"))
> (add-to-list 'load-path (expand-file-name "~/build/org-mode/contrib/lisp"))
>
> (require 'org-install)
>
> 
>
> I have faced this once earlier, not sure how I resolved it back
> then. What am I doing wrong here?

I faced this, too.

A fix/workaround is to adjust the loadpath to:

(add-to-list 'load-path (expand-file-name "~/build/org-mode"))

After quick browsing through the logs I found nothing that could have
caused this, but my guess is that someone adjusted the autoloads from
"file.el" to "lisp/file.el".

Michael


pgpPD2UsEhrv2.pgp
Description: PGP signature


Re: [O] exporting HTML - content only

2011-06-27 Thread Pierre de Buyl

Hello,

There is also the possibility to do it without further configuration.

Typing
M-- M-x org-export-region-as-html

exports the HTML of the selected region only, no header text and so on.

Pierre

Le 27 juin 11 à 11:40, Ian Barton a écrit :


On 27/06/11 15:18, Tamas K Papp wrote:

Hi,

I started using org-mode to write blog posts for posting on
blogger.com.  I am aware of org-googlecl, but I am looking for a more
lightweight solution to the following problem:

How can I export only the _content_ of a page as HTML into a buffer?

Specifically,

1. I only want the stuff inside the  ...,
2. Disabling the generation of a H1 heading from the title,
3. no postamble/preamble.

I would like to give the appropriate options at the beginning of the
file to achieve this and just do C-c C-e H or something similar,  
but I

don't know what options to use.

I can do all of this manually, but automating it would be easier.



Have a look at http://orgmode.org/worg/org-tutorials/org-publish- 
html-tutorial.html. Specifically you need to set :body-only t in  
your org-publish-project-alist. However, I am not sure how you can  
set up publishing to a buffer, rather than a file.


Ian.






Re: [O] exporting HTML - content only

2011-06-27 Thread Ian Barton

On 27/06/11 15:18, Tamas K Papp wrote:

Hi,

I started using org-mode to write blog posts for posting on
blogger.com.  I am aware of org-googlecl, but I am looking for a more
lightweight solution to the following problem:

How can I export only the _content_ of a page as HTML into a buffer?

Specifically,

1. I only want the stuff inside the  ...,
2. Disabling the generation of a H1 heading from the title,
3. no postamble/preamble.

I would like to give the appropriate options at the beginning of the
file to achieve this and just do C-c C-e H or something similar, but I
don't know what options to use.

I can do all of this manually, but automating it would be easier.



Have a look at 
http://orgmode.org/worg/org-tutorials/org-publish-html-tutorial.html. 
Specifically you need to set :body-only t in your 
org-publish-project-alist. However, I am not sure how you can set up 
publishing to a buffer, rather than a file.


Ian.



Re: [O] [babel] Maxima code blocks do not work

2011-06-27 Thread Eric S Fraga
Bernd Weiss  writes:

[...]

> #+results:
> : incorrect syntax: / is not a prefix operator
> : incorrect syntax: aLH is not an infix operator
> : incorrect syntax: hCp is not an infix operator
> : incorrect syntax: Premature termination of input at $.
> : Maxima encountered a Lisp error:
> :  parser: end of file while scanning expression.
> : Automatically continuing.
> : To enable the Lisp debugger set *debugger-hook* to nil.
>
> This message is 'related' (see lines 3 "aLH is not an infix operator"
> and 4 "hCp is not an infix operator") to the following Maxima call
> ("aLH/maxima-17716hCp"):
>
> maxima --very-quiet -r
> 'batchload("c:/Users/weiss/AppData/Local/Temp/babel-17716aLH/maxima-17716hCp")$'
> nil

The error messages look like maxima is trying to evaluate the actual
string within double quotes!

> Unfortunately, my elisp knowledge is too low to understand what's going
> on in ob-maxima.el. Is it a MS-Windows-thing ('/' vs '\')?

Good question. Has anybody else used maxima with org babel on Windows?
I don't even have such a system to try...  

My guess would be that the "shell" command required to invoke maxima on
Windows needs to be significantly different than what we are using here
(which works on Linux).  Then again, I've never really used Windows
(beyond starting Word on somebody else's document on somebody else's
machine... ;-) so I don't have a clue what Windows expects...

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.5 (release_7.5.458.g1642)



[O] exporting HTML - content only

2011-06-27 Thread Tamas K Papp
Hi,

I started using org-mode to write blog posts for posting on
blogger.com.  I am aware of org-googlecl, but I am looking for a more
lightweight solution to the following problem:

How can I export only the _content_ of a page as HTML into a buffer?

Specifically,

1. I only want the stuff inside the  ... ,
2. Disabling the generation of a H1 heading from the title,
3. no postamble/preamble.

I would like to give the appropriate options at the beginning of the
file to achieve this and just do C-c C-e H or something similar, but I
don't know what options to use.

I can do all of this manually, but automating it would be easier.

Thanks,

Tamas




Re: [O] orgmode and web publishing: good menu system ?

2011-06-27 Thread Sander Boer
Dear Pierre,

I did use that page to set up my system, but I think I either stopped
reading after the publish step, or a bunch of extra info's been added
quite recently. First option souds like me I'm a total tl;dr kinda guy.

Your system and css will be studied, thanks a lot !



-- 
Sander Boer

..
A few hours grace before the madness begins again.




[O] ob-lilypond

2011-06-27 Thread Martyn Jago
Hi

This is an invitation to try / test ob-lilypond - enabling LilyPond 
Score Generation / Arrangement from within org-mode.

Available on Github at https://github.com/mjago/ob-lilypond

This is a beta release, but includes examples, instructions, and 
tests, and has been tested on OSX and nix.

Any further testing would be helpful.

Following is the readme.org file which is rendered correctly on 
Github...

--->

* Emacs Org Babel LilyPond Mode
** Purpose
Allow LilyPond Score Generation to take place within Emacs Org-mode
using literate programming principles.

** Examples
Several examples are included
*** Misty (Jazz Standard utilising org-mode to organise voice and other data)
  - Here is an example Org LilyPond File]] exported as HTML
  - Resultant Score exported in pdf format
  - Generated Score export of individual Pages (png)
*** Modal Cycles (Utilises org-babel and noweb to generate notes)
  - Generated Score
  - Generated Midi File
*** Modal Cycles 2 (Utilises org-babel and noweb to generate notes)
  - Generated Score
  - Generated Midi File
*** Modes in the Key of C (another example of polyglot lilypond programming)
  - Generated Score
  Generated MIDI File

** Features
 - Optional Automated LilyPond Compilation following the "Tangling"
  of a "Literate Org LilyPond" file
 - Optional Automated display of resultant Musical Score following compilation
 - Optional Automated playing of the resultant MIDI file following compilation
 - Highlights syntax errors in Org file following a failed compilation
 - Integrates with LilyPond-Mode
 - Cross-Platform (OSX, nix, win32)

** Usage

*** Compiling lilypond source
Hitting 'C-c C-c' within a lilypond block initiates ly-tangle (tangling of all
lilypond blocks). Depending on the feature settings, ob-lilypond will 
then either display a pdf of the score, play the generated midi file,
both, or neither. 

'M-x ly-tangle' can also be called from anywhere in the file
and can be tied to a function key with something like...

#+begin_src emacs-lisp

 (global-set-key [f8] 'ly-dev-tangle)

#+end_src

*** Commands

Some commands are included to quickly disable certain post-tangle
activities...
 - ly-toggle-midi-play (toggle whether midi will be played following a 
 successful compilation)
 - ly-toggle-pdf-display (toggle whether pdf will be displayed following 
a successful compilation)


NOTE:- If using Timidity for midi playback, kill the midi stream with 
C-g in Emacs

** Setup (add to emacs init file)
*** Cloning ob-lilypond

The Files need to be downloaded to your relevant dotfiles directory...

#+BEGIN_SRC sh

git clone https://github.com/mjago/ob-lilypond.git ob-lilypond

#+END_SRC

*** Emacs Initialisation file setup 

Require library...
#+BEGIN_SRC emacs-lisp

(add-to-list 'load-path
 (concat dotfiles-dir  "ob-lilypond/lib"))
(require 'ob-lilypond)

#+END_SRC


Add lilypond to your list of babel languages...

#+BEGIN_SRC emacs-lisp
(org-babel-do-load-languages
 'org-babel-load-languages
 '((ruby . t)
   (C . t)
   (emacs-lisp . t)
   (sh t)
   (dot t)
   (clojure t)
   (ditaa t)
   (lilypond t)
   ))

#+END_SRC
 
** Requirements
*** Mac OS X
 - [[http://lilypond.org/][Lilypond]] can be obtained 
[[http://lilypond.org/][here]]

*** nix
 - Lilypond is available here or via the the package manager
 - For MIDI, [[http://timidity.sourceforge.net/][Timidity]] is available 
[[http://timidity.sourceforge.net/][here]] or via the package manager
 - For PDF, [[http://live.gnome.org/Evince/Downloads][Evince]] is available 
[[http://live.gnome.org/Evince/Downloads][here]] or via package manager

*** Win32
 - Currently untested

** Testing

Tests are provided and can be run by opening
test/ob-lilypond-tests.org and running the following commands...

 - M-x eval-buffer (within ob-lilypond-tests.org
 - M-x ert (t) 

Tests are run automatically on source/test file save if ly-project
(below) has been executed

** Development

Included also is dev/ob-lilypond.org which includes various helper
commands used for development, and the development todo list
 - ly-project (code block - evaluate with C-c C-c and execute M-x ly-project) 
   - load appropriate files
   - set up windows
   - setup project development environment
   - add continuous testing post-save hook
   - map F4 to switch between src or test files to control file 
(dev/ob-lilypond.org)
   - map F8 to 'ly-dev-tangle (tangle test/test-build/test.org file from 
anywhere)
 - Remove post-save-hook code block
 - Development todo list

<---

Regards

Martyn




Re: [O] [babel] Maxima code blocks do not work

2011-06-27 Thread Bernd Weiss
Am 27.06.2011 04:34, schrieb Eric S Fraga:
> Bernd Weiss  writes:
> 
>> Dear all,
>>
>> The follwing Maxima code block does not work:
>>
>> #+begin_src maxima
>> 1+1;
>> #+end_src
>> #+results:
>> #+begin_example
>> incorrect syntax: / is not a prefix operator
>> incorrect syntax: GuM is not an infix operator
>> parser: incomplete number; missing exponent?
>>  -- an error. To debug this try: debugmode(true);
>> incorrect syntax: Too many )'s
>> incorrect syntax: Premature termination of input at $.
>> Maxima encountered a Lisp error:
>>  parser: end of file while scanning expression.
>> Automatically continuing.
>> To enable the Lisp debugger set *debugger-hook* to nil.
>> #+end_example
> 
> Strange.  I don't get this at all.  In fact, I get no output at all with
> your example.  If I change the code to:


Hi Eric,

Thanks for your answer!


> #+begin_src maxima
> a: 1+1;
> print(a);
> #+end_src
> 
> then I get:
> 
> #+results:
> : 2 
> 
> 
>> Package: Org-mode version 7.5 (release_7.5.435.gd3100)
> 
> I am running a newer version of org than you are so maybe update?  I am
> also on emacs 24.

I updated org (again, now it's Org-mode version 7.5
(release_7.5.461.g6d18)), I switched to Emacs 24 but to no avail. I also
tried to use the debugger but this does not seem to be an error...

Debug on Error enabled globally
executing Maxima code block...
executing Maxima source code block
maxima --very-quiet -r
'batchload("c:/Users/weiss/AppData/Local/Temp/babel-209000BH/maxima-20900VN1")$'
nil
Code block evaluation complete.

I also realized that the 'error message' changes every time I try to run
the code block:

#+results:
: incorrect syntax: / is not a prefix operator
: incorrect syntax: aLH is not an infix operator
: incorrect syntax: hCp is not an infix operator
: incorrect syntax: Premature termination of input at $.
: Maxima encountered a Lisp error:
:  parser: end of file while scanning expression.
: Automatically continuing.
: To enable the Lisp debugger set *debugger-hook* to nil.

This message is 'related' (see lines 3 "aLH is not an infix operator"
and 4 "hCp is not an infix operator") to the following Maxima call
("aLH/maxima-17716hCp"):

maxima --very-quiet -r
'batchload("c:/Users/weiss/AppData/Local/Temp/babel-17716aLH/maxima-17716hCp")$'
nil

Unfortunately, my elisp knowledge is too low to understand what's going
on in ob-maxima.el. Is it a MS-Windows-thing ('/' vs '\')?

To be honest, running Maxima in org in not so important for me. As long
as R works, everything is fine :-)

Thanks,

Bernd



Re: [O] Patch on org-read-property-name

2011-06-27 Thread Bastien
Hi Vincent,

Vincent Belaïche  writes:

> Please find a patch for setting properties. A name is proposed when the
> pointer is on a property line, the name in that line is set as default.

Applied, thanks a lot.

-- 
 Bastien



Re: [O] orgmode and web publishing: good menu system ?

2011-06-27 Thread Pierre de Buyl

Hello,

Are you using the "project" system already ? (as seen here http:// 
orgmode.org/worg/org-tutorials/org-publish-html-tutorial.html )


If so, you can specify a menu in the ":html-preamble " setting.
Here's mine, as an example
:html-preamble "
   

Home |
Page 1 |
Page 2 |
Page 3

   
"

Then, all the pages of that project will include that at the  
beginning of the page. You are welcome to check the result on http:// 
homepages.ulb.ac.be/~pdebuyl/

You can style this menu via an additional css.

Cheers,

Pierre


Le 27 juin 11 à 05:28, Sander Boer a écrit :


Hi all,

I'm researching a way to use org for my web publishing needs and  
thanks

to worg I have a good system already.

However, I'm missing a good way to bind the various pages together, a
nice navigation system. Nothing too fancy (but very goodlooking), a  
nice

topbar.

Does anybody have some good tips in this regard ?

thanks.
--
Sander Boer







Re: [O] contrib/doc/fr-orgcard.tex

2011-06-27 Thread Vincent-Xavier JUMEL
Le 27 juin à 11:45 Bastien a écrit
> Dear all,
> 
> there is a new contrib/doc/ directory containing fr-refcard.tex, a
> french version of the Org refcard.  This version compiles 90% fine, but
> there may be some remaining formatting problems -- please report them
> and propose patches, if possible.
>
I'll try to refine this in the summer time, since I'll be on vacation.
  

-- 
Vincent-Xavier JUMEL GPG Id: 0x2E14CE70 http://thetys-retz.net

Rejoignez les 5500 adhérents de l'April http://www.april.org/adherer
Parinux, logiciel libre à Paris : http://www.parinux.org



Re: [O] A new org-mode release for Emacs 24.1

2011-06-27 Thread Bastien
Leo  writes:

> It seems it has been a long time since last release. Any plan to update
> the orgmode included in Emacs upstream? Thanks.

Yes -- we will update it after the release of 7.6, early this week.

Thanks,

-- 
 Bastien



Re: [O] [PATCH] Introduce CLOCK_INTO_DRAWER property like the existing LOG_INTO_DRAWER

2011-06-27 Thread Bastien
Hi Achim,

Achim Gratz  writes:

> From: Achim Gratz 
> Date: Sat, 25 Jun 2011 17:25:41 +0200
> Subject: [PATCH] Introduce CLOCK_INTO_DRAWER property like the existing
>  LOG_INTO_DRAWER

Applied, thanks a lot.  Let take at least one day to let people test
this patch -- feedback welcome.

Thanks,

-- 
 Bastien



[O] contrib/doc/fr-orgcard.tex

2011-06-27 Thread Bastien
Dear all,

there is a new contrib/doc/ directory containing fr-refcard.tex, a
french version of the Org refcard.  This version compiles 90% fine, but
there may be some remaining formatting problems -- please report them
and propose patches, if possible.

Authors of this fr-orgcard.tex are Thierry Stoehr and Vincent-Xavier
Jumel*, who worked on this during the last french OrgCamp.  Thanks to
them!

If people want to provide another translation, please do.

Best,

* I may forget other contributors, please correct me.

-- 
 Bastien



[O] orgmode and web publishing: good menu system ?

2011-06-27 Thread Sander Boer
Hi all,

I'm researching a way to use org for my web publishing needs and thanks
to worg I have a good system already.

However, I'm missing a good way to bind the various pages together, a
nice navigation system. Nothing too fancy (but very goodlooking), a nice
topbar.

Does anybody have some good tips in this regard ?

thanks.
-- 
Sander Boer




Re: [O] [babel] Maxima code blocks do not work

2011-06-27 Thread Eric S Fraga
Bernd Weiss  writes:

> Dear all,
>
> The follwing Maxima code block does not work:
>
> #+begin_src maxima
> 1+1;
> #+end_src
> #+results:
> #+begin_example
> incorrect syntax: / is not a prefix operator
> incorrect syntax: GuM is not an infix operator
> parser: incomplete number; missing exponent?
>  -- an error. To debug this try: debugmode(true);
> incorrect syntax: Too many )'s
> incorrect syntax: Premature termination of input at $.
> Maxima encountered a Lisp error:
>  parser: end of file while scanning expression.
> Automatically continuing.
> To enable the Lisp debugger set *debugger-hook* to nil.
> #+end_example

Strange.  I don't get this at all.  In fact, I get no output at all with
your example.  If I change the code to:

#+begin_src maxima
a: 1+1;
print(a);
#+end_src

then I get:

#+results:
: 2 


> Package: Org-mode version 7.5 (release_7.5.435.gd3100)

I am running a newer version of org than you are so maybe update?  I am
also on emacs 24.

HTH,
eric
-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.5 (release_7.5.457.g85ca)



[O] Email -> Org-mode: charset problem

2011-06-27 Thread Karl Voit
Hi!

Is there somebody who managed to develop an email to Org-mode bridge
without having charset problems? (No, I do not use Emacs as a
MUA[4])

Disclaimer: This is not directly related to Org-mode but I guess
there are people here with the very same problem.

I am using a procmail[1] with an entry to forward emails containing
a keyword in the subject into my inbox.org (where also MobileOrg[2]
entries are written to).

This is quite handy since some tasks arrive at emails and I want to
capture this everywhere (smartphone, webmail, ...) using a simply
email forward.

Unfortunately I get weird stuff like uuencoded things, UTF-8 in
ASCII, ... which messes up my inbox.org and I am not able to read it
afterwards.[5]

I guess this is because procmail and formail[3] – the tools I am
using to extract mail infos to append to the org-file – are
7-bit-only or similar.

If this is the case, I guess I'll have to find a different approach
for this purpose.

Any ideas?

  1. http://www.procmail.org/
  2. https://github.com/matburt/mobileorg-android/wiki/
  3. http://www.linuxcommand.org/man_pages/formail1.html
  4. http://en.wikipedia.org/wiki/Mail_user_agent
  5. I can give examples if you want.
-- 
Karl Voit




Re: [O] [BUG] doc/org.texi:org-crypt.el

2011-06-27 Thread Bastien
Nick Dokos  writes:

> The headings for the org-crypt.el section of org.texi contain spurious
> plus signs (possibly from a bad patch application):
>
> +@node org-crypt.el,  , Interaction, Miscellaneous
> +@section org-crypt.el
> +@cindex @file{org-crypt.el}
> +@cindex @code{org-decrypt-entry}
>
> The plus signs should be deleted.

Done, thanks!

-- 
 Bastien