emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* shell links [was: Version 4.19c]
@ 2006-04-06 16:30 Scott Otterson
  2006-04-06 19:28 ` Carsten Dominik
  0 siblings, 1 reply; 4+ messages in thread
From: Scott Otterson @ 2006-04-06 16:30 UTC (permalink / raw)
  To: emacs-orgmode

Lot's of nice changes in 4.19.  I'm really impressed at how fast Carsten 
& Co. are cranking out new code and new fixes.

Looks like there are a few problems with shell links in 4.19c, though.

1.) If I type C-c C-l, and then at the link: prompt, type

     shell:SPACE

    where SPACE means I hit the spacebar, then I get a [No Match] error
    message.  If I instead type:

     shell:lsSPACE

    then I get the [No Match] error after the 'ls'

2.) If I manually make a shell link like this

      [[shell:ls *.org][shellcmd]]

     and then type C-c C-o.  The minibuffer asks m:


       Execute " " in the shel? (yes or no)

     Even though there's a blank, the ls command works if I say yes

3.) If I put the cursor in the link and type C-c C-l, then
      the minibuffer says:

      Link: shell:ls%20*.org

     If I cancel (C-g), C-c C-o still works.

Scott

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: shell links [was: Version 4.19c]
  2006-04-06 16:30 shell links [was: Version 4.19c] Scott Otterson
@ 2006-04-06 19:28 ` Carsten Dominik
  2006-04-10 17:41   ` Scott Otterson
  0 siblings, 1 reply; 4+ messages in thread
From: Carsten Dominik @ 2006-04-06 19:28 UTC (permalink / raw)
  To: Scott Otterson; +Cc: emacs-orgmode

> Lot's of nice changes in 4.19.  I'm really impressed at how fast 
> Carsten & Co. are cranking out new code and new fixes.

Fixing goes fast if people are out there testing things.  Thanks for 
your report.

>
> Looks like there are a few problems with shell links in 4.19c, though.
>
> 1.) If I type C-c C-l, and then at the link: prompt, type
>
>     shell:SPACE
>
>    where SPACE means I hit the spacebar, then I get a [No Match] error
>    message.  If I instead type:
>
>     shell:lsSPACE
>
>    then I get the [No Match] error after the 'ls'

This is because SPACE does completion in the minibuffer.  Hmm.  Ok, I 
can turn this default off  and make SPACE insert itself.  This means 
that only TAB will do completion in the minibuffer at the C-c C-l 
prompt. Not a problem, I guess.

>
> 2.) If I manually make a shell link like this
>
>      [[shell:ls *.org][shellcmd]]
>
>     and then type C-c C-o.  The minibuffer asks m:
>
>       Execute " " in the shel? (yes or no)
>
>     Even though there's a blank, the ls command works if I say yes

The command is there, it is only invisible because it is a copy of the 
invisible command in the [[ ]] link :-).  I am removing this 
invisibility property now.

>
> 3.) If I put the cursor in the link and type C-c C-l, then
>      the minibuffer says:
>
>      Link: shell:ls%20*.org
>
>     If I cancel (C-g), C-c C-o still works.
>

In the hidden part of a link, space and brackets are escaped.  I forgot 
to unescape for the editing prompt.

While I was at it, I have also removed the restrictions on shell 
commands.  Shell: links in [[ ]] brackets can now contain "<", ">", and 
"|".  These restrictions were only needed in <> links, but now no 
longer.  This is nice.

Also, maybe you'd like to know that there is a variable to turn off the 
safety query in shell links: org-confirm-shell-links.  I could also 
change the yes-or-no query to a y-or-n query to make it easier to 
answer....  We'll see, not now.

> Scott

Thanks.  The above named changes are in

http://www.astro.uva.nl/~dominik/Tools/org/org-4.19d.zip

- Carsten

>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>

--
Carsten Dominik
Sterrenkundig Instituut "Anton Pannekoek"
Universiteit van Amsterdam
Kruislaan 403
NL-1098SJ Amsterdam
phone: +31 20 525 7477

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: shell links [was: Version 4.19c]
  2006-04-06 19:28 ` Carsten Dominik
@ 2006-04-10 17:41   ` Scott Otterson
  2006-04-11 11:47     ` Carsten Dominik
  0 siblings, 1 reply; 4+ messages in thread
From: Scott Otterson @ 2006-04-10 17:41 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

Carsten Dominik (04/06/2006 12:28 PM) wrote:
>> scotto:
>> 3.) If I put the cursor in the link and type C-c C-l, then
>>      the minibuffer says:
>>
>>      Link: shell:ls%20*.org
>>
>>     If I cancel (C-g), C-c C-o still works.
>>
> carsten:
> In the hidden part of a link, space and brackets are escaped.  I forgot 
> to unescape for the editing prompt.

In 4.20, the minibuffer is now showing the space without the '%20', a 
nice touch.  However, the %20 still does show up in the link text when I 
delete the leftmost ']'.  It's just a display issue, though, because the 
   shell link works fine.

>...
> Also, maybe you'd like to know that there is a variable to turn off the 
> safety query in shell links: org-confirm-shell-links.  I could also 
> change the yes-or-no query to a y-or-n query to make it easier to 
> answer....  We'll see, not now.

I tried it out the customization and much prefer the y/n confirmation. 
Thanks.

Scott

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: shell links [was: Version 4.19c]
  2006-04-10 17:41   ` Scott Otterson
@ 2006-04-11 11:47     ` Carsten Dominik
  0 siblings, 0 replies; 4+ messages in thread
From: Carsten Dominik @ 2006-04-11 11:47 UTC (permalink / raw)
  To: Scott Otterson; +Cc: emacs-orgmode


On Apr 10, 2006, at 19:41, Scott Otterson wrote:
>
> In 4.20, the minibuffer is now showing the space without the '%20', a 
> nice touch.  However, the %20 still does show up in the link text when 
> I delete the leftmost ']'.  It's just a display issue, though, because 
> the   shell link works fine.

Some characters need to be escaped in a link.  For example, I have seen 
message ID's containing [ ] brackets, and these would mess up the 
regexp matching of links.  A space character might lead to link being 
scattered over two lines, with a newline and possibly indentation in 
between.  To avoid this, I am escaping both space and brackets.  The 
links still work because before following a link, the escaping is 
reversed

- Carsten

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-04-11 11:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-06 16:30 shell links [was: Version 4.19c] Scott Otterson
2006-04-06 19:28 ` Carsten Dominik
2006-04-10 17:41   ` Scott Otterson
2006-04-11 11:47     ` Carsten Dominik

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).