Re: [Orgmode] Re: return link to :file when using #+call

2011-01-22 Thread Myles English
Thanks for your answer Eric.  Recent changes as per
http://thread.gmane.org/gmane.emacs.orgmode/35396
means that this no longer works.

To recap: what I would like to do is to #+call an R source
block, passing a filename, and have it write a plot to that file and
also insert a link to that file in the org file.  Any ideas?

Here is what I have tried:

#+source: foo()
#+begin_src R :file bar.png :results graphics
plot(1,1)
#+end_src

#+call: foo[:file baz.png]()

#+results: foo[:file baz.png]()
: baz.png

baz.png contains a plot, but no file link is inserted.

#+call: foo()

#+results: foo()
: bar.png

bar.png contains a plot, but no file link is inserted.

#+call: foo[:file biff.png]() :file biff.png

#+results: foo[:file biff.png]()
[[file:biff.png]]

a file link is inserted but file biff.png contains 'biff.png'

#+call: foo[:file pow.png]() :file pow.png :results graphics

#+results: foo[:file pow.png]()
[[file:pow.png]]

a file link is inserted but file pow.png contains 'pow.png'

Thanks,

Myles


On Wed, 05 Jan 2011 23:28:00 -0700
"Eric Schulte"  wrote:

> Hi Myles,
> 
> Currently I believe the best option is the solution you posted below,
> the file name is repeated because both the code block and the call
> line need to know the file name to create the file and the link
> respectively.
> 
> Cheers -- Eric
> 
> Myles English  writes:
> 
> > Myles English  gmail.com> writes:
> >
> >> #+source: foo()
> >> #+begin_src R :file bar.png
> >> plot(1,1)
> >> #+end_src
> >
> > This works but I have to repeat the filename:
> >
> > #+call: foo[:file baz.png]() :file baz.png
> >
> > #+results: foo[:file baz.png]()
> > [[file:baz.png]]
> >
> >   Myles
> >
> >
> > ___
> > 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


___
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


Re: [Orgmode] orgmode / emacs /msmtp on winxp

2011-01-22 Thread Eric S Fraga
Erwin Panen  writes:

