Re: [Orgmode] Re: Additional Properties for Export

2008-05-21 Thread Carsten Dominik


On May 20, 2008, at 9:41 PM, Peter Jones wrote:


Carsten Dominik <[EMAIL PROTECTED]> writes:

Hi Peter, how do you export a single subtree?  If you do it by
selecting the subtree as the region, then the headling of the subtree
will become the title for export. - - - Actually, I just tried, and
that does not work.  Bug is fixed now, in the git-repo.


I narrow to the subree.  I do wish it were a little easier to export a
subtree, because I have to ensure that nothing is folded after I
narrow to the subtree.

Thanks for adding EXPORT_TITLE.


The EXPORT_OPTIONS property is a lot harder, can you motivate why and
how you would want it?


A simple use case is the table of contents.  When exporting the entire
file I want a TOC.  When exporting a subtree, however, I don't.  This
feature isn't as important as the EXPORT_TITLE is.  If you want, I can
see if I can come up with a patch for it.


OK, EXPORT_OPTIONS and EXPORT_TEXT work now as well.  Don't forget that
you can also set EXPORT_FILE_NAME.

- Carsten



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


Re: [Orgmode] Bug found (but don't know to fix)

2008-05-21 Thread Carsten Dominik

Hi Wanrong,

how about the following patch:

- Carsten

diff --git a/lisp/org.el b/lisp/org.el
index 9094204..ee1b923 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -7385,7 +7385,9 @@ If the file does not exist, an error is thrown."
(setq cmd (replace-match "%s" t t cmd)))
   (while (string-match "%s" cmd)
(setq cmd (replace-match
-  (save-match-data (shell-quote-argument file))
+  (save-match-data
+(shell-quote-argument
+ (convert-standard-filename file)))
   t t cmd)))
   (save-window-excursion
(start-process-shell-command cmd nil cmd)






On May 19, 2008, at 11:59 PM, Wanrong Lin wrote:


Hi Carsten:

I have observed that in Windows "org-open-at-point" (bound to RET  
key in my config) does not work on something like this:


file:\\hostname\path

Today I dug a little bit into it, and found the problem is here (in  
red):


(defun org-open-file (path &optional in-emacs line search)
  "Open the file at PATH.
First, this expands any special file name abbreviations.  Then the
configuration variable `org-file-apps' is checked if it contains an
entry for this file type, and if yes, the corresponding command is  
launched.

If no application is found, Emacs simply visits the file.
With optional argument IN-EMACS, Emacs will visit the file.
Optional LINE specifies a line to go to, optional SEARCH a string to
search for.  If LINE or SEARCH is given, the file will always be
opened in Emacs.
If the file does not exist, an error is thrown."
  (setq in-emacs (or in-emacs line search))
  (let* ((file (if (equal path "")
   buffer-file-name
 (substitute-in-file-name (expand-file-name path

(expand-file-name path) replaces all backslashes with forward  
slashes, and later in the same function



(if search (org-link-search search
 ((consp cmd)
  (eval cmd))

Here "cmd" variable is "(w32-shell-execute "open" file)", and w32- 
shell-execute will complain about the file not existing.


When in-emacs is t, everything works fine, as Emacs understand both  
forward and backward slashes.


Also, it works fine on regular file path like this:
 file:c:\path\file.txt

That is because somehow my Windows system is setup (by our IT guys)  
to understand both forward and backward slashes, but that only works  
on regular file paths, not the Windows shared directory paths.


I wonder whether this can get fixed. Thank you very much.

Wanrong

___
Emacs-orgmode mailing list
Remember: 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
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] firefox urls

2008-05-21 Thread Richard G Riley
Nick Dokos <[EMAIL PROTECTED]> writes:

> Daniel M German <[EMAIL PROTECTED]> wrote:
>
>>  >> 
>>  >> Hi Alan,
>>  >> 
>>  >> Did you download the file as I indicated in my previous message? It has
>>  >> detailed instructions on how to get all the pieces working.
>>  >> 
>>  >> --dmg
>> 
>>  Richard> I followed the instructions but I cant get it working.
>> 
>>  Richard> Are the instructions for adding 2 bookmarklets lacking since
>>  Richard> it only really describes remember protocol? (Step 2).
>> 
>>  Richard> Step 3 only mentioned the remember handler. Should there also be an
>>  Richard> annotate handler?
>> 
>> 
>> Start by doing remember first. Are you able to get the remember command
>> line script (what I call the handler) working? Try it from the command
>> line.
>> 
>> I suspect your javascript bookmarklet is not passing the info of the
>> page correctly. I would double check that first.
>> 
>> --dmg
>> 
>> 
>>  Richard> I dont think I did anything too silly and wonder if anyone else 
>> managed
>>  Richard> to install this properly? Currently when I click on the remember
>>  Richard> bookmarklet the pane empties and emacs prompts me for a template 
>> type
>>  Richard> but then does not insert the link. It just inserts "about:blank" 
>> as the
>>  Richard> link.
>> 
>
> I think part of the problem is that the comments are inconsistent:
>
> Step 1 (and Daniel, in the mail above) talks about the "remember"
> script, while the script itself and Step 3 talk about the
> "org-annotation-helper" script.
>
> Here is an attempt at clarification: it's mostly minor edits but there
> are enough of them that I thought I'd send out the whole thing rather
> than a patch. It is still very much oriented towards Linux.
>
> However, I have problems with how the remember template works, so the
> description below is fuzzy, perhaps incomplete, perhaps wrong.

I still get prompted for a template type. Is there no way for the
bookmark code to auto select a "Bookmarks" template type?

>
> With this caveat, Richard, can you try these steps out and see if they
> work/make sense? If this is deemed OK, then maybe it can replace the
> comment section in org-annotation-helper.el, after the requisite additions/
> corrections/deletions are made.
>
> Regards,
> Nick
>
> ---
> [Debugging notes - skip ahead if not interested]
>
> Assuming I have defined a remember template like this:
>
>(?w "* %u %c \n\n%i" "~/lib/org/bookmarks.org" "Web links")
>
> when bzg/org-annotation-helper calls org-remember with argument ?w, I
> expect this template to pop up in a *Remember* buffer. Instead, I get
> asked which template I want to use (I have three more templates in
> org-remember-templates). When I say "w" and force the choice, the
> contents of the buffer are not what I expect: I get the time stamp from
> %u, and the link from %c, but *not* the selection from %i. I uncommented
> the echo in the script and the browser is passing the selection to the
> script correctly. I also single-stepped through
> bzg/org-annotation-helper, which sets the :region property of the link
> to the selection like so:
>
>   (org-store-link-props :type type
> :link url
> :region region
> :description title)
>
> but somehow that seems to get dropped on the floor afterwards. Maybe a
> bug in org-remember? I 'm under the (possibly erroneous?) impression
> that we should be going through the if-true path of the following code
> in org-remember (as shown by the arrow):
>
> ...
> ;; `org-select-remember-template'
> (setq org-select-template-temp-major-mode major-mode)
> (setq org-select-template-original-buffer (current-buffer))
> (if (eq org-finish-function 'org-remember-finalize)
> ?---> (progn
> (when (< (length org-remember-templates) 2)
>   (error "No other template available"))
> (erase-buffer)
> (let ((annotation (plist-get org-store-link-plist :annotation))
>   (initial (plist-get org-store-link-plist :initial)))
>   (org-remember-apply-template))
> (message "Press C-c C-c to remember data"))
>   (if (org-region-active-p)
> (org-do-remember (buffer-substring (point) (mark)))
>   (org-do-remember))
>
> but org-finish-function is nil in this case, so we fall through to the
> org-do-remember at the end.
>
> [end of debugging notes]
> ---
>
> ;; We want to be able to pass a URL and document title directly from a
> ;; web browser to Emacs.
> ;;
> ;; We define a remember:// url handler in the browser and use a shell
> ;; script to handle the protocol.  This script passes the information
> ;; to a running Emacs process (using emacsclient/gnuclient).  We use 
> ;; bookmarklets to create the remember:// urls dynamically.
> ;;
>

Re: [Orgmode] firefox urls

2008-05-21 Thread Richard G Riley
Carsten Dominik <[EMAIL PROTECTED]> writes:

> On May 21, 2008, at 3:49 AM, John Rakestraw wrote:
>
>> On Tue, 20 May 2008 16:46:37 -0400
>> Nick Dokos <[EMAIL PROTECTED]> wrote:
>>
>>> when bzg/org-annotation-helper calls org-remember with argument ?w, I
>>> expect this template to pop up in a *Remember* buffer. Instead, I get
>>> asked which template I want to use (I have three more templates in
>>> org-remember-templates).
>>
>> I get the same thing -- in fact, org-annotation-helper has *never*
>> forced the selection of the template for me in the months I've been
>> using it; I've always had to select it by pressing "w". Even more
>> puzzling (to me, anyway), is that occasionally when I press "w" the
>> first time, I get nothing, but when I press it the second time, I get
>> the template, complete with a "w" keyed in at point.
>
> This seems to be a bug in org-annotation-helper.el.
> org-remember must be called like this:

> (org-remember nil ?w)
>
> instead of like this:
>
> (org-remember ?w)

When I tried this, then I get prompted for no templates (good) but there
is no url inserted either.

Has anyone else had success following Nick's new instructions to get
this working? I just tried from scratch and am seeing the same issues.


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


Re: [Orgmode] Converting lists to todo items and back

2008-05-21 Thread Carsten Dominik

Hi Bernt,

this is a relative specializes application, for example you want the  
items to be turned into, not just outline headings, but also TODO  
entries.


Org has these:

C-c *  can turn an item into a headline.

However, the heading will always be a subheading of the nearest  
heading above,

so to convert your list, you should start from te end.


C-c -  can turn an headline into an item

`C-c -' will also take an active region and turn each line into an item.

My personal solution fo things like this usually is  keyboard macro.
For example, in this case



,[ from this ]
| * New Task
|   - [ ] item 1
|   detail goes here
|   - more detail
|   - blah
|   - [ ] item 2
|   More detail here
|   
|   end of detail
|   - [ ] item 3
`



I would position the cursor in "* New Task" line and then type:

C-x (; start keyboard macro
C-s ] RET; search forward to "]"
C-SPACE  ; set the mark
C-a  ; beginning of line
C-w  ; kill region
** TODO  ; Type new headline starter
C-x ); End kbd macro

And then type `C-x e' as often as necessary.
You can even do `C-u 200 C-x e' to get 200 repetitions in one go.

Once you have a feeling for how to write macros so that they will
safely do things, and safely position the cursor in the location
where you want it to start the next repetition, this is a really
efficient way of doing things.

If you keep doing the exact same conversion all the time,
yes, write a special command.

HTH

- Carsten



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


[Orgmode] gantt chart similar overview of time for project planning

2008-05-21 Thread Kevin Nagel

hello,

I started using orgmode and love it. however one thing is missing,
which is a simple way of checking out the dates to see if there is
time to allocate for a task/project without interfering others and
also able to readjust it. the view would be sth like a gantt chart,
but simple colored boxes along the project/task header and the dates
would be sufficient. is that doable? is it a matter of adjusting the
column view? can i manipulate the dates in the column view too? i
think it is really crucial, as looking up in the calendar and
selecting dates without colliding with other scheduled dates is not
clear.

thanx for reply in advance.

kev






-- 
lost in kaleidoscope skies...
  ...kevin

Kevin Nagel
EMBL Outstation - Hinxton
European Bioinformatics Institute
Wellcome Trust Genome Campus
Hinxton
Cambridge, CB10 1SD
United Kingdom



-- 
lost in kaleidoscope skies...
  ...kevin

Kevin Nagel
PhD Student
EMBL Outstation - Hinxton
European Bioinformatics Institute
Wellcome Trust Genome Campus
Hinxton
Cambridge, CB10 1SD
United Kingdom



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


[Orgmode] Re: Converting lists to todo items and back

2008-05-21 Thread Bernt Hansen
Carsten Dominik <[EMAIL PROTECTED]> writes:

> Org has these:
>
> C-c *  can turn an item into a headline.
>
> However, the heading will always be a subheading of the nearest
> heading above,
> so to convert your list, you should start from te end.
>
>
> C-c -  can turn an headline into an item
>
> `C-c -' will also take an active region and turn each line into an item.
>
> My personal solution fo things like this usually is  keyboard macro.
> For example, in this case

Thanks for the feedback :).  I wasn't aware of the C-c - and C-c * key
bindings.  I think I need to review the org-mode manual every quarter or
something - there's so much useful stuff in org-mode!

I ended up using a regexp replacement for converting my lists which
turned out to be pretty easy.

Sorry for the noise.

-Bernt


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


[Orgmode] Re: Converting lists to todo items and back

2008-05-21 Thread Carsten Dominik


On May 21, 2008, at 2:54 PM, Bernt Hansen wrote:


Carsten Dominik <[EMAIL PROTECTED]> writes:


Org has these:

C-c *  can turn an item into a headline.

However, the heading will always be a subheading of the nearest
heading above,
so to convert your list, you should start from te end.


C-c -  can turn an headline into an item

`C-c -' will also take an active region and turn each line into an  
item.


My personal solution fo things like this usually is  keyboard macro.
For example, in this case


Thanks for the feedback :).  I wasn't aware of the C-c - and C-c * key
bindings.  I think I need to review the org-mode manual every  
quarter or

something - there's so much useful stuff in org-mode!

I ended up using a regexp replacement for converting my lists which
turned out to be pretty easy.


Yes, for people who can use regexps this is clearly a fast option.

- Carsten



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


Re: [Orgmode] Bug found (but don't know to fix)

2008-05-21 Thread Wanrong Lin

Hi, Carsten,

Thanks a lot for the patch. I tried it, but it does not work. I traced 
into the "org-open-at-point" function and found the patch is not 
executed because the condition *"(stringp cmd)" *is not satisfied, as 
"cmd" is a list "(w32-shell-execute "open" file)". This function seems a 
little bit too complicated for me to sort out, would you mind taking 
another look into it, or giving some suggestion on how to fix it? Thank you.


Wanrong


   (cond
((and *(stringp cmd)* (not (string-match "^\\s-*$" cmd)))
 ;; Remove quotes around the file name - we'll use 
shell-quote-argument.

 (while (string-match "['\"]%s['\"]" cmd)
   (setq cmd (replace-match "%s" t t cmd)))
 (while (string-match "%s" cmd)
   (setq cmd (replace-match
  (save-match-data
(shell-quote-argument   
 (convert-standard-filename file)))

  t t cmd)))
 (save-window-excursion
   (start-process-shell-command cmd nil cmd)
   (and (boundp 'org-wait) (numberp org-wait) (sit-for org-wait))
   ))


Carsten Dominik wrote:

Hi Wanrong,

how about the following patch:

- Carsten

diff --git a/lisp/org.el b/lisp/org.el
index 9094204..ee1b923 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -7385,7 +7385,9 @@ If the file does not exist, an error is thrown."
  (setq cmd (replace-match "%s" t t cmd)))
   (while (string-match "%s" cmd)
  (setq cmd (replace-match
-   (save-match-data (shell-quote-argument file))
+   (save-match-data
+ (shell-quote-argument
+  (convert-standard-filename file)))
t t cmd)))
   (save-window-excursion
  (start-process-shell-command cmd nil cmd)






On May 19, 2008, at 11:59 PM, Wanrong Lin wrote:

Hi Carsten:

I have observed that in Windows "org-open-at-point" (bound to RET key 
in my config) does not work on something like this:


file:\\hostname\path

Today I dug a little bit into it, and found the problem is here (in red):

(defun org-open-file (path &optional in-emacs line search)
  "Open the file at PATH.
First, this expands any special file name abbreviations.  Then the
configuration variable `org-file-apps' is checked if it contains an
entry for this file type, and if yes, the corresponding command is 
launched.

If no application is found, Emacs simply visits the file.
With optional argument IN-EMACS, Emacs will visit the file.
Optional LINE specifies a line to go to, optional SEARCH a string to
search for.  If LINE or SEARCH is given, the file will always be
opened in Emacs.
If the file does not exist, an error is thrown."
  (setq in-emacs (or in-emacs line search))
  (let* ((file (if (equal path "")
   buffer-file-name
 (substitute-in-file-name *(expand-file-name path)*)))

*(expand-file-name path) *replaces all backslashes with forward 
slashes, and later in the same function



(if search (org-link-search search
 ((consp cmd)
  *(eval cmd)*)

Here "cmd" variable is "(w32-shell-execute "open" file)", and 
w32-shell-execute will complain about the file not existing.


When in-emacs is t, everything works fine, as Emacs understand both 
forward and backward slashes.


Also, it works fine on regular file path like this:
 file:c:\path\file.txt

That is because somehow my Windows system is setup (by our IT guys) 
to understand both forward and backward slashes, but that only works 
on regular file paths, not the Windows shared directory paths.


I wonder whether this can get fixed. Thank you very much.

Wanrong

___
Emacs-orgmode mailing list
Remember: 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
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] firefox urls

2008-05-21 Thread John Rakestraw
On Wed, 21 May 2008 07:28:58 +0200
Carsten Dominik <[EMAIL PROTECTED]> wrote:

> This seems to be a bug in org-annotation-helper.el.
> org-remember must be called like this:
> 
> (org-remember nil ?w)
> 
> instead of like this:
> 
> (org-remember ?w)

Thanks, Carsten. That fixed it.

--John


-- 
John Rakestraw


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


Re: [Orgmode] firefox urls

2008-05-21 Thread Nick Dokos
John Rakestraw <[EMAIL PROTECTED]> wrote:


> ... Even more puzzling (to me, anyway), is that occasionally when I
> press "w" the first time, I get nothing, but when I press it the
> second time, I get the template, complete with a "w" keyed in at
> point.

Me too :-) I've learnt to just start typing what I want: after the
first character typed, the display refreshes and I just continue
normally.


> When I use the %i variable in the template, I get the same thing you
> describe -- the selection doesn't show up in the note created from the
> template. When I use "%:region" instead of "%i", it does show up as
> expected.
> 

That's good to know: I'll try that later on.

Thanks,
Nick



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


Re: [Orgmode] firefox urls

2008-05-21 Thread Daniel M German

 Carsten> This seems to be a bug in org-annotation-helper.el.
 Carsten> org-remember must be called like this:

 Carsten> (org-remember nil ?w)

 Carsten> instead of like this:

 Carsten> (org-remember ?w)


 Carsten> Furthermore, in order to get %i as the region, you need to
 Carsten> select the text in the *org-ann* temporary buffer, after inserting
 Carsten> the text.  So after "(insert region)", maybe you need something
 Carsten> like:

 Carsten> (insert-region)
 Carsten> (goto-char (point-max))
 Carsten> (set-mark (point-min))

 Carsten> An you need to have transient-mark-mode on for this.
 Carsten> This is a hack, I think it is actually better to use %:region in
 Carsten> the template instead.

Yes, that was a hack. I could not find any other way to "select" the
text than to create a new buffer where I set the mark, then pasted the
text --that seemed enought for my emacs configuration to have the text
selected. I'll look at your suggestions and update the code.

Thanks Carsten,

--daniel


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


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


Re: [Orgmode] firefox urls

2008-05-21 Thread John Rakestraw
On Wed, 21 May 2008 13:06:53 +0200
Richard G Riley <[EMAIL PROTECTED]> wrote:

> Has anyone else had success following Nick's new instructions to get
> this working? I just tried from scratch and am seeing the same issues.

It's working for me. I should admit (for those who have not been
following this thread) that I had this working in Bastien's earlier
version, so "following Nick's new instructions" (and Ben's
instructions) means looking through those instructions to make the
requisite changes to Bastien's earlier version.

Three points that might be relevant:

  - my org-annotation-helper.el file incorporates the change suggested
by Carsten's recent email in this thread:
- "(org-remember nil ?w)" instead of "(org-remember ?w)
  - my template uses "%:region" instead of "%i" to set the location
for the region copied in the browser to be inserted.
  - I updated my system this week from Fedora 7 to Fedora 9. It
appears that he new version of Firefox (3.0b5) changes the naming
convention for the network.protocol-handler inserted in
about.config:
  - "network.protocol-handler.app.remember" instead of
"network.protocol-handler.remember" (I can't verify this
because I can't figure out how to delete the
network.protocol-handler to start from scratch, but it appears
that if you just set up the bookmarklet and then click on it,
Firefox 3 will ask you for the application -- you then
navigate to the shell script, double-click on it, and firefox
sets up network.protocol-handler for you.)

If it's not working for you, then I think (though remember I'm not a
programmer ;-) that the problem is likely either in your template or
in the bookmarklet set-up. You might start troubleshooting by
following Dan's suggestion to test your template by starting emacs and
then running this command from a shell prompt:

  org-annotation-helper 'remember://http%3A//orgmode.org/ \
  ::remember::Org-Mode%20Homepage::remember::Notes' 

If that opens up your template with the proper insertions, then check
out the bookmarklet.

Hope that helps -- or at least that it doesn't introduce further
confusions.

--John


-- 
John Rakestraw


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


Re: [Orgmode] firefox urls

2008-05-21 Thread Nick Dokos
John Rakestraw <[EMAIL PROTECTED]> wrote:


> If it's not working for you, then I think (though remember I'm not a
> programmer ;-) that the problem is likely either in your template or
> in the bookmarklet set-up. You might start troubleshooting by
> following Dan's suggestion to test your template by starting emacs and
> then running this command from a shell prompt:
> 
>   org-annotation-helper 'remember://http%3A//orgmode.org/ \
>   ::remember::Org-Mode%20Homepage::remember::Notes' 
> 
> If that opens up your template with the proper insertions, then check
> out the bookmarklet.
> 

It might help to uncomment the echo in the shell script. When
you click on the bookmarklet, the script should run, and save the
argument that it was called with, in /tmp/remember.out. It should look
something like this:

   remember://http://foo.bar.com/baz.html::rememberremember::

or like this:

   annotation://http://foo.bar.com/baz.html::remember::

depending on which of the two bookmarklets you clicked and whether you
had selected some text in the browser (that goes into ).

If that's the case, then the browser set-up is fine. If not, it's not!-)
Divide et impera.

Nick


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


Re: [Orgmode] Bug found (but don't know to fix)

2008-05-21 Thread Carsten Dominik


On May 21, 2008, at 4:25 PM, Wanrong Lin wrote:


Hi, Carsten,

Thanks a lot for the patch. I tried it, but it does not work. I  
traced into the "org-open-at-point" function and found the patch is  
not executed because the condition *"(stringp cmd)" *is not  
satisfied, as "cmd" is a list "(w32-shell-execute "open" file)".  
This function seems a little bit too complicated for me to sort out,  
would you mind taking another look into it, or giving some  
suggestion on how to fix it? Thank you.


Hi Wanrong,

How about this patch then:

diff --git a/lisp/org.el b/lisp/org.el
index 9094204..4e2aa58 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -7385,7 +7385,9 @@ If the file does not exist, an error is thrown."
(setq cmd (replace-match "%s" t t cmd)))
   (while (string-match "%s" cmd)
(setq cmd (replace-match
-  (save-match-data (shell-quote-argument file))
+  (save-match-data
+(shell-quote-argument
+ (convert-standard-filename file)))
   t t cmd)))
   (save-window-excursion
(start-process-shell-command cmd nil cmd)
@@ -7398,7 +7400,8 @@ If the file does not exist, an error is thrown."
   (if line (goto-line line)
(if search (org-link-search search
  ((consp cmd)
-  (eval cmd))
+  (let ((file (convert-standard-filename file)))
+   (eval cmd)))
  (t (funcall (cdr (assq 'file org-link-frame-setup)) file)))
 (and (org-mode-p) (eq old-mode 'org-mode)
 (or (not (equal old-buffer (current-buffer)))




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


Re: [Orgmode] Bug found (but don't know to fix)

2008-05-21 Thread Wanrong Lin


Yes, this works! Thank you.

Wanrong

Carsten Dominik wrote:


On May 21, 2008, at 4:25 PM, Wanrong Lin wrote:


Hi, Carsten,

Thanks a lot for the patch. I tried it, but it does not work. I 
traced into the "org-open-at-point" function and found the patch is 
not executed because the condition *"(stringp cmd)" *is not 
satisfied, as "cmd" is a list "(w32-shell-execute "open" file)". This 
function seems a little bit too complicated for me to sort out, would 
you mind taking another look into it, or giving some suggestion on 
how to fix it? Thank you.


Hi Wanrong,

How about this patch then:

diff --git a/lisp/org.el b/lisp/org.el
index 9094204..4e2aa58 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -7385,7 +7385,9 @@ If the file does not exist, an error is thrown."
 (setq cmd (replace-match "%s" t t cmd)))
   (while (string-match "%s" cmd)
 (setq cmd (replace-match
-   (save-match-data (shell-quote-argument file))
+   (save-match-data
+ (shell-quote-argument
+  (convert-standard-filename file)))
t t cmd)))
   (save-window-excursion
 (start-process-shell-command cmd nil cmd)
@@ -7398,7 +7400,8 @@ If the file does not exist, an error is thrown."
   (if line (goto-line line)
 (if search (org-link-search search
  ((consp cmd)
-  (eval cmd))
+  (let ((file (convert-standard-filename file)))
+(eval cmd)))
  (t (funcall (cdr (assq 'file org-link-frame-setup)) file)))
 (and (org-mode-p) (eq old-mode 'org-mode)
  (or (not (equal old-buffer (current-buffer)))






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


[Orgmode] Link question

2008-05-21 Thread Shaun Johnson

I'm a light user of Orgmode so the following might not be sensible or there 
might
be some existing way to achieve the same effect.

I have an Org file like:

* Glossary
...
** Address
...
* Implementation
...
** Address
...

What I would like is to have distinct links to the two 'Address' headlines. I 
can't
see a way to this with the standard link types. A possible solution would be to 
introduce
a 'path based' link type where the two 'Address' headlines have distinct paths 
through the
outline tree of ("Glossary" "Address") and ("Implementation" "Address").

Does this make sense or am I gibbering?

If it does make sense then my Elisp skills are probably up to implementing this.

Thanks in advance,

Shaun.


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


Re: [Orgmode] Link question

2008-05-21 Thread Carsten Dominik

Hi Shaun,

I think this would indeed make sense.  I guess it should
use "/" as a separator, and it should ideally ignore TODO keywords,
priority cookies, and tags.

Please go ahead and give it a try - to include it into Org you would  
have

to sin the papers with the FSF.

Best wishes

- Carsten

On May 21, 2008, at 7:57 PM, Shaun Johnson wrote:

I'm a light user of Orgmode so the following might not be sensible  
or there might

be some existing way to achieve the same effect.

I have an Org file like:

* Glossary
...
** Address
...
* Implementation
...
** Address
...

What I would like is to have distinct links to the two 'Address'  
headlines. I can't
see a way to this with the standard link types. A possible solution  
would be to introduce
a 'path based' link type where the two 'Address' headlines have  
distinct paths through the
outline tree of ("Glossary" "Address") and ("Implementation"  
"Address").


Does this make sense or am I gibbering?

If it does make sense then my Elisp skills are probably up to  
implementing this.


Thanks in advance,

Shaun.


___
Emacs-orgmode mailing list
Remember: 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
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode