emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Only one org-open-at-point at a time?
@ 2007-10-03 11:24 Simon Guest
  2007-10-03 16:16 ` Bastien
  2007-10-06  7:52 ` Renzo Been
  0 siblings, 2 replies; 6+ messages in thread
From: Simon Guest @ 2007-10-03 11:24 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

I'm using org-mode 5.10b on Debian GNU/Linux.

The first time I follow a hyperlink to a PDF file, using C-c C-o, it
works fine, and opens up the PDF file in the PDF reader specified in
/etc/mailcap, kpdf in my case.

If I leave that running, and try to follow another link to another PDF
file, I get told:
A command is running.  Kill it?  (yes or no)

It does not seem possible to view the second PDF file without killing
the first reader.

I would really like to be able to have both PDF files open at the same
time.  Is this easily possible?

(Of course, I doubt this is specific to PDF files, but this is the
case I am facing.)

cheers,
Simon

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

* Re: Only one org-open-at-point at a time?
  2007-10-03 11:24 Only one org-open-at-point at a time? Simon Guest
@ 2007-10-03 16:16 ` Bastien
  2007-10-04  7:31   ` Carsten Dominik
  2007-10-04 11:57   ` Simon Guest
  2007-10-06  7:52 ` Renzo Been
  1 sibling, 2 replies; 6+ messages in thread
From: Bastien @ 2007-10-03 16:16 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 276 bytes --]

Simon Guest <simon.guest@tesujimath.org> writes:

> If I leave that running, and try to follow another link to another PDF
> file, I get told: A command is running. Kill it? (yes or no)

This small patch let you start a new process when you open an external
viewer from Org:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: org.el.patch --]
[-- Type: text/x-diff, Size: 632 bytes --]

diff -u /home/guerry/elisp/testing/org/org.el /home/guerry/elisp/testing/bzg/org.el
--- /home/guerry/elisp/testing/org/org.el	2007-10-03 16:59:59.000000000 +0100
+++ /home/guerry/elisp/testing/bzg/org.el	2007-10-03 17:06:25.000000000 +0100
@@ -12321,7 +12321,7 @@
 	  (setq cmd (replace-match "%s" t t cmd)))
       (setq cmd (format cmd (shell-quote-argument file)))
       (save-window-excursion
-	(shell-command (concat cmd " &"))))
+	(start-process-shell-command cmd nil cmd)))
      ((or (stringp cmd)
 	  (eq cmd 'emacs))
       (funcall (cdr (assq 'file org-link-frame-setup)) file)

Diff finished.  Wed Oct  3 17:08:46 2007

[-- Attachment #3: Type: text/plain, Size: 43 bytes --]


(Not heavily tested though.)

-- 
Bastien

[-- Attachment #4: Type: text/plain, Size: 204 bytes --]

_______________________________________________
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

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

* Re: Only one org-open-at-point at a time?
  2007-10-03 16:16 ` Bastien
@ 2007-10-04  7:31   ` Carsten Dominik
  2007-10-04 11:57   ` Simon Guest
  1 sibling, 0 replies; 6+ messages in thread
From: Carsten Dominik @ 2007-10-04  7:31 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode


On Oct 3, 2007, at 18:16, Bastien wrote:

> (start-process-shell-command cmd nil cmd)))


Much better, thanks a lot.

- Carsten

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

* Re: Only one org-open-at-point at a time?
  2007-10-03 16:16 ` Bastien
  2007-10-04  7:31   ` Carsten Dominik
@ 2007-10-04 11:57   ` Simon Guest
  1 sibling, 0 replies; 6+ messages in thread
From: Simon Guest @ 2007-10-04 11:57 UTC (permalink / raw)
  To: emacs-orgmode

At Wed, 03 Oct 2007 17:16:19 +0100,
Bastien  wrote:
> This small patch let you start a new process when you open an external
> viewer from Org:
> [..]

Bastien,

Thanks for this, just what I needed.

cheers,
Simon

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

* Re: Only one org-open-at-point at a time?
  2007-10-03 11:24 Only one org-open-at-point at a time? Simon Guest
  2007-10-03 16:16 ` Bastien
@ 2007-10-06  7:52 ` Renzo Been
  2007-10-06 10:29   ` Simon Guest
  1 sibling, 1 reply; 6+ messages in thread
From: Renzo Been @ 2007-10-06  7:52 UTC (permalink / raw)
  To: emacs-orgmode

You could try using a shell link instead of a file link...
Something like: 

[[shell:kpdf%20foo.pdf][foo.pdf] 

If that doesn't work, you could try to design your own hyperlink type for pdf-
files.
See the org-manual (pdf version):
Appendix A.2 Adding hyperlink types 

Off-course it can also be that your kpdf viewer only allows on file opened at a 
time?

Simon Guest <simon.guest <at> tesujimath.org> writes:

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

* Re: Only one org-open-at-point at a time?
  2007-10-06  7:52 ` Renzo Been
@ 2007-10-06 10:29   ` Simon Guest
  0 siblings, 0 replies; 6+ messages in thread
From: Simon Guest @ 2007-10-06 10:29 UTC (permalink / raw)
  To: Renzo Been; +Cc: emacs-orgmode

At Sat, 6 Oct 2007 07:52:03 +0000 (UTC),
Renzo Been wrote:
> 
> You could try using a shell link instead of a file link...
> Something like: 
> 
> [[shell:kpdf%20foo.pdf][foo.pdf] 
> 
> If that doesn't work, you could try to design your own hyperlink type for pdf-
> files.
> See the org-manual (pdf version):
> Appendix A.2 Adding hyperlink types 
> 
> Off-course it can also be that your kpdf viewer only allows on file opened at a 
> time?

Hi Renzo,

Bastien already supplied a nice fix which works well - see his email.

cheers,
Simon

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

end of thread, other threads:[~2007-10-06 10:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-03 11:24 Only one org-open-at-point at a time? Simon Guest
2007-10-03 16:16 ` Bastien
2007-10-04  7:31   ` Carsten Dominik
2007-10-04 11:57   ` Simon Guest
2007-10-06  7:52 ` Renzo Been
2007-10-06 10:29   ` Simon Guest

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).