noweb and shell heredocs

2021-11-25 Thread Łukasz Stelmach
Hi,

Is there anything I may try to stop shell syntax hihgliting in code
blocks being fooled by noweb refs?

-- 
Kind regards,
Łukasz Stelmach


signature.asc
Description: PGP signature


customized link pointing at a src block

2019-11-09 Thread Łukasz Stelmach
Hi,

I'd like to have collapsible source code blocks in my org document
exported to HTML. To collapse and restore I have used[1]. The library
requires a link (or a button) with appropirate properties. A link needs
to point (href) to a block and have additional custom data-toggle
property. On Debian9/Emacs 24/org-mode 8.x I was able to craft such
links by hand

#+HTML: Show

#+NAME: code1
#+BEGIN_SRC python
return 42
#+END_SRC

On Debian10/Emacs26/org-mode 9.1.9 src blocks with a NAME get
automatically generated id-s (org-export-get-reference) and I can see no
way to determine href in my HTML snippet. (ATTR_HTML before org-mode
link does not work as advertised in the manual either).

Is there any way to generate a link (or a button) for every code block
with matching href/id you can recommend?

[1] https://getbootstrap.com/docs/4.2/components/collapse/

Kind regards,
-- 
Było mi bardzo miło.  --- Rurku. --- ...
>Łukasz<--- To dobrze, że mnie słuchasz.


signature.asc
Description: PGP signature


[O] [RFC] Add new export backend for Jekyll

2018-03-17 Thread Łukasz Stelmach
Jekyll[1] is a static site genrator.  Its most notable deployment are
Github Pages.  It accepts several input formats including HTML, that
is why ox-jekyll is derived from ox-html.  Input files for Jekyll must
be HTML files without any site-specific elements (e.g. menus, headers,
sidebars), because Jekyll will add them.  The HTML code, however, must
be prepended with a piece of YAML code which specifies:

+ page title,
+ page category,
+ layout template to use for the page,
+ publication date.

The main task of ox-jekyll is to read Org '#+KEYWORDS' and output them as
Jekyll's front matter.  At this point also source code blocks are exported
inside special tags instead of html .

[1] http://jekyllrb.com/

Signed-off-by: Łukasz Stelmach 
---

This is kind of work-in-progress version. "Kind of" because it satisfies
my needs and I would like to ask what others think or need.

How to test this module?

Please comment.

 lisp/ox-jekyll.el | 139 ++
 1 file changed, 139 insertions(+)
 create mode 100644 lisp/ox-jekyll.el