> Hi,
>
> I guess this is perhaps more emacs related but here goes:
>
> I'm trying to get going with gnus.
> My system is running XP.
> I have msmtp installed and working. (tested using cli)
> In emacs using eshell and issuing msmtp --v I get the correct output.
>
> Versions:
> Gnus 5.13
> Emacs 23.2.1
> msmtp 1.4.17
>
> What goes wrong is this:
> In emacs I issue M-x mail, fill in, and C-c C-c to send => this opens
> my Thunderbird client.
>
> I've added the equivalent of these to .emacs and .gnus
> ---
> ;; with Emacs 23.1, you have to set this explicitly (in MS Windows)
> ;; otherwise it tries to send through OS associated mail client
> (setq message-send-mail-function 'message-send-mail-with-sendmail)
> ;; we substitute sendmail with msmtp
> (setq sendmail-program "c:/gnu/bin/msmtp.exe")
> ;;need to tell msmtp which account we're using
> (setq message-sendmail-extra-arguments '("-a" "anderson"))
> ;; you might want to set the following too
> (setq mail-host-address "gmail.com")
> (setq user-full-name "Anderson Guy")
> (setq user-mail-address "sivaram.notth...@gmail.com")
>
> What can I do to debug this behaviour?

Probably can't help you much but I have =mail-user-agent= set to
=gnus-user-agent= in my case.  You may wish to set it to
=sendmail-user-agent=.  I don't use MS Windows, mind you.

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.4 (release_7.4.232.g8d003.dirty)

___
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] orgmode / emacs /msmtp on winxp

2011-01-22 Thread Erwin Panen

Hi,

I guess this is perhaps more emacs related but here goes:

I'm trying to get going with gnus.
My system is running XP.
I have msmtp installed and working. (tested using cli)
In emacs using eshell and issuing msmtp --v I get the correct output.

Versions:
Gnus 5.13
Emacs 23.2.1
msmtp 1.4.17

What goes wrong is this:
In emacs I issue M-x mail, fill in, and C-c C-c to send => this opens my 
Thunderbird client.


I've added the equivalent of these to .emacs and .gnus
---
;; with Emacs 23.1, you have to set this explicitly (in MS Windows)
;; otherwise it tries to send through OS associated mail client
(setq message-send-mail-function 'message-send-mail-with-sendmail)
;; we substitute sendmail with msmtp
(setq sendmail-program "c:/gnu/bin/msmtp.exe")
;;need to tell msmtp which account we're using
(setq message-sendmail-extra-arguments '("-a" "anderson"))
;; you might want to set the following too
(setq mail-host-address "gmail.com")
(setq user-full-name "Anderson Guy")
(setq user-mail-address "sivaram.notth...@gmail.com")

What can I do to debug this behaviour?

___
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


Re: [Orgmode] bug in new lisp code or user error?

2011-01-22 Thread Nicolas Goaziou
> Samuel Wales writes:

> [I meant list in the subject] Thanks Nicolas. ISTR this is different
> from before. Did it work before?

It is also working right now, although in a different way. ;)

> It occurs when you have a list, and a paragraph someplace, and want
> to insert that paragraph as an item in the list. Pretty common.

When both the list and the paragraph are already created, and you need
to move the latter into the former, there's no Org way to do this.

But you can either use C-x r o, or cut the paragraph, go back to the
item, and yank it there.

> The problem with using 'regexp is that I need 2 blank lines after
> lists. I guess this is unavoidable?

You can have virtually any regexp to end a list, by changing
`org-list-end-re'.

Regards,

-- Nicolas

___
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


Re: [Orgmode] Re: Minor gotcha with org-agenda-files

2011-01-22 Thread Eric S Fraga
Tommy Kelly  writes:

> suvayu ali  writes:
>
>> On Sat, Jan 22, 2011 at 5:31 PM, Tommy Kelly  wrote:
>>> I just figured out why, despite having a setq in my .emacs, my
>>> org-agenda-files wasn't what I thought it should be.
>>>
>>> It's because if you modify that variable using C-c [ or C-c ], then any
>>> explicit setq is rendered obsolete by the custom-set-variables
>>> entry that gets added automatically.

Yes, this has bitten me a few times.  I sometimes add a file to the
list, temporarily I think, only to have it make a permanent change.  I
*never* remember that this command uses customize to effect the change.

>>
>> This is nothing org specific. Its how customise works. This is the
>> reason people are encouraged to _not_ mix customise with setq. I for
>> example use customise for everything except org settings.
>
> Ah but hang on.
>
> First, is it reasonable to consider it obvious (I mean, it wasn't to me)
> that using C-c [ invokes customize?
>
> Second, even if it is reasonable, isn't it the case that customize
> offers a temporary change of variables? You have to explicitly ask it to
> make the change permanent, no?

It would indeed be friendlier if this were done here as well.

> Overall, it just caught me unawares that C-c [ should write something in
> one of my files without even telling me let alone asking me. Maybe it's
> just me though. 

It's not just you!
-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.4 (release_7.4.232.g8d003)

___
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


Re: [Orgmode] bug in new lisp code or user error?

2011-01-22 Thread Samuel Wales
[I meant list in the subject]

Thanks Nicolas.  ISTR this is different from before.  Did it work before?

It occurs when you have a list, and a paragraph someplace, and want to
insert that paragraph as an item in the list.  Pretty common.

The problem with using 'regexp is that I need 2 blank lines after
lists.  I guess this is unavoidable?

Samuel

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com
I support WPI: http://www.wpinstitute.org/xmrv/index.html -- PLEASE DONATE
===
I want to see the original (pre-hold) Lo et al. 2010 NIH/FDA/Harvard MLV paper.

___
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


Re: [Orgmode] bug in new lisp code or user error?

2011-01-22 Thread Samuel Wales
(setf org-empty-line-terminates-plain-lists t) works but does not
allow paragraphs in lists.  I presume we're looking at incompossible
goals?

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com
I support WPI: http://www.wpinstitute.org/xmrv/index.html -- PLEASE DONATE
===
I want to see the original (pre-hold) Lo et al. 2010 NIH/FDA/Harvard MLV paper.

___
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


Re: [Orgmode] Re: Adding a new text/org mime type

2011-01-22 Thread Julien Danjou
> Please change it in the most sensible way.

I've changed to text/x-org.

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

___
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


Re: [Orgmode] bug in new lisp code or user error?

2011-01-22 Thread Nicolas Goaziou
Hello,

> Samuel Wales writes:

> When point is at [] and I press TAB, nothing happens.

>   ...
>   27) bikeshedding (talking about something you think you 
> []know about instead of what is important -- in this case,
> talking about what the audience thinks it knows about)
>   ...

User error in this case. Your second line is less or equally indented
than your last item: by definition, list ends where your cursor is.

So, when you ask for indentation, the text is put at the right spot.

On the other hand, you can set org-list-ending-method to 'regexp.
Then, indentation will not end lists anymore, and your text will
happily go inside the item in that case.

Regards,

-- Nicolas

___
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] Tags position in regular agenda view?

2011-01-22 Thread Tommy Kelly

org-tags-column appears to affect the position of TAGS only in the file
where a heading resides.

What controls where the tag appears in the regular dail agenda view?

(BTW - if it matters, many of my tags are implicit, being inherited from
a FILETAG or from a higher heading)

thanks,
Tommy


___
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: Minor gotcha with org-agenda-files

2011-01-22 Thread Tommy Kelly
suvayu ali  writes:

> On Sat, Jan 22, 2011 at 5:31 PM, Tommy Kelly  wrote:
>> I just figured out why, despite having a setq in my .emacs, my
>> org-agenda-files wasn't what I thought it should be.
>>
>> It's because if you modify that variable using C-c [ or C-c ], then any
>> explicit setq is rendered obsolete by the custom-set-variables
>> entry that gets added automatically.
>>
>
> This is nothing org specific. Its how customise works. This is the
> reason people are encouraged to _not_ mix customise with setq. I for
> example use customise for everything except org settings.

Ah but hang on.

First, is it reasonable to consider it obvious (I mean, it wasn't to me)
that using C-c [ invokes customize?

Second, even if it is reasonable, isn't it the case that customize
offers a temporary change of variables? You have to explicitly ask it to
make the change permanent, no?

Overall, it just caught me unawares that C-c [ should write something in
one of my files without even telling me let alone asking me. Maybe it's
just me though. 

Tommy


___
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] org-agenda: fix start/end time in timerange

2011-01-22 Thread Julien Danjou
* org-agenda.el (org-agenda-get-blocks): Fix time of start/end
of events with range. This display things like:
<2011-01-22 Sat 14:00>--<2011-01-23 Sun 20:00>
correctly, with the event starting at 14:00 and ending at 20:00.

Signed-off-by: Julien Danjou 
---
 lisp/org-agenda.el |   92 +++
 1 files changed, 49 insertions(+), 43 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 4f06eb0..3c1104e 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -5075,55 +5075,61 @@ FRACTION is what fraction of the head-warning time has 
passed."
  (abbreviate-file-name buffer-file-name
 (regexp org-tr-regexp)
 (d0 (calendar-absolute-from-gregorian date))
-marker hdmarker ee txt d1 d2 s1 s2 timestr category todo-state tags pos
+marker hdmarker ee txt d1 d2 s1 s2 category todo-state tags pos
 head donep)
 (goto-char (point-min))
 (while (re-search-forward regexp nil t)
   (catch :skip
(org-agenda-skip)
(setq pos (point))
-   (setq timestr (match-string 0)
- s1 (match-string 1)
- s2 (match-string 2)
- d1 (time-to-days (org-time-string-to-time s1))
- d2 (time-to-days (org-time-string-to-time s2)))
-   (if (and (> (- d0 d1) -1) (> (- d2 d0) -1))
-   ;; Only allow days between the limits, because the normal
-   ;; date stamps will catch the limits.
-   (save-excursion
- (setq todo-state (org-get-todo-state))
- (setq donep (member todo-state org-done-keywords))
- (if (and donep org-agenda-skip-timestamp-if-done)
- (throw :skip t))
- (setq marker (org-agenda-new-marker (point)))
- (setq category (org-get-category))
- (if (not (re-search-backward "^\\*+ " nil t))
- (setq txt org-agenda-no-heading-message)
-   (goto-char (match-beginning 0))
-   (setq hdmarker (org-agenda-new-marker (point)))
-   (setq tags (org-get-tags-at))
-   (looking-at "\\*+[ \t]+\\([^\r\n]+\\)")
-   (setq head (match-string 1))
-   (let ((remove-re
-  (if org-agenda-remove-timeranges-from-blocks
-  (concat
-   "<" (regexp-quote s1) ".*?>"
-   "--"
-   "<" (regexp-quote s2) ".*?>")
-nil)))
- (setq txt (org-format-agenda-item
-(format
- (nth (if (= d1 d2) 0 1)
-  org-agenda-timerange-leaders)
- (1+ (- d0 d1)) (1+ (- d2 d1)))
-head category tags
-timestr nil remove-re
- (org-add-props txt props
-   'org-marker marker 'org-hd-marker hdmarker
-   'type "block" 'date date
-   'todo-state todo-state
-   'priority (org-get-priority txt) 'org-category category)
- (push txt ee)))
+   (let ((start-time (match-string 1))
+ (end-time (match-string 2)))
+ (setq s1 (match-string 1)
+   s2 (match-string 2)
+   d1 (time-to-days (org-time-string-to-time s1))
+   d2 (time-to-days (org-time-string-to-time s2)))
+ (if (and (> (- d0 d1) -1) (> (- d2 d0) -1))
+ ;; Only allow days between the limits, because the normal
+ ;; date stamps will catch the limits.
+ (save-excursion
+   (setq todo-state (org-get-todo-state))
+   (setq donep (member todo-state org-done-keywords))
+   (if (and donep org-agenda-skip-timestamp-if-done)
+   (throw :skip t))
+   (setq marker (org-agenda-new-marker (point)))
+   (setq category (org-get-category))
+   (if (not (re-search-backward "^\\*+ " nil t))
+   (setq txt org-agenda-no-heading-message)
+ (goto-char (match-beginning 0))
+ (setq hdmarker (org-agenda-new-marker (point)))
+ (setq tags (org-get-tags-at))
+ (looking-at "\\*+[ \t]+\\([^\r\n]+\\)")
+ (setq head (match-string 1))
+ (let ((remove-re
+(if org-agenda-remove-timeranges-from-blocks
+(concat
+ "<" (regexp-quote s1) ".*?>"
+ "--"
+ "<" (regexp-quote s2) ".*?>")
+  nil)))
+   (setq txt (org-format-agenda-item
+  (format
+   (nth (if (= d1 d2) 0 1)
+org-agenda-timerange-leaders)
+   (

Re: [Orgmode] Minor gotcha with org-agenda-files

2011-01-22 Thread suvayu ali
On Sat, Jan 22, 2011 at 5:31 PM, Tommy Kelly  wrote:
> I just figured out why, despite having a setq in my .emacs, my
> org-agenda-files wasn't what I thought it should be.
>
> It's because if you modify that variable using C-c [ or C-c ], then any
> explicit setq is rendered obsolete by the custom-set-variables
> entry that gets added automatically.
>

This is nothing org specific. Its how customise works. This is the
reason people are encouraged to _not_ mix customise with setq. I for
example use customise for everything except org settings.

-- 
Suvayu

Open source is the future. It sets us free.

___
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] Minor gotcha with org-agenda-files

2011-01-22 Thread Tommy Kelly
I just figured out why, despite having a setq in my .emacs, my
org-agenda-files wasn't what I thought it should be.

It's because if you modify that variable using C-c [ or C-c ], then any
explicit setq is rendered obsolete by the custom-set-variables
entry that gets added automatically.

Tell us something we don't know, says y'all, and maybe it's as it should
be. But in that case would it be worth adding a note to the relevant
part of section 10.1 in the manual?

Tommy

P.S. The current online section 10.1 says that C-c [ is bound
to org-agenda-to-front. In fact it appears to be bound to
org-agenda-file-to-front. 


___
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] Minor gotcha with org-agenda-files

2011-01-22 Thread Tommy Kelly
I just figured out why, despite having a setq in my .emacs, my
org-agenda-files wasn't what I thought it should be.

It's because if you modify that variable using C-c [ or C-c ], then any
explicit setq is rendered obsolete by the custom-set-variables
entry that gets added automatically.

Tell us something we don't know, says y'all, and maybe it's as it should
be. But in that case would it be worth adding a note to the relevant
part of section 10.1 in the manual?

Tommy

P.S. The current online section 10.1 says that C-c [ is bound
to org-agenda-to-front. In fact it appears to be bound to
org-agenda-file-to-front. 


___
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] Special properties -- doc buglet?

2011-01-22 Thread Tommy Kelly
In section "7.2 Special properties" the current online org manual says:

"The following property names are special and should not be used as keys
in the properties drawer:

...
CATEGORY
...
"


Is it correct to have "CATEGORY" in that list? I thought that putting it
as a key into the property drawer just is how to specify categories.

Tommy


___
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] Special properties -- doc buglet?

2011-01-22 Thread Tommy Kelly
In section "7.2 Special properties" the current online org manual says:

"The following property names are special and should not be used as keys
in the properties drawer:

...
CATEGORY
...
"


Is it correct to have "CATEGORY" in that list? I thought that putting it
as a key into the property drawer was exactly how to specify categories.

Tommy


___
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


Re: [Orgmode] using orgmode links in non-orgmode buffers

2011-01-22 Thread Matthew Fidler
See

http://orgmode.org/manual/Using-links-outside-Org.html#Using-links-outside-Org

Matt

On Jan 22, 2011, at 6:22 AM, Marco Craveiro  wrote:

> hello orgmoders,
>
> i was wondering if there is a minor mode provided by orgmode that allows
> other major modes to understand orgmode links? in particular, i'd like
> to be able to put these links in magit commits:
>
> [[file:some_file_in_git_repo]]
>
> and then be able to open that file like I can in orgmode.
>
> many thanks for your time.
>
> marco
> --
> Constraint has encouraged not only economy, but also a certain elegance
> of design. -- Dennis Ritchie
>
> ___
> 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

___
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] using orgmode links in non-orgmode buffers

2011-01-22 Thread Marco Craveiro
hello orgmoders,

i was wondering if there is a minor mode provided by orgmode that allows
other major modes to understand orgmode links? in particular, i'd like
to be able to put these links in magit commits:

[[file:some_file_in_git_repo]]

and then be able to open that file like I can in orgmode.

many thanks for your time.

marco
-- 
Constraint has encouraged not only economy, but also a certain elegance
of design. -- Dennis Ritchie



signature.asc
Description: This is a digitally signed message part
___
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