diff --git a/lisp/ox-jekyll.el b/lisp/ox-jekyll.el
new file mode 100644
index 0..273792ba9
--- /dev/null
+++ b/lisp/ox-jekyll.el
@@ -0,0 +1,139 @@
+;;; ox-jekyll.el --- Export org files to Jekyll static site generator
+
+;; Copyright (C) 2011-2015 Free Software Foundation, Inc.
+
+;; Author: Łukasz Stelmach 
+;; Keywords: 
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; This library implements a backend to export Org files as HTML
+;; for further processing by Jekyll static site generator.
+;; See Org manual for more information.
+
+;;; Code:
+
+;;; Dependencies
+
+(require 'ox)
+
+;;; Define Back-End
+
+(org-export-define-derived-backend 'jekyll 'html
+  :menu-entry
+  '(?h 1
+   ((?J "As HTML buffer (Jekyll)" org-jekyll-export-as-html)
+(?j "As HTML file (Jekyll)" org-jekyll-export-to-html)))
+
+  :translate-alist
+  '((template . org-jekyll-html-template)
+(src-block . org-jekyll-html-src-block))
+
+  :options-alist
+  '((:jekyll-layout "LAYOUT" nil "post" t)
+(:jekyll-categories "CATEGORIES" nil nil t))
+  ;; TODO: tags, as soon as I learn how they differ from categories
+  ;; https://github.com/jekyll/jekyll/issues/6853
+  )
+
+(defun org-jekyll-export-as-html
+"TODO: Doc"
+  (&optional async subtreep visible-only body-only ext-plist)
+  (interactive)
+  (org-export-to-buffer 'jekyll "*Org JEKYLL Export*"
+async subtreep visible-only body-only ext-plist (lambda () (html-mode
+
+(defun org-jekyll-export-to-html
+"TODO: Doc"
+  (&optional async subtreep visible-only body-only ext-plist)
+  (interactive)
+  (let ((file (org-export-output-file-name ".html" subtreep)))
+(org-export-to-file 'beamer file
+  async subtreep visible-only body-only ext-plist)))
+
+(defun org-jekyll-html-src-block (src-block contents info)
+  "Transcode a SRC-BLOCK element from Org to a highlight block for Jekyll.
+CONTENTS holds the contents of the item.  INFO is a plist holding
+contextual information."
+  (message "org-jekyll-html-src-block")
+  (if (org-export-read-attribute :attr_html src-block :textarea)
+  (org-html--textarea-block src-block)
+(let ((lang (org-element-property :language src-block))
+  (caption (org-export-get-caption src-block))
+  (code (org-html-format-code src-block info))
+  (label (let ((lbl (org-element-property :name src-block)))
+   (if (not lbl) ""
+ (format " id=\"%s\""
+ (org-export-solidify-link-text lbl))
+  (if (not lang) (format "\n%s" label code)
+(format
+ "\n%s%s\n"
+ (if (not caption) ""
+   (format "%s"
+   (org-export-data caption info)))
+ (format "\n{%% highlight %s %%}\n%s{%% endhighlight %%}" lang 
code))
+
+(defun org-jekyll-html-template (contents info)
+  "Return complete document for Jekyll, i.e. the HTML contents
+without the  and  tags but prepended with a front
+matter for

[O] [PATCH] ox-s5: Update to work with refactored html backedn

2017-05-05 Thread Łukasz Stelmach
* contrib/lisp/ox-s5.el (org-s5-template): Adapt to changes introduced
by c9ca0b6d in the way :html-divs/org-html-divs are passed to ox-html.
---
 contrib/lisp/ox-s5.el | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/contrib/lisp/ox-s5.el b/contrib/lisp/ox-s5.el
index 503bfd0..7a717fe 100644
--- a/contrib/lisp/ox-s5.el
+++ b/contrib/lisp/ox-s5.el
@@ -304,13 +304,13 @@ holding export options."
   "Return complete document string after HTML conversion.
 CONTENTS is the transcoded contents string.  INFO is a plist
 holding export options."
-  (let ((org-html-divs
-(if (equal (plist-get info :html-container) "li")
-(append '((content "ol" "content")) org-s5--divs)
-  org-s5--divs))
-(info (plist-put
+  (let ((info (plist-put
+  (plist-put
(plist-put info :html-preamble (plist-get info :s5-preamble))
-   :html-postamble (plist-get info :s5-postamble
+   :html-postamble (plist-get info :s5-postamble))
+  :html-divs (if (equal (plist-get info :html-container) "li")
+ (append '((content "ol" "content")) org-s5--divs)
+   org-s5--divs
 (mapconcat
  'identity
  (list
-- 
2.1.4




[O] [PATCH v1.1] ox-s5: update to work with refactored html backedn

2017-05-05 Thread Łukasz Stelmach

* contrib/lisp/ox-s5.el: adapt to changes introduced by c9ca0b6d in the
way :html-divs/org-html-divs are passed to ox-html
---
Now it should be ready.

 contrib/lisp/ox-s5.el | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/contrib/lisp/ox-s5.el b/contrib/lisp/ox-s5.el
index 503bfd0..7a717fe 100644
--- a/contrib/lisp/ox-s5.el
+++ b/contrib/lisp/ox-s5.el
@@ -304,13 +304,13 @@ holding export options."
   "Return complete document string after HTML conversion.
 CONTENTS is the transcoded contents string.  INFO is a plist
 holding export options."
-  (let ((org-html-divs
-(if (equal (plist-get info :html-container) "li")
-(append '((content "ol" "content")) org-s5--divs)
-  org-s5--divs))
-(info (plist-put
+  (let ((info (plist-put
+  (plist-put
(plist-put info :html-preamble (plist-get info :s5-preamble))
-   :html-postamble (plist-get info :s5-postamble
+   :html-postamble (plist-get info :s5-postamble))
+  :html-divs (if (equal (plist-get info :html-container) "li")
+ (append '((content "ol" "content")) org-s5--divs)
+   org-s5--divs
 (mapconcat
  'identity
  (list
-- 
2.1.4





Re: [O] [PATCH] ox-s5: update to work with refactored html backedn

2017-05-05 Thread Łukasz Stelmach
It was <2017-05-04 czw 17:39>, when Łukasz Stelmach wrote:
> * contrib/lisp/ox-s5.el: adapt to changes introduced by c9ca0b6d in the
> way :html-divs/org-html-divs are passed to ox-html

Please don't apply this patch. I'll send it from another e-mail account.
-- 
Łukasz Stelmach
Samsung R&D Institute Poland
Samsung Electronics




[O] [PATCH] ox-s5: update to work with refactored html backedn

2017-05-05 Thread Łukasz Stelmach

* contrib/lisp/ox-s5.el: adapt to changes introduced by c9ca0b6d in the
way :html-divs/org-html-divs are passed to ox-html
---
It appears that for some reason the patch didn't make it to the list the
first time I sent it.

 contrib/lisp/ox-s5.el | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/contrib/lisp/ox-s5.el b/contrib/lisp/ox-s5.el
index 503bfd0..7a717fe 100644
--- a/contrib/lisp/ox-s5.el
+++ b/contrib/lisp/ox-s5.el
@@ -304,13 +304,13 @@ holding export options."
   "Return complete document string after HTML conversion.
 CONTENTS is the transcoded contents string.  INFO is a plist
 holding export options."
-  (let ((org-html-divs
-(if (equal (plist-get info :html-container) "li")
-(append '((content "ol" "content")) org-s5--divs)
-  org-s5--divs))
-(info (plist-put
+  (let ((info (plist-put
+  (plist-put
(plist-put info :html-preamble (plist-get info :s5-preamble))
-   :html-postamble (plist-get info :s5-postamble
+   :html-postamble (plist-get info :s5-postamble))
+  :html-divs (if (equal (plist-get info :html-container) "li")
+ (append '((content "ol" "content")) org-s5--divs)
+   org-s5--divs
 (mapconcat
  'identity
  (list
-- 
2.1.4





Re: [O] org-clock-is-active

2013-07-04 Thread Łukasz Stelmach
It was <2013-07-03 śro 19:40>, when Bastien wrote:
> l.stelm...@samsung.com (Łukasz Stelmach) writes:
>
>> (defun org-clock-is-active ()
>>   "Return non-nil if clock is currently running.
>> The return value is actually the clock marker."
>>   (marker-buffer org-clock-marker))
>>
>> Either the docstring is lying or the code does not do what it is said
>> to. (Or it is too late for me?)
>
> I don't understand, what is the problem exactly?

The docstring says the function returns a *marker*. The function does not
return org-clock-marker but only the buffer the clock is ticking in. You
can't:

(goto-char (org-clock-is-active))

which should be possible according to goto-char's docstring

(goto-char POSITION)

Set point to POSITION, a number or *marker*.

This is a minor inaccuracy, however, if you do not browse the code but
only look at functions docstring, you may loose a few minutes.

-- 
Łukasz Stelmach
Samsung R&D Institute Poland
Samsung Electronics



[O] org-clock-is-active

2013-07-03 Thread Łukasz Stelmach
Hi.

Please take a look at this.

--8<---cut here---start->8---
(defun org-clock-is-active ()
  "Return non-nil if clock is currently running.
The return value is actually the clock marker."
  (marker-buffer org-clock-marker))
--8<---cut here---end--->8---

Either the docstring is lying or the code does not do what it is said
to. (Or it is too late for me?)

Bug? Feature?

Kind regards,
-- 
Łukasz Stelmach
Samsung R&D Institute Poland
Samsung Electronics




Re: [O] Weekly clock reports for the previous or current week, with a per-day&project breakdown?

2013-07-02 Thread Łukasz Stelmach
It was <2013-07-02 wto 13:10>, when Steinar Bang wrote:
> Is it possible to get a clock report for the previous week (and the
> current week), with a breakdown of project and day? (this is how I need
> it to fill out my time sheets)
>
> Using Bernt Hansens instructions[1], I have been able to get the hours
> for the current month: C-c a < a v m b R (in the clock table at the
> bottom) 
>
> And by experimentation I have found that this does the same thing for
> the current week: C-c a < a b R
>
> The command here http://doc.norang.ca/org-mode.html#VerifyingClockData
> ie.: C-c a v m b v c
> sounds from the description like it could do what I want.

How about

+ entering the agenda: C-c a 

+ choosing week view: v w

+ going forward and backward with f and b (respectively)

+ toggling clockreport if needed: v R

You might also want to read about clocktables

http://orgmode.org/org.html#The-clock-table

-- 
Łukasz Stelmach
Samsung R&D Institute Poland
Samsung Electronics




Re: [O] finding a parent node

2013-07-02 Thread Łukasz Stelmach
It was <2013-07-02 wto 13:06>, when Thorsten Jolitz wrote:
> l.stelm...@samsung.com (Łukasz Stelmach) writes:
>
> Hello Lukasz, 
>
> assume my simple-test.org with a :TASK: tag:
>
> #+begin_src org
> * header 1
>   :PROPERTIES:
>   :CUSTOM_ID: XYZ22
>   :END:
> * header 2 :TASK:
>   [2013-06-28 Fr 11:01]
> ** subheader 1
> Some text
> ** subheader 2
>
> More text and a table
>
> | label  | col1 | col2 |
> |+--+--|
> | string | 3| 4|
>
> Text and a src-block
>
> #+begin_src emacs-lisp 
>  (+ 3 4)
> #+end_src
>
> #+end_src
>
>> With my point somewher deep I'like to find the closest parent heading
>> tagged :TASKS:.
>
> Lets move point to the source-block and get `org-element-context':
>
> #+begin_src emacs-lisp
> (with-current-buffer
> (find-file
>  "/path/to/simple-test.org")
> (goto-char (point-min))
> (org-babel-next-src-block)
> (message "%s" (point))
>  (format "%s"
>  (org-element-context)))
> #+end_src
> #+begin_quote
> "(src-block (:language emacs-lisp :switches nil :parameters nil :begin 319
>  :end 362 :number-lines nil :preserve-indent nil :retain-labels t :use-labels
>  t :label-fmt nil :hiddenp nil :value (+ 3 4) :post-blank 0 :post-affiliated
>  319 :parent nil))"
> #+end_quote
>
> too bad, does not work in isolated use, :parent is nil. Othewise one could
> get the parent(s) and check for the :TASK: tag. 
>
> So the only way to find this headline I know of would be:
>
> #+begin_src emacs-lisp
> (with-current-buffer
>   (find-file-noselect
>  "/path/to/simple-test.org")
>   (let ((tree (org-element-parse-buffer)))
>   (org-element-map tree 'headline
>(lambda (hl)
>  (and
>   (member "TASK" (org-element-property :tags hl))
>   (list (org-element-property :begin hl)
> (org-element-property :end hl)))
> #+end_src
>
> returns
>
> ,---
> | ((55 362))
> `---
>
> so you could at least find out if (point) is inside a headline with a :TASK:
> tag, then get this headline and use its attribute list to move to some place
> inside of it. 
>
> But I'm sure Nicolas can give you a much better solution (I would be
> interested in that solution too). 

This might be enough for me as I get the tree in the exporting
code.  However, this way is far from efficient. If only there was a way
to find the current element in the tree.

I am not sure yet, but a sequence of org-back-to-heading  and
re-search-backward inside a save-excursion may be the easiest way to
place the point where I want it.

Any other thoughts?
-- 
Łukasz Stelmach
Samsung R&D Institute Poland
Samsung Electronics




[O] finding a parent node

2013-07-02 Thread Łukasz Stelmach
Hello All.

What is the best way to iterate over ((great)*grand)?parent headlines of
the current one (at point), that meets some criteria.

--8<---cut here---start->8---
* Projects
  I am working on.

** Project for Mondays

*** tasks

*** resources

** Project for the rest of the week

*** tasks:TASKS:
^  <-- (3) I'd like it to move here
If I do this stuff I will rule the world.
 ^   <- (2) or it may be here.
 TODO do this  

 TODO do that  
 I am trying.
 ^ <-- (1) point is here
 TODO WAT?

*** resources
--8<---cut here---end--->8---

With my point somewher deep I'like to find the closest parent heading
tagged :TASKS:.

If that helps, I'd like to export the subtree of the heading I find by
simply running the export function at any point of the subtree.

Kind regards,
-- 
Łukasz Stelmach
Samsung R&D Institute Poland
Samsung Electronics




Re: [O] Release 7.5

2011-04-12 Thread Łukasz Stelmach
Bastien  writes:

> Dear all,
>
> here it is, release 7.5, my first release as Org's new maintainer.
[...]
> Version 7.5 
> 
>
> Incompatible changes 
> =
>
> `org-bbdb-anniversary-format-alist' has changed 
> 
>
> Please check the docstring and update your settings accordingly.

What's this about? I git blame org-bbdb.el and find no recent changes in
the docstring? There are som changes around where the variable is used
but they are not too obvious.

-- 
Miłego dnia,
Łukasz Stelmach




[Orgmode] [PATCH] sexp can set its face (was: Including current time in agenda)

2010-12-09 Thread Łukasz Stelmach
suvayu ali  writes:

> I actually tried to set the text properties for the string instead,
> but looks like org-agenda is ignoring that.
>
> (defun jd:org-current-time ()
>   "Return current-time if date is today."
>   (when (equal date (calendar-current-date))
> (propertize (format-time-string "%H:%M Current time") 'font-lock-face
>   '(:weight bold :foreground "DodgerBlue4" :background "snow"

To accomplish this you'd have to apply the following patch and use 'face
property rather than font-lock-face.

Why can't a sexp choose its 'face after all?

--8<---cut here---start->8---
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 20c901a..ba5eafc 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -4650,8 +4650,7 @@ the documentation of `org-diary'."
 (defun org-agenda-get-sexps ()
   "Return the sexp information for agenda display."
   (require 'diary-lib)
-  (let* ((props (list 'face nil
- 'mouse-face 'highlight
+  (let* ((props (list 'mouse-face 'highlight
  'help-echo
  (format "mouse-2 or RET jump to org file %s"
      (abbreviate-file-name buffer-file-name
--8<---cut here---end--->8---

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] [PATCH] displaymath environment and MathJax

2010-12-07 Thread Łukasz Stelmach
Greetings All.

The following patch makes MathJax consider \begin{displaymath} and
\end{displaymath} as math environmetn boundaries. For someone who, like
me, keeps "The not so short introduction to LaTeX2e" alway around, the
displaymath environment is the default way to introduce a block of math.

In fact '\[' and '\]' are also mentioned there but the environment is
used in every single example so the patch minimizes the surprise.

--8<---cut here---start->8---
diff --git a/lisp/org-html.el b/lisp/org-html.el
index d1fe06d..2380c12 100644
--- a/lisp/org-html.el
+++ b/lisp/org-html.el
@@ -290,7 +290,7 @@ You can also customize this for each buffer, using 
something like
  \"TeX/noUndefined.js\"],
 tex2jax: {
 inlineMath: [ [\"(\",\")\"] ],
-displayMath: [ ['$$','$$'], [\"[\",\"]\"] ],
+displayMath: [ ['$$','$$'], [\"[\",\"]\"], 
[\"begin{displaymath}\",\"end{displaymath}\"] ],
 skipTags: 
[\"script\",\"noscript\",\"style\",\"textarea\",\"pre\",\"code\"],
 ignoreClass: \"tex2jax_ignore\",
 processEscapes: false,
--8<---cut here---end--->8---

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] [nd]oexport for org-publish-attachment

2010-11-27 Thread Łukasz Stelmach
Hello.

I am willing to implement some kind of tagging for attachment files for
publishing. For text we've got the :noexport: tag which prevents
particular subtree from beeing published I'd like to have the same for
files, especially stored as attachments under data/, published with
org-publish-attachments. IMHO there should be a way to tag a directory
tree as exportable and individual files as unexportable and the other
way round.

How should this be done? Brainstorm!

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] Re: Store link in message mode

2010-11-20 Thread Łukasz Stelmach
Tassilo Horn  writes:

> Łukasz Stelmach  writes:
>
>>>> If you think --despite of those issues-- it's worth adding the
>>>> creation of gnus links while in message mode I could provide a
>>>> patch.
>>>
>>> I'm curious how you are able to determine where a message will be
>>> filed after sending it off.  I mean, you neither have the Message-Id
>>> at that point (unless that's added to
>>> `message-generate-headers-first'), nor do you know the correct group,
>>> at least if there are more than one in the Gcc header.
>>
>> There is a facility in Gnus called 
>> which I havn't investigated yet but it looks promising. From what I've
>> browsed the info it looks like it registers all the message ids and
>> remembers the folders. So it would be enough to remember the MID and
>> then make Gnus find it.
>
> ,[ (info "(gnus)Registry Article Refer Method") ]
[...]
> `

I haven't seen this piece yet. Interesting.

> But I think a user needs to enable that explicitly, so one cannot rely
> on this feature being available...  And the user has to setup
> `gnus-refer-article-method' properly...

And install Gnus and Emacs too ;-) Of course the default setup not
necessarily provide for what we are talking about. But it doesn't either
way and the registry looks as a cleaner solution (however, I am not sure
yet how to set it up on several machines in parallel) then noting Gcc
during sending. There is no simple solution to this. By simple I mean
"available without touching anything ousite org-mode". Theoretically
org-mode could implement a function that searches through Gnus' database
but thats against the DRY principle since such code itself exists in
Gnus it just needs to be configured.

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] Re: Store link in message mode

2010-11-16 Thread Łukasz Stelmach
Tassilo Horn  writes:

> Ulf Stegemann  writes:
>
>> If you think --despite of those issues-- it's worth adding the
>> creation of gnus links while in message mode I could provide a patch.
>
> I'm curious how you are able to determine where a message will be filed
> after sending it off.  I mean, you neither have the Message-Id at that
> point (unless that's added to `message-generate-headers-first'), nor do
> you know the correct group, at least if there are more than one in the
> Gcc header.

There is a facility in Gnus called 
which I havn't investigated yet but it looks promising. From what I've
browsed the info it looks like it registers all the message ids and
remembers the folders. So it would be enough to remember the MID and
then make Gnus find it.

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] Re: [BUG] ob-sqlite.el, -init doesn't work with some options

2010-11-10 Thread Łukasz Stelmach
"Eric Schulte"  writes:

> Łukasz Stelmach  writes:
>
>> ob-sqlite.el uses -init option to provide sqlite with a src block
>> content, however, this prevetns sevarl options' from taking an
>> effect. Particularly -header (and it's opposite), -csv and -header
[...]
> Thanks for mentioning this issue and for posting a workaround.
>
> Would you suggest a different method of passing the body of a sqlite
> code block to the sqlite command?  The only other options which
> immediately occurs to me would involve =cat='ing the body of the code
> block through a pipe to the sqlite command (which would probably only
> work on unix systems).

I think this is the way we are supposed to do this from sqlite's point
of view as -init is rather somthing like rc file that prepares the
envioronment for further work. As far as cat(1) is concerned, please
remember that windows is alergic and doesn't keep one, it holds =type=.
IMHO the cleanest way of pushing commands to Emacs' child's stdin is
=shell-command-on-region=, which should work on every OS Emacs works.

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] [BUG] ob-sqlite.el, -init doesn't work with some options

2010-11-09 Thread Łukasz Stelmach
Hello.

ob-sqlite.el uses -init option to provide sqlite with a src block
content, however, this prevetns sevarl options' from taking an
effect. Particularly -header (and it's opposite), -csv and -header
Create a database, put a SELECT into a file and compare the effects of
the following commands

sqlite3 -init file.sql -header -separator ';' -csv db.sqlite

cat file.sql | sqlite3 -header -separator ';' -csv db.sqlite

A walkaround is to place desired configration commands (the onse
beginning with a dot in sqlite) in the src block, e.g:

#+BEGIN_SRC sqlite :db passwords.sqlite :results replace
.separator |
.mode csv
select * from myusers;
#+END_SRC


-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] Re: [BUG] tabel is not sent

2010-11-09 Thread Łukasz Stelmach
Carsten Dominik  writes:

> Hi Lukasz,
>
> On Nov 9, 2010, at 9:54 AM, Łukasz Stelmach wrote:
>
>> Hello.
>>
>> At least to me it looks like a bug. I can't send tabel to a receive
>> destination in org-mode with C-c C-c. I have to M-x
>> orgtbl-ctrl-c-ctrl-c.
>>
>> org-version: 7.01trans (few weks old one)
>
> Could you please try the following patch?

That's better now :-)
-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] [BUG] tabel is not sent

2010-11-09 Thread Łukasz Stelmach
Hello.

At least to me it looks like a bug. I can't send tabel to a receive
destination in org-mode with C-c C-c. I have to M-x
orgtbl-ctrl-c-ctrl-c.

org-version: 7.01trans (few weks old one)

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] Re: publishing a drawer

2010-11-06 Thread Łukasz Stelmach
Christian Moe  writes:

> On 11/3/10 12:48 PM, Łukasz Stelmach wrote:
>> Hello.
>>
>> Is it possible to publish drawer's content during export (both HTML and
>> LaTeX)? I am creating a presentation with S5 and I'd love to have
>> :LOGBOOK: (or :NOTES:) published as  (or
>> \note{} for Beamer).
>>
>
> The following ought to work, but doesn't for Latex. Code improvements
> welcome.
>
> * Set option to include drawers in export
>
> : #+OPTIONS: d:t
>
> For some reason, this doesn't work for me with Latex export. I've
> filed a bug report.
>
> * Customize drawer export
>
> Make org-export-format-drawer-function point to a custom function,
> e.g. like this for your exact case (improvements welcome):
>
> #+begin_src emacs-lisp
>   (defun my-org-export-format-drawer (name content backend)
[...]

Looks quite promising :-) I will surely try it. Thanks.

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] publishing a drawer

2010-11-03 Thread Łukasz Stelmach
Hello.

Is it possible to publish drawer's content during export (both HTML and
LaTeX)? I am creating a presentation with S5 and I'd love to have
:LOGBOOK: (or :NOTES:) published as  (or
\note{} for Beamer).

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] Re: Release 7.02

2010-10-29 Thread Łukasz Stelmach
Carsten Dominik  writes:

>>> Make footnotes work correctly in message-mode
>>> ==
>>> The footnotes code now searches for the message delimiter "--" in
>>> order to
>>> place footnotes before the signature. Thanks to Tassilo Horn for
>>> this patch.
>>
>> Just a detail: the delimiter is "-- " (space after the dashes).
>
> Really?  Is that the official delimiter?  I never knew.

I suppose so, it's mentioned in the RFC[1]

[1] http://tools.ietf.org/html/rfc3676#section-4.3
-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] Re: Release 7.02

2010-10-29 Thread Łukasz Stelmach
Carsten Dominik  writes:

> Lists of anniversaries are now handeled better
> ===
>
> When several anniversaries are defined in the bbdb anniversaries
> field (separated by semicolon), this is now handled nicely by the
> agenda.
>
> Thanks to Lukasz Setmann for a patch to this effect.
^^
Who's that guy? ;-)

BTW. according to the docstring of org-bbdb-anniversary-field multiple
anniversaries for one contact are separated with "\n". Semicolon had
been used in org-bbdb-anniversaries (until I created the patch) to join
different anniversaries, possibly from different contacts, occuring on
the same day to display them as a single line in the agenda view.

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] Re: epresent and Org-mode: using Emacs to run presentations of Org-mode docs

2010-10-29 Thread Łukasz Stelmach
Eric S Fraga  writes:

> Łukasz Stelmach  writes:
>
>> [...]
>
>> S5 and other HTML slide show frameworks have (at least) one great
>> advantage over Beamer, one can embed (there are at least two ways) SVG
>> image, which is quite hard with LaTeX/Beamer duo (is there any
>> command-line tool to convert SVG to EPS/PDF?)
>
> ImageMagick [1] will convert from/to SVG to/from many formats including
> EPS.  I've not tried any conversions with SVG, mind you, so this is
> based on the documentation.
>

I'll check it, but I'm afraid it does render SVG as bitmap first,
and then "converts", or rather encapsulates, it to EPS/PDF. ImageMagick
is a bitmap manipulation tool after all.

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] Re: epresent and Org-mode: using Emacs to run presentations of Org-mode docs

2010-10-28 Thread Łukasz Stelmach
"Eric Schulte"  writes:

> Łukasz Stelmach  writes:
>
>> Richard Riley  writes:
>>
>>> "Eric Schulte"  writes:
>>>
>>>> Phil Hagelberg recently introduced me to epresent.el by Tom Tromey.
>>>> It's a very nice little utility for giving presentations using Emacs as
>>>> the display engine.
>> [...]
>>>> http://github.com/eschulte/epresent
>>>> (instructions in the README)
>>>
>>> If anyone missed it, there is also emacs-muse-slidy.
>>>
>>> http://www.flickr.com/photos/arciniegas/5108022392/
>>>
>>> That is very impressive.
>>
>> Not bad. But there is org-s5 too.
>>
>> http://github.com/sigma/org-s5
>
> Oh cool, this is the first I've seen of S5 or org-S5.

If you check the latest beta of S5 (not org-s5) there is even cooler
feature. You can open a separete window with notes (
how to export a :NOTES: drwer into a div?) and *timers*, so it
is quite comfortable for a real dual head set up.

> I think I'll probably stick with Beamer export for my serious
> presentations, but I like the idea and simplicity of being to run simple
> presentations directly from within Emacs.

S5 and other HTML slide show frameworks have (at least) one great
advantage over Beamer, one can embed (there are at least two ways) SVG
image, which is quite hard with LaTeX/Beamer duo (is there any
command-line tool to convert SVG to EPS/PDF?)
-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] Re: organizing =intra-day tasks= with a countdown timer

2010-10-28 Thread Łukasz Stelmach
Samuel Wales  writes:

>   2) You are also making tea right now.  You want a reminder
>  in 5m to drink it.

So true ;-) ICRBIDWT[*]

-- 
Miłego dnia,
Łukasz Stelmach

[*] I could refrain but I didn't want to ;-)


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


[Orgmode] Re: epresent and Org-mode: using Emacs to run presentations of Org-mode docs

2010-10-28 Thread Łukasz Stelmach
"Eric Schulte"  writes:

> Phil Hagelberg recently introduced me to epresent.el by Tom Tromey.
> It's a very nice little utility for giving presentations using Emacs as
> the display engine. 
[...]
> http://github.com/eschulte/epresent
> (instructions in the README)

I am preparing a talk about org-mode. I've decided to use org-s5 but
I'm starting to hesitate :-)

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] Re: epresent and Org-mode: using Emacs to run presentations of Org-mode docs

2010-10-28 Thread Łukasz Stelmach
Richard Riley  writes:

> "Eric Schulte"  writes:
>
>> Phil Hagelberg recently introduced me to epresent.el by Tom Tromey.
>> It's a very nice little utility for giving presentations using Emacs as
>> the display engine.
[...]
>> http://github.com/eschulte/epresent
>> (instructions in the README)
>
> If anyone missed it, there is also emacs-muse-slidy.
>
> http://www.flickr.com/photos/arciniegas/5108022392/
>
> That is very impressive.

Not bad. But there is org-s5 too.

http://github.com/sigma/org-s5

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] Re: [PATCH] quote the real csv separator

2010-10-25 Thread Łukasz Stelmach
Carsten Dominik  writes:

> On Oct 25, 2010, at 10:45 AM, Łukasz Stelmach wrote:
>> OR, if you think that CSV should stay as it is then I
>> suggest such a rewrite:
>>
>> (defun orgtbl-to-csv (table params)
>>  (orgtbl-to-generic table (org-combine-plists
>>params
>>  '(:sep "," :fmt org-quote-csv-field
>>
>> to make CSV :sep and and :fmt mandatory (that's how this all have
>> starded).
>
> I don't understand, here is the current definition of orgtbl-to-csv:
>
> (defun orgtbl-to-csv (table params)
>   "Convert the orgtbl-mode table to CSV material.
> This does take care of the proper quoting of fields with comma or
> quotes."
>   (orgtbl-to-generic table (org-combine-plists
>   '(:sep "," :fmt org-quote-csv-field)
>   params)))
>
> so these are mandatory.  I guess I do not understand what you are
> saying.

OK, try to eval these:

(let ((params '(:sep "|")))
  (org-combine-plists
'(:sep "," :fmt org-quote-csv-field)
    params))

(let ((params '(:sep "|")))
  (org-combine-plists
params
'(:sep "," :fmt org-quote-csv-field)))

The latter prevents :sep from being overriden.

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] Re: [PATCH] quote the real csv separator

2010-10-25 Thread Łukasz Stelmach
Bernt Hansen  writes:

> Łukasz Stelmach  writes:
>> Carsten Dominik  writes:
>>> What use case do you have in mind?
[...]
>> My bank lets me download monthly reports as CSV. In fact they let me
>> choose the separator and the default value is the comma. But I choose
>> '|' because then I can open the csv as org file and just do
>>
>> (replace-regexp "^" "|")
>>
>> to get a beautiful org-mode table.
>
> There is an easier org-mode way I think.  Just get the comma delimited
> data into your org file, select the region and C-c | to get your table.
>
> If you are inserting an external file with C-x i  RET
> then C-x C-x marks the region and C-c | converts it to a table.

Cool :-) It works like charm. I'll have to check how to convert decimal
commas to periods. I still like '|' more for my perl script, though,
because it's enough to split '\|' and not care about quoted commas. But
this is my problem.

OK, I won't insist on keeping the patch but I would like to get a
rationale of :sep parameter in orgtbl-to-generic without a choice of how
to quote it. OR, if you think that CSV should stay as it is then I
suggest such a rewrite:

(defun orgtbl-to-csv (table params)
  (orgtbl-to-generic table (org-combine-plists
params
    '(:sep "," :fmt org-quote-csv-field

to make CSV :sep and and :fmt mandatory (that's how this all have starded).

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] Re: [PATCH] unicode nbsp in org-emphasis-regexp-components

2010-10-24 Thread Łukasz Stelmach
Carsten Dominik  writes:

> On Oct 23, 2010, at 12:39 AM, Łukasz Stelmach wrote:
>
>> The Unicode contains a NON-BREAK SPACE character at position 0xA0.
>> IMHO org-mode's emphasis code should by default treat this (any
>> other?) character the same as normal space. When i write:
>>
>>It was a /big bang/.
>>
>> I'd like the "big bang" to be put in italic especially when exported
>> to HTML. (I don't know if it goes properly through all the mailing
>> systems but I put the "\u00A0" between "a" and "/" above.)
>>
[...]
>>
>
> I am aftraid that this will break flavors of Emacs which do not
> support unicode characters, like Emacs 22.  Org-mode still supports
> Emacs 22.  And I do not know how to write this in a way that it
> will remaind compatible. Do you?

How about simply checking the Emacs version? 

(defcustom org-emphasis-regexp-components
  (if (<= 23 (string-to-number (car (split-string emacs-version "\\."
  '(" \t('\"{\u00A0" "- \t.,:!?;'\")}\\" " \t\r\n,\"'" "." 1)
'(" \t('\"{" "- \t.,:!?;'\")}\\" " \t\r\n,\"'" "." 1))
[...]

The problem with earlier version is that although most, if not all, ISO
Latin pages put `NO-BREAK SPACE' at 0xA0 some may use different
codepages. But they can do this also in newer Emacsen if they haven't
converted their files yet, can't they?

If you think putting `A0' in that regexp may break things, then I'd
suggest putting a note about it somewhere for people who'd like to
customise it for themselves.

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] Re: [PATCH] quote the real csv separator

2010-10-24 Thread Łukasz Stelmach
Carsten Dominik  writes:

> On Oct 24, 2010, at 12:56 AM, Łukasz Stelmach wrote:
>
>> I'd rather use an optional sep argument to the org-quote-csv-field
>> function but I've got no idea how to stick it into the orgtbl-apply-
>> fmt. However, the quoting function should use current rather then
>> assume comma.
>>
[...]
>>
> thanks for the patch, but I do not understand it.
>
> The separator for csv is always the comma, or am I wrong here?

A bit. The fact is that both OpenOffice (i've just checked) and
Microsoft Office (I am almost 100% sure) allow to choose the separator
upon export. And org-mode also allows it with radio tables with the :sep
parameter (which is passed to the generic exporter).

> So this function should use comma, hard-coded.  The only place
> where it is used is when orgtbl-to-csv calls the generic
> exporter.  It does so with comma as separator and with
> org-quote-csv-field as formatting function.
>
> What use case do you have in mind?

For me in particular? This is quite complicated ;-) And if you decide to
reject the patch I will understand. (Read only I you have some time to
waste ;)

My bank lets me download monthly reports as CSV. In fact they let me
choose the separator and the default value is the comma. But I choose
'|' because then I can open the csv as org file and just do

(replace-regexp "^" "|")

to get a beautiful org-mode table.

The reports from the bank are prepared for each account independently.
When I transfer money between them I get entries in two reports. To get
rid of this mess I decided to write a perl programme and I do it. And I
prepare test data as radio tables and export them using pipe (yeah I
know, this doesn't make a good point in favour of my patch) because...
I prefer to manipulate all my bank report data with org-mode as tables.

*My* use case isn't very good, is it?

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] Re: [PATCH] sexp may retrurn a list

2010-10-24 Thread Łukasz Stelmach
Łukasz Stelmach  writes:

> I've disovered, that %%(org-bbdb-anniversaries) returns (as every other
> sexp) a string. Which is OK if there is only one.
>
>   Anniversaries:  John Doe's 10th wedding anniversary
>
> Unfortunately the agenda view becomes awful if we have noted Jane's
> weeding date too 
>
>   Anniversaries:  John Doe's 10th wedding anniversary; Jane Doe's 10th 
> wedding anniversary
>
> And what if we know 3 Eves and 5 Adams and it's Christmas Eve? (Hint:
> their name day)
[...]

As Thomas Bauman pointed out, there are functions that can be used in
sexps which return cons cells like this

(nil . "Full Moon 3:35am (CEST)")

(this one is diary-lunar-phases), these aren't properly supported by the
previous version of my patch. This one can distinguish between such a
cons cell and a "real" list.

("John Doe's 10th wedding anniversary"
 "Jane Doe's 10th wedding anniversary")

This is because

(consp (cdr '(a . b))) ; => nil

so org-diary-sexp-entry can be made return (cdr result) only in case of
the former cons cell. The third condition in the `cond' block is IMHO
enough as it is now, but if you think adding

(listp (cdr result)) 

may help then be it.

--8<---cut here---start->8---
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index ede62e8..8544a62 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -4499,17 +4499,20 @@ the documentation of `org-diary'."
category (org-get-category beg)
todo-state (org-get-todo-state))
 
- (if (string-match "\\S-" result)
- (setq txt result)
-   (setq txt "SEXP entry returned empty string"))
-
- (setq txt (org-format-agenda-item
- "" txt category tags 'time))
- (org-add-props txt props 'org-marker marker)
- (org-add-props txt nil
-   'org-category category 'date date 'todo-state todo-state
-   'type "sexp")
- (push txt ee
+ (dolist (r (if (stringp result)
+(list result)
+  result)) ;; we expect a list here
+   (if (string-match "\\S-" r)
+   (setq txt r)
+ (setq txt "SEXP entry returned empty string"))
+
+   (setq txt (org-format-agenda-item
+  "" txt category tags 'time))
+   (org-add-props txt props 'org-marker marker)
+   (org-add-props txt nil
+ 'org-category category 'date date 'todo-state todo-state
+ 'type "sexp")
+   (push txt ee)
 (nreverse ee)))
 
 (defun org-diary-class (m1 d1 y1 m2 d2 y2 dayname &rest skip-weeks)
diff --git a/lisp/org-bbdb.el b/lisp/org-bbdb.el
index 53514f7..0d3134d 100644
--- a/lisp/org-bbdb.el
+++ b/lisp/org-bbdb.el
@@ -338,8 +338,7 @@ This is used by Org to re-create the anniversary hash 
table."
 (setq text (append text (list tmp)))
   (setq text (list tmp)
 ))
-(when text
-  (mapconcat 'identity text "; "
+text))
 
 (defun org-bbdb-complete-link ()
   "Read a bbdb link with name completion."
diff --git a/lisp/org.el b/lisp/org.el
index b482b8e..c1d4e7d 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -15024,7 +15024,10 @@ D may be an absolute day number, or a calendar-type 
list (month day year)."
  (sleep-for 2))
 (cond ((stringp result) result)
  ((and (consp result)
+   (not (consp (cdr result)))
(stringp (cdr result))) (cdr result))
+ ((and (consp result)
+   (stringp (car result))) result)
  (result entry)
   (t nil
 
--8<---cut here---end--->8---


-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] [PATCH] quote the real csv separator

2010-10-23 Thread Łukasz Stelmach
Hi.

I'd rather use an optional sep argument to the org-quote-csv-field
function but I've got no idea how to stick it into the orgtbl-apply-fmt.
However, the quoting function should use current rather then assume
comma.

--8<---cut here---start->8---
diff --git a/lisp/org.el b/lisp/org.el
index b482b8e..501dd8d 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -18019,7 +18019,7 @@ With prefix arg UNCOMPILED, load the uncompiled 
versions."
 
 (defun org-quote-csv-field (s)
   "Quote field for inclusion in CSV material."
-  (if (string-match "[\",]" s)
+  (if (string-match (concat "[\"" *orgtbl-sep* "]") s)
   (concat "\"" (mapconcat 'identity (split-string s "\"") "\"\"") "\"")
 s))
 
--8<---cut here---end--->8---

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] [PATCH] unicode nbsp in org-emphasis-regexp-components

2010-10-22 Thread Łukasz Stelmach
Hi.

The Unicode contains a NON-BREAK SPACE character at position 0xA0. IMHO
org-mode's emphasis code should by default treat this (any other?)
character the same as normal space. When i write:

It was a /big bang/.

I'd like the "big bang" to be put in italic especially when exported to
HTML. (I don't know if it goes properly through all the mailing systems
but I put the "\u00A0" between "a" and "/" above.)

--8<---cut here---start->8---
diff --git a/lisp/org.el b/lisp/org.el
index 6ea9d25..b8cd38e 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -3419,7 +3419,7 @@ After a match, the match groups contain these elements:
"\\([" post  "]\\|$\\)")
 
 (defcustom org-emphasis-regexp-components
-  '(" \t('\"{" "- \t.,:!?;'\")}\\" " \t\r\n,\"'" "." 1)
+  '(" \t('\"{\u00A0" "- \t.,:!?;'\")}\\" " \t\r\n,\"'" "." 1)
   "Components used to build the regular expression for emphasis.
 This is a list with 6 entries.  Terminology:  In an emphasis string
 like \" *strong word* \", we call the initial space PREMATCH, the final
--8<---cut here---end--->8---

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] Re: org-crypt and org-mobile-crypt; user info?

2010-10-21 Thread Łukasz Stelmach
Magnus Nilsson  writes:

> 1. Encrypt a "password-table" I keep in an org-file when saved to disk,
> while text would be plain in the buffer. (Best if it can be "transparent"
> without passwords, but that is not a must.)

With Emacs the best way IMHO to do it is use GnuPG/epg directly. You do it by
simply naming a new file with an additional .gpg extension after the
real one (.org in our case). So simply

C-x C-f password-table.org.gpg RET

and choose yourself as the recipient of the ciphertext

There are two main advantage of this solution

1. you can access the table without running emacs (with an ssh client on
your mobile?) by simply runnig

gpg < password-table.org

on the command line.

2. Emacs runs gnupg completely seamlessly (if you run gpg-agent which
caches the passphrases)

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] Re: Org-Mode as authoring tool for Moodle courses

2010-10-21 Thread Łukasz Stelmach
Gruenderteam Berlin  writes:

> Hello,
> beeing still in the process of learning the amazing org-mode,

This never ends ;-)

> I wonder if somebody has tried to use org-mode's publishing capacities
> as an authoring tool for the Online Learning Platform Moodle

We had tried to use moodle at our division before I learnt about
org-mode, and frankly speaking I didn't like moodle that much. Today, I
prepare and publish my courses with org-mode as standalone
web-pages. Considering endless capabilities and flexibility of org-mode,
moodle just scares me. Take for example grading. Org's spreadsheet
(or column-view, I have to try it out myself) is by far more convenient
to use than moodles tables. OK, that's enough, I suppose you'd like to
read something more constructive.

As I said I haven't done this myself but this is how I imagine this can
be done, here and now with as little elisp coding as possible.

1. Create org files in a directory structure resembling the structure of
   the SCORM zip file. That's obvious.
2. Set up a publishing project [[info:org:Publishing]]
3. Add "static" content (scripts, images) that will be published with
   org-publish-attachment function.
4. Create a script (this might imho be a shell script) that generates
   manifest file. Launch it after publishing using :completion-function
   project parameter. The script may create a zip file too. And upload
   it... too ;-)

What I don't know (as I browse through a SCORM zip for the second time
in my life) is what are all xsd files for and how to create them. Are
they optional? Does their content depend on the contents of the course?
If it does then elisp coding might be inevitable, however, since org
generates XHTML it can be reliably parsed with some external tools.

If I had to use moodle today I definitely would use org-mode for html
authoring: exporting to a temporary HTML buffer and then c'n'p to a
browser window.

I know that's not much but I hope I wrote something you haven't known
already or at least I give you a new idea how to put things together.

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] [PATCH] sexp may retrurn a list

2010-10-19 Thread Łukasz Stelmach
Hi.

I've disovered, that %%(org-bbdb-anniversaries) returns (as every other
sexp) a string. Which is OK if there is only one.

  Anniversaries:  John Doe's 10th wedding anniversary

Unfortunately the agenda view becomes awful if we have noted Jane's
weeding date too 

  Anniversaries:  John Doe's 10th wedding anniversary; Jane Doe's 10th wedding 
anniversary

And what if we know 3 Eves and 5 Adams and it's Christmas Eve? (Hint:
their name day)

So i decided to introduce little modifications so that a sexp may return
a list of strings and org-agenda-get-sexps and org-diary-sexp-entry
functions accept that. I've modified org-bbdb-anniversaries too, so it
returns a list no matter how many anniversaries there are on a
particular day.

It looks better now, doesn't it?

  Anniversaries:  John Doe's 10th wedding anniversary
  Anniversaries:  Jane Doe's 10th wedding anniversary

The patch is backward compatible of course and if a sexp returns a
string than the output is the same as it used to be.

Behold The Patch:

--8<---cut here---start->8---
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index ede62e8..8544a62 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -4499,17 +4499,20 @@ the documentation of `org-diary'."
category (org-get-category beg)
todo-state (org-get-todo-state))
 
- (if (string-match "\\S-" result)
- (setq txt result)
-   (setq txt "SEXP entry returned empty string"))
-
- (setq txt (org-format-agenda-item
- "" txt category tags 'time))
- (org-add-props txt props 'org-marker marker)
- (org-add-props txt nil
-   'org-category category 'date date 'todo-state todo-state
-   'type "sexp")
- (push txt ee
+ (dolist (r (if (stringp result)
+(list result)
+  result)) ;; we expect a list here
+   (if (string-match "\\S-" r)
+   (setq txt r)
+ (setq txt "SEXP entry returned empty string"))
+
+   (setq txt (org-format-agenda-item
+  "" txt category tags 'time))
+   (org-add-props txt props 'org-marker marker)
+   (org-add-props txt nil
+ 'org-category category 'date date 'todo-state todo-state
+ 'type "sexp")
+   (push txt ee)
 (nreverse ee)))
 
 (defun org-diary-class (m1 d1 y1 m2 d2 y2 dayname &rest skip-weeks)
diff --git a/lisp/org-bbdb.el b/lisp/org-bbdb.el
index 53514f7..0d3134d 100644
--- a/lisp/org-bbdb.el
+++ b/lisp/org-bbdb.el
@@ -338,8 +338,7 @@ This is used by Org to re-create the anniversary hash 
table."
 (setq text (append text (list tmp)))
   (setq text (list tmp)
 ))
-(when text
-  (mapconcat 'identity text "; "
+text))
 
 (defun org-bbdb-complete-link ()
   "Read a bbdb link with name completion."
diff --git a/lisp/org.el b/lisp/org.el
index 6ea9d25..62ccf1c 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -15020,7 +15020,7 @@ D may be an absolute day number, or a calendar-type 
list (month day year)."
  (org-current-line)
  (buffer-file-name) sexp)
  (sleep-for 2))
-(cond ((stringp result) result)
+(cond ((or (listp result) (stringp result)) result)
  ((and (consp result)
(stringp (cdr result))) (cdr result))
  (result entry)
--8<---cut here---end--->8---


-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] Re: [BUG] define "just", preamble and postamble placement

2010-10-13 Thread Łukasz Stelmach
Nick Dokos  writes:

> Łukasz Stelmach  wrote:
>
>
>> |---+-|
>> | Preamble|
>> |---+-|
>> |   | |
>> | Content   | TOC |
>> |   | |
>> |---+-|
>> | Postamble   |
>> |---+-|
>> 
>> I'd like to have a layout like the above one, with (pre|post)ambles of
>> full width (or at least as wide a the content + TOC). With the present
>> layout preamble and postamble are siblings to TOC and the text and I
>> can't get the desired layout.
>> 
[...]
> If you are willing to write some CSS, I think it's quite possible to get
> the layout you want (but you may need to add e.g. ids to various
> elements in the HTML - I haven't looked at the HTML that org produces in
> any detail to see what it puts in and what it leaves out).  In
> particular, I don't think that the parent/sibling structure of the DOM
> tree limits you in any way as far as the layout goes: the  id="content"> just gives you a different containing block element; if it
> wasn't there, the  element would be the containing block element -
> but does that really make much difference? And if the preamble/postamble
> were outside the div, the tree structure would be different but so what?
> Minor adjustments in the CSS would take care of it, I should think.
>
> But as I said, I'm no expert and I may very well be mistaken.

But it looks you're right. It seems like it's easier to tweak the CSS
than the HTML structure, while still getting the same visual results. At
least as far as such simple layouts as Ordinaire[1] are concerned.


[1] http://www.freecsstemplates.org/preview/ordinaire/

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] Re: [BUG] define "just", preamble and postamble placement

2010-10-07 Thread Łukasz Stelmach
Nick Dokos  writes:

> Łukasz Stelmach  wrote:
>
>
>> The docstrings for org-export-html-(pre|post)amble say
>> 
>> (Pre|Post)amble, to be inserted just (after|befor) .
>> 
>> This means that they should go before and after (respectively) > id="content"> and its . Am I right?
>> 
>
> Warning: I'm not an expert. I think the reason that they are inside the
>   is so that they can get whatever style
> the CSS gives this . If they were outside, then you would have to
> modify the CSS to get at them (maybe by defining a body style).

This is feasible and quite common.

> Does it matter? Is the placement inside the  causing you
> difficulties? The preamble still comes before any "real" content
> and similarly for the postamble.

|---+-|
| Preamble|
|---+-|
|   | |
| Content   | TOC |
|   | |
|---+-|
| Postamble   |
|---+-|

I'd like to have a layout like the above one, with (pre|post)ambles of
full width (or at least as wide a the content + TOC). With the present
layout preamble and postamble are siblings to TOC and the text and I
can't get the desired layout.

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] [BUG] define "just", preamble and postamble placement

2010-10-07 Thread Łukasz Stelmach
Hello.

The docstrings for org-export-html-(pre|post)amble say

(Pre|Post)amble, to be inserted just (after|befor) .

This means that they should go before and after (respectively)  and its . Am I right?

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] Re: portable absolute links in HTML export

2010-10-07 Thread Łukasz Stelmach
Łukasz Stelmach  writes:

> Łukasz Stelmach  writes:
>
> In the main index.org i put
>
> #+LINK examplewww: file:
>
> and in the others
>
> #+LINK examplewww: file:../
>
> and it works :-)

As long as I don't use #+SETUPFILE.

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] Re: portable absolute links in HTML export

2010-10-07 Thread Łukasz Stelmach
Łukasz Stelmach  writes:

> Carsten Dominik  writes:
>
>> On Oct 7, 2010, at 2:21 PM, Łukasz Stelmach wrote:
>>
>>> Is there a simple way to create hyperlinks with *absolute* paths that
>>> would work after both: simple file export (C-c C-e h) and publishing
>>> on
>>> a remote server (C-c C-e F). I'd like to create a _menu.org file that
>>> contains some navigation links and #+INCLUDE: it (BTW. M-Tab can't
>>> complete #+INC) in every single file I create and publish.
>>
>> Maybe you can use link abbreviations and define the abbreviation
>> differently for both cases.
>
> Any suggestion where/when can I automatically alter
> org-link-abbrev-alist for each of export procedures. 

No need to :-) In the main index.org i put

#+LINK examplewww: file:

and in the others

#+LINK examplewww: file:../

and it works :-)

Thanks a lot.
-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] Re: portable absolute links in HTML export

2010-10-07 Thread Łukasz Stelmach
Carsten Dominik  writes:

> On Oct 7, 2010, at 2:21 PM, Łukasz Stelmach wrote:
>
>> Is there a simple way to create hyperlinks with *absolute* paths that
>> would work after both: simple file export (C-c C-e h) and publishing
>> on
>> a remote server (C-c C-e F). I'd like to create a _menu.org file that
>> contains some navigation links and #+INCLUDE: it (BTW. M-Tab can't
>> complete #+INC) in every single file I create and publish.
>
> Maybe you can use link abbreviations and define the abbreviation
> differently for both cases.

Any suggestion where/when can I automatically alter
org-link-abbrev-alist for each of export procedures. Creating wrappers
around org-export-as-html* and org-publish* looks easy, except I'd have
to make my own copy of org-export to call them. Of course editing #+LINK
is also a not so bad option.

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] portable absolute links in HTML export

2010-10-07 Thread Łukasz Stelmach
Hello.

Is there a simple way to create hyperlinks with *absolute* paths that
would work after both: simple file export (C-c C-e h) and publishing on
a remote server (C-c C-e F). I'd like to create a _menu.org file that
contains some navigation links and #+INCLUDE: it (BTW. M-Tab can't
complete #+INC) in every single file I create and publish.

The problem now looks like there should be separete _menu.org files for
each directory if I want to use relative paths in the menu links, that
work after local (C-c C-e h) and remote (C-c C-e h) export. When I put
absolute paths that work on

Let's say I've got a structure like this

~/WWW/index.org
~/WWW/_menu.org
~/stuff/index.org
~/things/index.org
~/problems/index.org

after publishing the index.org files are available at:

http://example.com/~stl/
http://example.com/~stl/stuff/
http://example.com/~stl/things/
http://example.com/~stl/problems/

respectively.

The _menu.org that works in the main index.org looks like this:

+ [[file:index.org][Home]]
+ [[file:stuff/index.org][Stuff]]
+ [[file:things/index.org][Things]]
+ [[file:problems/index.org][Problems]]

But when I #+INCLUDE it in the stuff/index.org file the links point at

http://example.com/~stl/stuff/index.html
http://example.com/~stl/stuff/stuff/index.html
http://example.com/~stl/stuff/things/index.html
http://example.com/~stl/stuff/problems/index.html

On the other hand if I replace file: links with absolute http: ones I
won't be able to navigate between the HTML files created locally with
C-c C-e h.

+ [[http://example.com/~stl/index.org][Home]]
+ [[http://example.com/~stl/stuff/index.org][Stuff]]
+ [[http://example.com/~stl/things/index.org][Things]]
+ [[http://example.com/~stl/problems/index.org][Problems]]

Is there any "secret" way to overcome such a problem?

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] Re: custom postamble in HTML export

2010-10-07 Thread Łukasz Stelmach
Carsten Dominik  writes:

> On Oct 5, 2010, at 6:43 PM, Łukasz Stelmach wrote:
>
>> Carsten Dominik  writes:
>>
>>> :postamble is meant to completely replace the automatic
>>> postamble Org creates,
>>
>> But what if I like the information it puts there?
>
> Then you have a case which Org currently does not handle.

Yes, it does. org-export-html-postamble may also be a function. So it'll
be a lot better for all of us, and especially for the code, if I just
c'n'p the automatic postamble code as a custom function and add there
what I need. The only minor problem here is how to load the function
only when it's needed, no sooner than I open any of the files that
require it. But it's "for something completely different" ;-)

> You would have to introduce a new variable, org-export-html-postamble-
> extra and arrange for it to be handled correctly with publishing
> properties etc etc.

According to Larry Wall[1], laziness is one of the greatest virtues
of programmers[2]. Right next to impatiens and hubris ;-)

[1] http://en.wikipedia.org/wiki/Larry_Wall
[2] http://en.wikipedia.org/wiki/Larry_Wall#Virtues_of_a_programmer

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] Re: custom postamble in HTML export

2010-10-06 Thread Łukasz Stelmach
Carsten Dominik  writes:

> On Oct 5, 2010, at 6:43 PM, Łukasz Stelmach wrote:
>
>> Carsten Dominik  writes:
>>
>>> On Oct 4, 2010, at 7:59 PM, Łukasz Stelmach wrote:
>>>
>>>> How about moving
>>>>
>>>> (org-export-html-insert-plist-item opt-plist :postamble opt-plist)
>>>>
>>>> in org-html.el from line 1694 few lines up, just above the closing
>>>> div of the postamble. IMHO it makes more sense to put custom
>>>> content into the existing postamble than crating another one. There
>>>> is usually only one footer per page ;-)
>>>
>>> :postamble is meant to completely replace the automatic postamble
>>> Org creates,
>>
>> But what if I like the information it puts there?
>
> Then you have a case which Org currently does not handle.

The kind I like most :-D

> You would have to introduce a new variable, org-export-html-postamble-
> extra and arrange for it to be handled correctly with publishing
> properties etc etc.

I am going to give a talk about org-mode at my division[1] of WUT and
this looks like a good one to say: oh by the way, I fixed it few days
ago ;-)

[1] http://charlie.iem.pw.edu.pl/index.php?load=wersjaang/home
-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] Re: custom postamble in HTML export

2010-10-05 Thread Łukasz Stelmach
Carsten Dominik  writes:

> On Oct 4, 2010, at 7:59 PM, Łukasz Stelmach wrote:
>
>> How about moving
>>
>>  (org-export-html-insert-plist-item opt-plist :postamble opt-plist)
>>
>> in org-html.el from line 1694 few lines up, just above the closing div
>> of the postamble. IMHO it makes more sense to put custom content into
>> the existing postamble than crating another one. There is usually only
>> one footer per page ;-)
>
> :postamble is meant to completely replace the automatic
> postamble Org creates,

But what if I like the information it puts there? Especially the
timestamp? there is the :timestamp option but honestly I couldn't figure
out how to use it. I puts some HTML with  in it
and that's all.

> so you would normally use it with
>
>:auto-postamble nil

How about putting this hint in the documentation or comments around the
code? Or maybe even a "XOR switch" that automaticall turns of one of
those options if the other is on.

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] custom postamble in HTML export

2010-10-04 Thread Łukasz Stelmach
Hello.

How about moving

  (org-export-html-insert-plist-item opt-plist :postamble opt-plist)

in org-html.el from line 1694 few lines up, just above the closing div
of the postamble. IMHO it makes more sense to put custom content into
the existing postamble than crating another one. There is usually only
one footer per page ;-)

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] [PATCH] there is no ś in HTML

2010-10-04 Thread Łukasz Stelmach
Hello.

There is no such named entity as ś. If you want to be 7bit clean
then use ś (or decimal ś).

--8<---cut here---start->8---
diff --git a/lisp/org-exp.el b/lisp/org-exp.el
index 28157a8..f75cfb4 100644
--- a/lisp/org-exp.el
+++ b/lisp/org-exp.el
@@ -181,7 +181,7 @@ This option can also be set with the +OPTIONS line, e.g. 
\"-:nil\"."
 ("no" "Forfatter"  "Dato"  "Innhold" "Fotnoter")
 ("nb" "Forfatter"  "Dato"  "Innhold" "Fotnoter")  ;; nb = Norsk (bokm.l)
 ("nn" "Forfattar"  "Dato"  "Innhald" "Fotnotar")  ;; nn = Norsk (nynorsk)
-("pl" "Autor"  "Data" "Spis treści"  "Przypis")
+("pl" "Autor"  "Data" "Spis treści"  "Przypis")
 ("sv" "Författare" "Datum" "Innehåll" "Fotnoter"))
   "Terms used in export text, translated to different languages.
 Use the variable `org-export-default-language' to set the language,
--8<---cut here---end--->8---

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] Re: Projects+Next Actions view

2010-10-01 Thread Łukasz Stelmach
Marcelo de Moraes Serpa  writes:

>
> On Thu, Sep 30, 2010 at 6:56 PM, Matt Lundin  wrote:
>> Marcelo de Moraes Serpa  writes:
>>
>>> Another thing that I like about Things
>>> (http://culturedcode.com/things/) is the "Next Actions" view. It
>>> basically lists all projects plus the very first next action for each
>>> of them. When you need some perspective, having quick access to a view
>>> like this is very useful.

>>> It also shows any "orphan" tasks (tasks that don't belong to a
>>> project), so you have a nice overview of what you can do based on
>>> your own input.

Remember, you can set CATEGORY property which is displayed in the
leftmost column of an agenda view. I set it in projects.org file so I
don't have to use :PROJECT: tag.

>> You could use a sparse tree view:
>>
>> (add-to-list 'org-agenda-custom-commands
>>             '("x" "PROJECT+N/A" tags-tree "PROJECT|TODO=\"TODO\""
>>               ((org-show-siblings nil)
>>                (org-show-entry-below nil
>
> However, this seems to show all the TODO items below a PROJECT item,
> including the DONE ones. What I had in mind was to show only the first
> child. Is it possible?

So use the ORDERED property, or properly nest action and enforce todo
dependencies . Actions that cannot be taken
right know because they depend on other actions will be displayed in
grey font on an agenda. If, however, they are featured this way there
probably is a way to hide them completely.

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] Re: Store link upon sending a message

2010-10-01 Thread Łukasz Stelmach
Ulf Stegemann  writes:

> It often happens to me that I send a message (Gnus) and need to keep a
> reference of the mail just sent as link in an org file. 
[...]
> It would of course be much nicer if the org link could be stored
> automagically upon sending the message (or more precisely upon creating
> the copy of the message).

In Gnus, just like in other Emacs applications, there is a lot of hooks
and I am quite sure there is one we could use. I am going to investigate
the problem soon as I also need the feature you descibed.

> As I'm not very familiar with the Gnus code I'll probably have to ask at
> the Gnus towers if it's possible to get hold of the group and article
> number

AFAIR, message-id is used for org links rather than the articla
number.

> of the last Gcc message created.  But maybe someone around here
> has a partly or completely different idea how to achieve the described
> behaviour?

Which simplifies the problem quite a lot because we need to be able to
see the buffer just before sending or copying it to Gcc folder. All the
information is there.

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] Re: org and Things.app - next actions and sorting items

2010-09-29 Thread Łukasz Stelmach
Marcelo de Moraes Serpa  writes:
[...]
> I wonder if it would be possible to re-order  directly on the agenda
> buffer, move an item up or down?
>
> Anyway, food for thought :)

First thought: properties. Second thought: many different agenda
views. Conclusion: not so easy *in general* but not impossible.

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] Re: geolocated notes

2010-09-29 Thread Łukasz Stelmach
Łukasz Stelmach  writes:

> Carsten Dominik  writes:
>
>> On Sep 27, 2010, at 1:15 PM, Łukasz Stelmach wrote:
>>
>>> I've just created a hack to for org-mode (and org-remember) to
>>> receive and parse URLs from OpenStreetMap and Google Maps. The
>>> function extracts longitude and latitude and sets GEO property of the
>>> node to geo: URI.
> [...]
>> Nice!
[...]
> [2] I'll create org-geo branch in http://github.com/steelman/org-mode

I put the code in contrib/lisp/org-geo.el. Check it out
http://github.com/steelman/org-mode/blob/org-geo/contrib/lisp/org-geo.el

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] lisp functions in column view

2010-09-29 Thread Łukasz Stelmach
Hi.

Is it possible, to have a value of a column (property) in the column
view calculated with a lisp function?

For example, I would like to compare some checking accounts (cost vs.
features) and I think using a very wide table would be cumbersome when
compared to properties and configurable column view, and I could also
take some notes. In the end I'd like to calculate a score based on
different properties (is it possible to sort the column view?).

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] Re: geolocated notes

2010-09-29 Thread Łukasz Stelmach
Carsten Dominik  writes:

> On Sep 27, 2010, at 1:15 PM, Łukasz Stelmach wrote:
>
>> I've just created a hack to for org-mode (and org-remember) to
>> receive and parse URLs from OpenStreetMap and Google Maps. The
>> function extracts longitude and latitude and sets GEO property of the
>> node to geo: URI.
[...]
> Nice!

There are few things to do: accept `geo:' URIs[1] simply putting them in
the GEO property without any modification, some sanity and error checks
too. I am going to work on this for myself[2] but I will follow this thread
waiting for any suggestions too.

What I would like to achieve is a "geospatial aware todo list" that
enables one to choose todos along or near a route between two selected
points, so one can visit them when traveling. Probably there will be a
link to the Google Maps on the bootom of such a list to visualise such a
list.

[1] http://geouri.org/
[2] I'll create org-geo branch in http://github.com/steelman/org-mode

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] Re: n-times event

2010-09-28 Thread Łukasz Stelmach
Łukasz Stelmach  writes:

> I am wondering what sexp to write to display an event n times. Let's say
> there is a course at a university which comprises 4 meetings.
[...]

For the record, you can find some answers here:

http://orgmode.org/worg/org-faq.php#org-diary-class

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] org-footnote in messages, practical question.

2010-09-27 Thread Łukasz Stelmach
Hi.

I am thinking about deploying org-footnote in message-mode. I'd like to
use it for URLs most and I'd like to ask you a question. Where would you
like to see the footnotes sections in my messages ;-) below or above the
signature. Please consider that if they get below then they will be
ripped off on reply. If, on the other hand I should put them above the
signature then some hacking is required in the org-footnote-normalize
function which of course is fun.

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] geolocated notes

2010-09-27 Thread Łukasz Stelmach
Hello.

I've just created a hack to for org-mode (and org-remember) to receive
and parse URLs from OpenStreetMap and Google Maps. The function extracts
longitude and latitude and sets GEO property of the node to geo: URI.

The code is easily extendable. To add support for other maps one has to
add a branch in the `cond' in stl/org-dnd-set-geo-property, that sets
`lon' and `lat' appropriately *and* a regular expression in
stl/org-dnd-add-geo-support.

To see it running just drag and drop the URL that contains geographic
coordinates from the address bar (or the "Link" link in the upper right
corner of the Google Maps window) over a node to get its GEO property
set.

--8<---cut here---start->8---
(defun stl/org-dnd-set-geo-property (uri action)
  (save-excursion
(let (lat lon)
  (cond 
; OpenStreetMap
   ((string-match
 "^http://\\(?:www\.\\)openstreetmap\.org/" uri)
(dolist (p (split-string (cadr (split-string uri "\?")) "&" ))
  (cond
   ((string-match "lat=\\(-?[.0-9]+\\)" p)
(setq lat (match-string 1 p)))
   ((string-match "lon=\\(-?[.0-9]+\\)" p)
(setq lon (match-string 1 p))
; Google Maps
   ((string-match
 "^http://maps\.google\.com/.*ll=\\(-?[.0-9]+\\),\\(-?[.0-9]+\\)" uri)
(setq lat (match-string 1 uri) lon (match-string 2 uri
  (unless (outline-previous-heading)
(search-forward-regexp org-outline-regexp))
  (org-set-property "GEO" (concat "geo:" lat "," lon)

(defun stl/org-dnd-add-geo-support ()
  (org-set-local
 'dnd-protocol-alist
 (append 
'(("^http://\\(?:\\(?:www\.\\)?openstreetmap\.org\\|maps\.google\.com\\)". 
stl/org-dnd-set-geo-property)) dnd-protocol-alist)))

(add-hook 'org-mode-hook 'stl/org-dnd-add-geo-support)
(add-hook 'org-remember-mode-hook 'stl/org-dnd-add-geo-support)
--8<---cut here---end--->8---

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] Re: Howto define formula for table regions

2010-09-22 Thread Łukasz Stelmach
 (org-parse-time-string
 (org-no-properties (org-table-get-field
   (current-time) )
  (dotimes (i 4)
(setq theline (append theline (list (org-table-get-field
(org-table-next-field))
  (org-table-kill-row)
  (org-goto-line (1- (org-table-get-descriptor-line "III")))
  (org-table-goto-column 3)
  (org-table-next-row)
  (dolist (col theline)
(insert col)
(org-table-next-field))
  (setq curline (1- curline))
  (setq theline nil)
  )
(setq curline (1+ curline
"")
--8<---cut here---end--->8---


and put this as:

$moveup = '(save-excursion  blah blah ..)

It should be possible to cut it down by about 20% but I leave it as an
exercise to someone else ;-)

You could also try the  feature which enables
simple calculations too plus you can keep your numbers in the tree
structure with more elaborate info on them. You could then use agenda
views to select and sum up entries by dates too. 

[*] I've copied all the formulae from the formula buffer which you
activate with C-' while cursor is in a table. This is very convenient
way of entering formulae since you get the cells you reference
highlighted.

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] Re: Q : select current org item as region

2010-09-10 Thread Łukasz Stelmach
Richard Riley  writes:

> Łukasz Stelmach  writes:
>> Richard Riley  writes:
>>> What would be the best elisp way to select the current org entry? I want
>>> a hot key to select the current item as current region (not into the
>>> clipboard).
>>>
>> This is mine:
>>
>> (defun stl/outline-mark-subtree ()
[...]
>>
>> it's derived from the original outline-mark subtree but marks an empty
>> space before a next-same-level-heading.
>
> Thanks for the replies.
>
> Just for google completeness
>
>   (goto-char (org-entry-beginning-position))
>   (set-mark (org-entry-end-position))
>
> seemed the most efficient after digging about a bit.

It's not the same, it does not include the subtree. Take for example:

--8<---cut here---start->8---
* Top 1
  Some text in the Top 1 node
** Bottom 1
   Some more text.
** Bottom 2
   No text at all
* Top 2
  Another toplevel entry.
--8<---cut here---end--->8---

If you place point on the second line of the above example,
(stl/)?outline-mark function will mark: Top 1, Bottom 1 and Bottom 2,
nodes with their content. While the org-entry-(beginning|end)-position
will provide you only with Top 1 heading and a text before Bottom 1.

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] Re: Q : select current org item as region

2010-09-09 Thread Łukasz Stelmach
Richard Riley  writes:

> What would be the best elisp way to select the current org entry? I want
> a hot key to select the current item as current region (not into the
> clipboard).
>

This is mine:

--8<---cut here---start->8---
(defun stl/outline-mark-subtree ()
  "Mark the current subtree in an outlined document.
This puts point at the start of the current subtree, and mark at the start
of the next."
  (interactive)
  (let ((beg))
(if (outline-on-heading-p)
;; we are already looking at a heading
(beginning-of-line)
  ;; else go back to previous heading
  (outline-previous-visible-heading 1))
(setq beg (point))
(outline-end-of-subtree)
(outline-next-visible-heading 1) ; just before the next heading (stl)
(push-mark (point) nil t)
(goto-char beg)))
--8<---cut here---end--->8---

it's derived from the original outline-mark subtree but marks an empty
space before a next-same-level-heading.

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] Re: Force completed habits to revert to "HABIT" todo keyword instead of "TODO"

2010-09-06 Thread Łukasz Stelmach
Joseph Buchignani  writes:

> Summary: I would like habits to automatically be marked as the todo keyword
> "HABIT" instead of "TODO" after I mark them "DONE"
>
> Reasons:
> I want to keep my habits separate from my tasks. But they display together
> on my TODO list. This makes it hard to keep track of what's a habit and
> what's not.

You can exclude from your TODO list all entris with a STYLE propert
equal `habit'.

> I could change a setting so that scheduled tasks are no longer considered
> open. But then I lose the ability to see all my habits in a list on the TODO
> view.
>
> Also, I like to see habits clearly marked HABIT instead of TODO in my org
> outline.

That's a much better reason.

> Keeping the keywords separated fits better with my workflow. Normally I only
> need to work on habits from within the org agenda, not the todo list. For
> example, I start the day by executing scheduled tasks, then priority A
> tasks, then priority A habits, etc.
>
> Is there some setting I can change to do this? Right now I am doing it
> manually.

I'd try putting habits in a separate file with its own set of TODO
kewords defined in a line beginning with `#+SEQ_TODO'. You can also try
defining a different DONE keyword for habits together with HABIT and use
it as a TODO keyword sequence as described here.


http://orgmode.org/manual/Multiple-sets-in-one-file.html#Multiple-sets-in-one-file

I am sure someone with more moxie and bigger mojo than me (at least for
now i.e. 00:08 CEST) could come up with a function you could add to
org-after-todo-state-change-hook that does exactly what you want.

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] [BUG] org-timer requires org-notify from org-clock

2010-09-06 Thread Łukasz Stelmach
Hello.

It seems like there has to be (require 'org-clock) on top of
org-timer.el because otherwise the notification lambda
in-org-timer-set-timer fails because org-notify is not defined and the
timer starts going forward after it passes 0:00:00. It also looks like

(declare-function org-notify "org-clock" (notification &optional
  play-sound))

is not enough. (BTW. now its d-f org-show-notification which is not used
in org-timer). Simple

(require 'org-clock)

helps, as anything else that loads org-clock like clocking-in.

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] [PATCH] some garbage left in org-timer.el

2010-09-06 Thread Łukasz Stelmach
Hello.

Someone who starts all her/his functions with bzg- has left this

--8<---cut here---start->8---
diff --git a/lisp/org-timer.el b/lisp/org-timer.el
index 313d4f0..0ffe67d 100644
--- a/lisp/org-timer.el
+++ b/lisp/org-timer.el
@@ -322,10 +322,6 @@ VALUE can be `on', `off', or `pause'."
   (message "%d minute(s) %d seconds left before next time out"
   rmins rsecs
 
-(defun bzg-test (&optional test)
-  (interactive "P")
-  test)
-
 ;;;###autoload
 (defun org-timer-set-timer (&optional opt)
   "Prompt for a duration and set a timer.
--8<---cut here---end--->8---

-- 
Miłego dnia,
Łukasz Stelmach



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


[Orgmode] Re: org-mode + pomodoro

2010-09-02 Thread Łukasz Stelmach
Bastien  writes:

> Łukasz Stelmach  writes:
>
>> Is there a way to get a countdown timer visible like the one you start
>> with `C-c C-x .'?
>
> `org-timer-set-timer' now displays a timer in the modeline.

Thanks a lot.

> Also thanks to Frédéric Couchet who asked me to have this feature for
> ges.

I think I've seen his post ;-)

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] Re: org-mode + pomodoro

2010-09-02 Thread Łukasz Stelmach
Frederic Couchet  writes:

>>>>>> "Sergey" == Sergey Konoplev  writes:
>
> Sergey> Hi all, Are there ways to use Pomodoro technique
> Sergey> (http://www.pomodorotechnique.com/) with org-mode? If there
> Sergey> are what are the best practices?
>
> Sergey> Thank you in advice.
>
> I always start a clock when I work on a task. And for the Pomodoro
> technique I use also the org-timer module with some configuration.
[...]

Is there a way to get a countdown timer visible like the one you start
with `C-c C-x .'?

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] Re: [PATCH] can't :include files in org-publish-project-alist

2010-09-02 Thread Łukasz Stelmach
Bastien  writes:

> :base-directory now allows a directory name with no ending slash.
>
> I did this in a slightly different way than the one you suggest:
>
> ,
> |   (let* ((r (plist-get (cdr prj) :recursive))
> | -(b (expand-file-name (plist-get (cdr prj) :base-directory)))
> | +(b (expand-file-name (file-name-as-directory
> | +  (plist-get (cdr prj) :base-directory
> |  (x (or (plist-get (cdr prj) :base-extension) "org"))
> `

Great :-) I didn't know there is the `file-name-as-directory' function.

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] Re: [PATCH] can't :include files in org-publish-project-alist

2010-08-21 Thread Łukasz Stelmach
Nick Dokos  writes:

> =?utf-8?Q?=C5=81ukasz?= Stelmach  wrote:
>
>>  :include ("index.org")) ; < HERE
>>... 
>> However, with parenthesis around "index.org" removed the function seems to
>> work fine and returns
>> 
>
> Wasn't that fixed by the following commit?
>
> commit 3529be82eff7906c1182fafbea6012fb6bfec160
> Author: Carsten Dominik 
> Date:   Mon Aug 16 17:27:25 2010 +0200
>
> Fix interpretation of the :include property as a list of file names

Yes it was. I forgot to pull. However the part with appending "/" to b
might still be valuable at least for building xm regexp. If
:base-directory is set to "~/dydaktyka" (my example) then xm becomes
"^/home/steelman/dydaktyka[^/]+\.\(org\)" which not necessarily makes
sense. It may go like this

   (xm (concat "^" b
(when (string-match "^[/]$" b) "/")
(if r ".+" "[^/]+")
 "\\.\\(" x "\\)$")))

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] [PATCH] can't :include files in org-publish-project-alist

2010-08-21 Thread Łukasz Stelmach
EHLO.

I've just discovered that I can't publish a simple webpage anymore (some
options under C-c C-e sitll work but F and P don't). Short investigation
shows that when I run:

(org-publish-get-project-from-filename "/home/steelman/dydaktyka/index.org")

in the *scratch* buffer I get

--8<---cut here---start->8---
Debugger entered--Lisp error: (wrong-type-argument stringp ("index.org"))
  string-match(("index.org") "/home/steelman/dydaktyka/index.org")
  (and i (string-match i filename))
  (or (and i (string-match i filename)) (and (not ...) (string-match xm 
filename)))
  (if (or (and i ...) (and ... ...)) (progn (setq project-name ...) (throw ... 
project-name)))
[...]
--8<---cut here---end--->8---

assuming my org-publish-project-alist

--8<---cut here---start->8---
(setq org-publish-project-alist
  '(("dydaktyka-org"
 :base-directory "~/dydaktyka"
 :base-extension "org"
 :publishing-directory "/some/dir"
 :exclude ".*"
 :table-of-contents nil
 :publishing-function org-publish-org-to-html
 :include ("index.org")) ; < HERE
("dydaktyka-files"
 :base-directory "~/dydaktyka/data"
 :recursive t
 :publishing-directory "/some/dir/data"
 :base-extension "odt"
 :publishing-function org-publish-attachment)
("dydaktyka" :components ("dydaktyka-org" "dydaktyka-files"
--8<---cut here---end--->8---

However, with parenthesis around "index.org" removed the function seems to
work fine and returns

--8<---cut here---start->8---
("dydaktyka-org" :base-directory "~/dydaktyka" :base-extension "org"
 :publishing-directory "/some/dir"
 :exclude ".*"
 :table-of-contents nil
 :publishing-function org-publish-org-to-html
 :include "index.org")
--8<---cut here---end--->8---

All this leads to a patch like this:

--8<---cut here---start->8---
Fix org-publish to accept list of files to :include again

Fix a regression introduced by Sebastian Rose's 339d6fe4 that makes
org-publish-get-project-from-filename function break if a project's
:include parameter contains a list of strings.

diff --git a/lisp/org-publish.el b/lisp/org-publish.el
index 6324eba..8a02df1 100644
--- a/lisp/org-publish.el
+++ b/lisp/org-publish.el
@@ -466,12 +466,15 @@ matching filenames."
  ;; [[info:org:Selecting%20files]] shows how this is supposed to work:
  (let* ((r (plist-get (cdr prj) :recursive))
 (b (expand-file-name (plist-get (cdr prj) :base-directory)))
+(b (concat b (when (string-match "[^/]$" b) "/"))) ; How about 
Win?
 (x (or (plist-get (cdr prj) :base-extension) "org"))
 (e (plist-get (cdr prj) :exclude))
 (i (plist-get (cdr prj) :include))
 (xm (concat "^" b (if r ".+" "[^/]+") "\\.\\(" x "\\)$")))
(when (or
-  (and i (string-match i filename))
+  (and i (stringp i) (string-match i filename))
+  (and i (listp i) (member filename
+   (mapcar (lambda (x) (concat b x)) 
i)))
   (and
(not (and e (string-match e filename)))
(string-match xm filename)))
--8<---cut here---end--->8---

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] Re: fractional hours for timestamps?

2010-08-13 Thread Łukasz Stelmach
Bastien  writes:

> Łukasz Stelmach  writes:
>
>> I think Greg's point is about entering data using only numeric keypad. I
>> can confirm that I have considered these issues (esp. 1400
>> vs. 14:00). Fractional hours don't seem to be that easy as there are
>> countries like Poland where you use comma as decimal point (working with
>> Emacs' built in calc is a pain) which earns another few lines for
>> parsing code.
>
> AFAIC, I won't mess with this part of the code, I think it's quite easy
> enough to enter 14:00 instead of 1400...

Not really in fact if you use keypad. It's not about the number of
keystrokes but their layout. Try it.

>  patch welcome ;)
ASAP ;)

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] Re: fractional hours for timestamps?

2010-08-12 Thread Łukasz Stelmach
Bastien  writes:

> Greg Troxel  writes:
>
>> I tried to set a timestamp "thu 12:00+1.5", using C-c . and typing the
>> characters in quotes.  What I got was
>> <2010-08-12 Thu 12:00-13:00>
>>
>> I found that 12:00+1:30 works fine, but it seems like 1.5 should be
>> parsed.
>>
>> Separately, I'd like 24-hour time without colons to work.  "thu 1400"
>> seems unambiguous, but just shows up as thursday without a time.
>>
>> I don't know how hard these are or if there are reasons not to, but I
>> thought I'd throw out the idea.
>
> It is certainly harder to make Org's parsing capacity even more elastic
> than to let our brains parse this directly :)
>
> 12:00+1.5 looks weird to me and computing 1.5->1:30 is straightforward.
> Same for 1400->14:00.  
>
> But maybe other people think otherwise...  

I think Greg's point is about entering data using only numeric keypad. I
can confirm that I have considered these issues (esp. 1400
vs. 14:00). Fractional hours don't seem to be that easy as there are
countries like Poland where you use comma as decimal point (working with
Emacs' built in calc is a pain) which earns another few lines for
parsing code.

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] Re: Keeping agenda window

2010-06-15 Thread Łukasz Stelmach
Radosław Grzanka  writes:

> However, if I follow the link to one of my outlines it opens in
> the window of agenda - this is not what I want. I want it to open in
> my upper window (preferably moving cursor and focus there) and leave
> the agenda window intact so I can still see it.

Use the [Tab] key instead of [Enter]

-- 
Miłego dnia,
Łukasz Stelmach


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


[Orgmode] Re: floating, non scheduled agenda items

2010-04-13 Thread Łukasz Stelmach
Richard Riley  writes:

> Łukasz Stelmach  writes:
>> Richard Riley  writes:
>>> Richard Riley  writes:
>>>
>>>> What would be the best way to include in my daily agenda a section of
>>>> non schedule items which are there every day until I decide to
>>>> remove them.
>> [...]
>>> I needed to email Jan a little more for him to explain the procedure
>> [...]
>>> ,
>>> | You can replace the default agenda with a custom agenda if you specify
>>> | "a" as the accesskey for the custom agenda.
>> [...]
>>> | - Jan
>>> `
>>
>> Personaly I'd recomend you leaving the default agenda intact and adding
>> *your* own under 'A'. It's nice to have the *real* defaults at hand from
>> time to time.
>
> I think this does use the real agenda doesn't it?

It is indeed, however, you might want to customise the agenda further.

-- 
Miłego dnia,
Łukasz Stelmach



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


[Orgmode] Re: Problem entering an every-weekday meeting with start time

2010-04-12 Thread Łukasz Stelmach
Patrick Aikens  writes:

I have a meeting I wish to have on my agenda every weekday at the
> appropriate start time.  I have tried the following, which doesn't
> show up in my agenda at all:
> ** Daily Meeting
>    <%%(memq (calendar-day-of-week date) '(1 2 3 4 5)) 10:30>
>

How about

** Daily Meeting 10:30
   <%%(memq (calendar-day-of-week date) '(1 2 3 4 5))>


or

** Daily Meeting
%%(memq (calendar-day-of-week date) '(1 2 3 4 5)) Daily meeting 10:30


-- 
Miłego dnia,
Łukasz Stelmach



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


[Orgmode] Re: [BUG] revering agenda files

2010-04-12 Thread Łukasz Stelmach
Richard Riley  writes:

> Łukasz Stelmach  writes:
>> I'm not quite sure it is bug indeed but org-mode stops working as usual
>> when you change the agenda files behind the scenes. I sometimes do it
>> because I use org-mode on several machines and I keep my files
>> synchronised with git. Since git-vc.el doesn't provide interface for
>> git's push pull commands I have to invoke them from outside of Emacs.
>
> Use magit perhaps? or egg.

I'll give them a try. Thanks.

-- 
Miłego dnia,
Łukasz Stelmach



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


[Orgmode] Re: [BUG] revering agenda files

2010-04-12 Thread Łukasz Stelmach
Bernt Hansen  writes:

> Łukasz Stelmach  writes:
>
>> I'm not quite sure it is bug indeed but org-mode stops working as usual
>> when you change the agenda files behind the scenes.
[...]
> My solution to this is
>
> (global-auto-revert-mode t)
>
> So if there are no modified buffers and the agenda file changes
> externally it just automatically updates to what is on disk.  That got
> rid of the annoying message for me.

I don't want to get rid of those messages completely. Couple of times
they saved my work (at least) and I don't need to revert org-mode
buffers that often to feel anoyed by two or three questions. However,
I'd like them to be asked in one row.

-- 
Miłego dnia,
Łukasz Stelmach



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


[Orgmode] [BUG] revering agenda files

2010-04-12 Thread Łukasz Stelmach
Hello.

I'm not quite sure it is bug indeed but org-mode stops working as usual
when you change the agenda files behind the scenes. I sometimes do it
because I use org-mode on several machines and I keep my files
synchronised with git. Since git-vc.el doesn't provide interface for
git's push pull commands I have to invoke them from outside of Emacs.
When it happens that pull operation alters one of agenda files then:

1. When I ask to rebuild agenda I receive a question

   todo.org changed on disk; really edit the buffer? (y, n, r or C-h) 

   one file each time. The question is quite reasonable but it should
   pop up for every altered file upon the first attempt to rebuild
   agenda.

2. Every time I move cursor up or down I get

   if: Wrong type argument: stringp, nil

   when I click a heading, nothing happens and when i press RET on it

   let*: Wrong type argument: integer-or-marker-p, nil

   It stops after few rebuilds. "Few" means the number of updated files.


-- 
Miłego dnia,
Łukasz Stelmach



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


[Orgmode] Re: floating, non scheduled agenda items

2010-04-12 Thread Łukasz Stelmach
Richard Riley  writes:

> Richard Riley  writes:
>
>> What would be the best way to include in my daily agenda a section of
>> non schedule items which are there every day until I decide to
>> remove them.
[...]
> I needed to email Jan a little more for him to explain the procedure
[...]
> ,
> | You can replace the default agenda with a custom agenda if you specify
> | "a" as the accesskey for the custom agenda.
[...]
> | - Jan
> `

Personaly I'd recomend you leaving the default agenda intact and adding
*your* own under 'A'. It's nice to have the *real* defaults at hand from
time to time.

-- 
Miłego dnia,
Łukasz Stelmach



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


[Orgmode] Re: [BUG] org-babel-perl and formats

2010-04-09 Thread Łukasz Stelmach
Dan Davison  writes:

> Łukasz Stelmach  writes:
>
[...]
>> Format not terminated at - line 11, at end of line
>> syntax error at - line 11, at EOF
>> Execution of - aborted due to compilation errors.
>
> Oops. Sorry Łukasz, my mistake.
>
> You are of course right, we were adding indentation to perl code

A! ;-)


> Babel has two basic modes of execution:
> :results value  ::  The default, you get the value of the last expression, 
> interpreted as a list/table if possible.
> :results output ::  You get stdout
[...]
> (setq org-babel-default-header-args:perl '((:results . "output")))
>
> The trouble with that is that perl blocks will not communicate nicely
> with other blocks:
[...]

Thanks for the warning. It'd probably took me quite some time to
investigate all those details.

-- 
Miłego dnia,
Łukasz Stelmach



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


[Orgmode] Re: [BUG] org-babel-perl and formats

2010-04-09 Thread Łukasz Stelmach
Dan Davison  writes:

> Łukasz Stelmach  writes:
>> I am not sure I will be able to spend some time on this so I'll share my
>> observation with you. org-babel-perl can't cope with perl formats, with
>> their endings to be precise. A format is defined by:
>>
>> format FORMAT_NAME = 
>> body of the format
>> .
>>
>> The problem is that formats *must* and with a single solitary dot or, to
>> be precise "\n.\n" sequence. org-babel-perl doesn't care about it and
>> puts "\t" befor the dot.
>
> Could you post an example? I don't believe we insert tab
> characters. I've never used a perl format before, but I just tried it
> and it seemed to work OK with C-c C-c:
>
> #+begin_src perl
>   format STDOUT =
>   @<<<<<< @|| @>>>>>>
>   "left", "middle", "right"
>   .
>   write ;
> #+end_src
>
> #+results:
> : leftmiddleright

With the very same code i get

--8<---cut here---start->8---
Format not terminated at - line 11, at end of line
syntax error at - line 11, at EOF
Execution of - aborted due to compilation errors.
--8<---cut here---end--->8---

while strace shows the code being wrapped

write(9, "\nsub main {\n\tformat STDOUT =\n\t@<<<<<< @|| 
@>>>>>>\n\t\"left\", \"middle\", \"right\"\n\t.\n\twrite ;\n...@r = 
main;\nopen(o, \">/tmp/perl-functional-results17170oCG\");\nprint o 
join(\"\\n\", @r), \"\\n\"", 184) = 184

inside something really odd:

--8<---cut here---start->8---
  sub main {
  format STDOUT =
  @<<<<<< @|| @>>>>>>
  "left", "middle", "right"
  .
  write ;
  }
  @r = main;
  open(o, ">/tmp/perl-functional-results17170oCG");
  print o join("\n", @r), "\n"
--8<---cut here---end--->8---

> Incidentally, do you know the variable org-src-preserve-indentation?
> When I first read your email I thought that would be the answer. In fact
> it doesn't seem to be relevant, but I thought I would mention it anyway.

Unfortunately it doesn't make any difference.

-- 
Miłego dnia,
Łukasz Stelmach



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


[Orgmode] Re: Pro/Con Lists

2010-04-08 Thread Łukasz Stelmach
"Gary ."  writes:

> Is there a decent way to create these using Org Mode? I tried
> plain lists, but when exported to HTML the entries lose their '+'
> and '-' signs (and gain some kind of bulletpoint).

How about checkboxes? (I havn't tried to export them).

-- 
Miłego dnia,
Łukasz Stelmach



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


[Orgmode] [BUG] org-babel-perl and formats

2010-04-07 Thread Łukasz Stelmach
Hello.

I am not sure I will be able to spend some time on this so I'll share my
observation with you. org-babel-perl can't cope with perl formats, with
their endings to be precise. A format is defined by:

format FORMAT_NAME = 
body of the format
.

The problem is that formats *must* and with a single solitary dot or, to
be precise "\n.\n" sequence. org-babel-perl doesn't care about it and
puts "\t" befor the dot.

Are these indents really necessary in the text
that goes straight through IPC pipes of our OS of choice?

-- 
Miłego dnia,
Łukasz Stelmach



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


[Orgmode] Re: Org mode and emacs email

2010-03-29 Thread Łukasz Stelmach
Simon Brown  writes:

> * Richard Riley (rileyrg...@gmail.com) wrote:
>> This is pretty "fanboi" of me but its really simple : use Gnus. It can
>> do imap fine (you can always move to using a local dovecot
>> server and use offlineimap to sync if performance is a problem).
> I've had a quick look at the gnus manual and it seems to depend upon
> importing your mail which rules it out for me. I'm not prepared to
> start collecting mail in a mail reader specific way. Most of my mail
> is collected by fetchmail, the IMAP accounts are quite low traffic.

This is not a problem. I've used (or do I still do it?) gnus with
fetchmail witho no trouble whatsoever. As it's been stated geting Gnus
set and ready may take some time but its worth it. Gnus supports mbox
quite well with nnfolder backend.

-- 
Miłego dnia,
Łukasz Stelmach



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


[Orgmode] Re: GtD with org-mode and a Palm PDA

2010-03-28 Thread Łukasz Stelmach
Tony McC  writes:

> Dear org-moders,
[...]
>
> I hope this is of some use, I have certainly found the process helpful
> in my own work.

Thanks. It's possible that you've just saved me some money I was
planning to spend on a new smartphone I could use with org-mode (while
my TX is still working too).

-- 
Miłego dnia,
Łukasz Stelmach



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


[Orgmode] Re: forcing the end of

2010-03-21 Thread Łukasz Stelmach
Łukasz Stelmach  writes:

> I publish some materials for my students. For example test questions. As
> you might expect I'd like to keep them secret until the test starts. So
> I write this:

--8<---cut here---start->8---
> ** "OpenOffice Writer" ( [2010-03-21 nie] ) :ATTACH:
> #+HTML:  0) { ?>
>
>   The questions will be availble on Sunday at 10:50.
>
> #+HTML: 
>
>   + How to write a poem?
>   + How to create a graph?
>   + How?
>
> #+HTML: 
--8<---cut here---end--->8---

> What I get is roughly this:

--8<---cut here---start->8---
> How?
>
> 
>   
>   
> 
> 
> 
--8<---cut here---end--->8---

> Which makes the HTML code that comes out of PHP invalid as  because of
> those dangling  (s seem to be OK here).
>
> How? How to force org-mode to close this plain list befor the php
> closing curly bracket?

OK. I've found a hack. I put three empty lines between the last "How?"
and the  in the middle one I put  (ZERO WIDTH SPACE)
which induces closing of the list and creation of an empty paragraph
. Yet I'd like to see something cleaner.


PS.  NO-BREAK SPACE works too and it's better because Emacs
fontifies it. Shouldn't be exported as a HTML entity  ?

-- 
Miłego dnia,
Łukasz Stelmach



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


[Orgmode] forcing the end of

2010-03-21 Thread Łukasz Stelmach
Hello.

It's been said couple of times that there is no way in org mode to jump
back on the higher level of the outline tree without creating a new node
on that level. After thinking for a while I've agreed that there is no
need for this. There isn't such things in books. However I start to miss
it and I'll give an example of how I'd use it.

I publish some materials for my students. For example test questions. As
you might expect I'd like to keep them secret until the test starts. So
I write this:

--8<---cut here---start->8---
** "OpenOffice Writer" ( [2010-03-21 nie] ) :ATTACH:
#+HTML:  0) { ?>

  The questions will be availble on Sunday at 10:50.

#+HTML: 

  + How to write a poem?
  + How to create a graph?
  + How?

#+HTML: 
--8<---cut here---end--->8---

What I get is roughly this:

--8<---cut here---start->8---

1.3 "OpenOffice Writer" 
(  2010-03-21 
nie )



 0) { ?>

The questions will be availble on Sunday at 10:50.





How to write a poem?


How to create a graph?


How?


  
  



--8<---cut here---end--->8---

Which makes the HTML code that comes out of PHP invalid as  because of
those dangling  (s seem to be OK here).

How? How to force org-mode to close this plain list befor the php
closing curly bracket?

PS. If I add a node below the list some of its cloing s go below
the  too.
-- 
Miłego dnia,
Łukasz Stelmach



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


[Orgmode] Re: AI for orgmode

2010-03-20 Thread Łukasz Stelmach
Carsten Dominik  writes:

> On Mar 18, 2010, at 9:32 PM, Leo wrote:
>
>> Thinking about my own experience, I didn't feel the pain since I
>> gradually changing my org mode configuration over a few years. but I
>> could understand the frustration.
>
> I would be interested in a discussion on how to decrease the startup
> pain in a clever way.

I've always been a kind of a defeatist so take my words with a grain of
salt but... 

People who use or are willing to use Emacs are by no means ordinary
users. The have their really own preferences and habits. They (like me)
even have their own visions of GTD, let alone other workflows. If they
choose org-mode it is because it is super-hyper-mega-customisable. With
great power comes great[1]... Software achieve gradual learning curve
(thus becoming available to ordinary users) by applying sane default
settings but there is no such thing for users I've just described. They
(with all due respect for everyone reading this) all are kind of insane
to use text editor as a PIM, aren't they (we)? Giving those people "sane
defaults" may only make some (most?) of them give up on org-mode as it
might suggest less flexibility than there actually is.

On the other hand I am going to try to convince some of my colleagues to
use it and they don't seem to be so weird as I am. I will probably take
my configuration weed out some really personal stuff and give them as
the "sane default".

These are of course only my 2 cents (Euro ones ;)

[1] http://xkcd.com/643/
-- 
Miłego dnia,
Łukasz Stelmach



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


[Orgmode] Re: Shortcut for complex searches

2010-03-18 Thread Łukasz Stelmach
Alessandro Pacaccio  writes:

> I need a list of TODO items that match a given tag and are not
> scheduled after a given date.  I use the C-c a M shortcut with the
> following search string: +mytag+TODO="TODO"-SCHEDULED>"2000-01-01"
>
> My question is: as I frequently use this search, is it possible to
> configure the command in the org-agenda-custom-commands variable?

Read  and try `C-c a C'.

-- 
Miłego dnia,
Łukasz Stelmach



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


[Orgmode] wriging about computer programming

2010-03-16 Thread Łukasz Stelmach
Hello.

Sometimes org-mode isn't smart enough, but I don't require it to be
because I understand my demands might be high. For example marking code
with =...= can't manege apostrophes right next to equality signs

  =a = 'B'=

doesn't work actually as expected (particularly latex export). But fear
not and use unicode. There is

   /xe2/x80/x8b ZERO WIDTH SPACE

When you put (C-x 8 RET 200b RET) it next to equality signs

  =a = 'B'=
  ^^ ^^

Everything works like charm *and* there is completely no additional
space in the output.

-- 
Miłego dnia,
Łukasz Stelmach



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


[Orgmode] Re: New Org-mode talk by Carsten Dominik

2010-03-07 Thread Łukasz Stelmach
Stefan Vollmar  writes:

> we proudly present:
>
> "Emacs Org-mode: Organizing a Scientist's Life and Work"

Ogg version has a very lousy sound :-( As if it was pushed through
a ~500Hz bandpass filter. But nevertheless thank you very much.

Carsten, can I (we?) use this presentation as a base to promote org-mode
at my faculty? How did you do that keystroke showing thing?


-- 
Miłego dnia,
Łukasz Stelmach



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


[Orgmode] [BUG] block agenda faces

2010-03-07 Thread Łukasz Stelmach
Hello.

I've create a block agenda entry in my org-agenda custom commands:

--8<---cut here---start->8---
("Ha" "agenda at home"
 ((agenda "" 
  ((org-agenda-skip-function
'(org-agenda-skip-entry-if 'todo 'todo
 (tags-todo "-SCHOOL-WORK-BUY"
((org-agenda-sorting-strategy '(tag-up category-up))
--8<---cut here---end--->8---

(`org-agenda-skip-entry-if' for todos is my own invention I will share
soon (I think I've posted it somewhere but it might have been lost))

Everything's great except that DONE todos in the calendar block have
their DONE keyword in bold red instead of green.

The same agenda action launched as a single, toplevel command in
org-agenda-custom-commands works fine, wiht DONEs in green.

-- 
Miłego dnia,
Łukasz Stelmach



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


[Orgmode] [BUG] unescaped second & in latex

2010-03-03 Thread Łukasz Stelmach
Hello.

I've create some presentation on programming (some more to do) and to my
surprise I've discovered that if org-mode escapes one "&" properly it
doesn't do its job in case of "&&" (and a single "^" too). I get "\&&"
in latex file which of course is wrong.

-- 
Miłego dnia,
Łukasz Stelmach



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


[Orgmode] Re: org-prefere-future for other applications

2010-03-02 Thread Łukasz Stelmach
Carsten Dominik  writes:

> On Feb 27, 2010, at 1:29 PM, Łukasz Stelmach wrote:
>> I've tried to rearrange org-read-date and some other helper function
>> to make them usable from other applications which might not want to
>> prefere future dates. Unfortunatelly I can't do it without making
>> org-read- date *require* additional argument (prefer-future)
>> everytime it is called in orgmode like this:
>>
>> (org-read-date ... org-read-date-prefer-future)
>
>
> Ah, may be this is what this is about:
>
> (defun org-my-read-date (&optional prefer-future)
>(let ((org-read-date-prefer-future prefer-future))
>   (org-read-date)))
>
> ?

So this is dynamic soping? Thats what I needed, thanks.

Scoping is one of subjects that always gives me a bit of a headache, no
matter what language I use. 

Now with a function like this:

--8<---cut here---start->8---
(defun stl/org-read-date (&optional with-time to-time from-string
prompt default-time default-input
prefer-future)
  "A wrapper around `org-read-date' to make it ignore the global
`org-read-date-prefer-future' value."
  (let ((org-read-date-prefer-future prefer-future))
(org-read-date with-time to-time from-string prompt
   default-time default-input)))
--8<---cut here---end--->8---

and a two others

--8<---cut here---start->8---
(defun stl/org-ledger-ask-cleared ()
  (let (c)
  (while (not (member (setq c (read-char "Cleared [Y/n/p]?")) '(?y ?n ?p ?\n 
?\r ?\ 
  (cond ((eq c ?n) "") ((eq c ?p) "! ") (t "* "

(defun stl/org-ledger-read-invoice ()
  (let ((c (read-string "Invoice number:")))
(if (string-match ".+" c) (concat "(" c ") ") "")))
--8<---cut here---end--->8---

and a template:

--8<---cut here---start->8---
("Expense" ?E
"%(format-time-string \"%Y-%m-%d\" (stl/org-read-date nil 'to-time)) 
%(stl/org-ledger-ask-cleared)%(stl/org-ledger-read-invoice)%^{Description}
%^{Debit||Expense:Cash|Assets:Checking|Liabilities:Visa}
%^{Credit||Expense:Food|Expense:Supplies}\t%^{Amount}\n\n%!"
   "~/org/ledger.dat" bottom)
--8<---cut here---end--->8---

I can use remember to add transactions to my ledger *without* havig to
specify full date (most of times you register transactions from the
past, right?). Cool :-)

-- 
Miłego dnia,
Łukasz Stelmach



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


[Orgmode] org-prefere-future for other applications

2010-02-27 Thread Łukasz Stelmach
Hello.

I've tried to rearrange org-read-date and some other helper function to
make them usable from other applications which might not want to prefere
future dates. Unfortunatelly I can't do it without making org-read-date
*require* additional argument (prefer-future) everytime it is called in
orgmode like this:

(org-read-date ... org-read-date-prefer-future)

Is it possible to refactor the code the way I've described it (without
too much fuss)?

-- 
Miłego dnia,
Łukasz Stelmach



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


[Orgmode] [BUG] more problems with future timestamps

2010-02-25 Thread Łukasz Stelmach
EHLo.

I think the following patch should be applied to handle the future
properly. I belive the year is set by the time this part is reached.
At least that is what I observe using ISO dates. When I write 1-2
(1 January) I get it in 2010.

--8<---cut here---start->8---
diff --git a/lisp/org.el b/lisp/org.el
index 8ba782a..3ef2e1c 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -13491,11 +13491,10 @@ user."
 (nth 3 tl) (< (nth 3 tl) (nth 3 nowdecode)))
(prog1 (1+ (nth 4 nowdecode)) (setq futurep t))
  (nth 4 defdecode)))
- year (or (nth 5 tl)
-  (if (and org-read-date-prefer-future
+ year (if (and org-read-date-prefer-future
(nth 4 tl) (< (nth 4 tl) (nth 4 nowdecode)))
   (prog1 (1+ (nth 5 nowdecode)) (setq futurep t))
-(nth 5 defdecode)))
+(nth 5 defdecode))
  hour (or (nth 2 tl) (nth 2 defdecode))
  minute (or (nth 1 tl) (nth 1 defdecode))
  second (or (nth 0 tl) 0)
--8<---cut here---end--->8---


BTW when I write w2 in the org date input minibuffer

  Error in post-command-hook: (void-function calendar-absolute-from-iso)


-- 
Miłego dnia,
Łukasz Stelmach



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


[Orgmode] [PATCH] remember note as a sibling of currently clocked item

2010-02-23 Thread Łukasz Stelmach
Hello.

I've used org-mode for some time now. I sometimes even use clocking
feature too but I've never urged to remember something as a child of
what I had clocked but rather as a sibling. Please take a look at the
patch.

http://github.com/steelman/org-mode/tree/remember-as-a-sybling-of-the-clocked-item

-- 
Miłego dnia,
Łukasz Stelmach



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


  1   2   >