From mboxrd@z Thu Jan 1 00:00:00 1970 From: Suvayu Ali Subject: Re: bug#14605: Problem with export an .org file to .pdf does not open pdf file Date: Tue, 3 Sep 2013 01:27:39 +0200 Message-ID: <20130902232739.GO2828@kuru.dyndns-at-home.com> References: <51B9C912.4050100@redhat.com> <51C979DF.9080106@redhat.com> <520A312B.5080003@redhat.com> <6CD2860F-6518-4BC6-B431-507BB088B588@gmail.com> <8738pnlj09.fsf@gmail.com> <81237114-C902-40D8-95F9-70AA2055C4D3@gmail.com> <20130902094701.GI2828@kuru.dyndns-at-home.com> <1B84ED41-BCE5-46AE-BBFB-92D656CD373E__38750.8492371582$1378116581$gmane$org@gmail.com> <8738pnw4e5.fsf_-_@Rainer.invalid> <4E229EE1-5DE1-48B5-B5C4-DCFB41A1686B@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56833) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGdXC-0004V5-6e for emacs-orgmode@gnu.org; Mon, 02 Sep 2013 19:27:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VGdX7-0001m8-1F for emacs-orgmode@gnu.org; Mon, 02 Sep 2013 19:27:50 -0400 Received: from mail-ee0-x230.google.com ([2a00:1450:4013:c00::230]:53167) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGdX6-0001m0-Pf for emacs-orgmode@gnu.org; Mon, 02 Sep 2013 19:27:44 -0400 Received: by mail-ee0-f48.google.com with SMTP id l10so2588820eei.7 for ; Mon, 02 Sep 2013 16:27:43 -0700 (PDT) Content-Disposition: inline In-Reply-To: <4E229EE1-5DE1-48B5-B5C4-DCFB41A1686B@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi Achim, Carsten, On Mon, Sep 02, 2013 at 10:54:13PM +0200, Carsten Dominik wrote: > > On 2.9.2013, at 18:54, Achim Gratz wrote: > > > Carsten Dominik writes: > >> OK, we now use xdg-open when available on a Linux system. > > > > The availability of xdg-open has nothing to do with whether or not you > > are running Emacs on a Linux system. Indeed, even on a system where it > > is available, it won't do anything useful if you're running from a > > console. While I think it's a good default for someone using a desktop > > that conforms to XDG standards, there should be a check if in fact Emacs > > is running on such a desktop. > > thanks for this input. THis makes it more complicated. Do you know > how I would test this? I do know about the variable window-system, > but that will also return nil when Emacs is running in an xterm, even > though xdg-open would be working in this case. I think there are four cases of running from a console, 1. a true terminal (the one you get with Ctrl+Alt-Fn, or in runlevel 3) 2. a remote console without X forwarding 3. a remote console with X forwarding 4. a virtual terminal (terminal emulator in a graphical desktop) Now xdg-open will not work for (1-2) (for different reasons), but will work for (3-4). I think it is reasonable to expect if someone chooses "export and open", they are on a graphical desktop and not on (1-2). As for (3), I think even in that case most people will choose to just export, and open in some other way (none of us like X forwarding do we? ;)). As for desktop conformance, Gnome, KDE, XFCE (and by induction LXDE) conforms. I think the key is what happens when it does not: xdg-open fallsback to its own settings. Quoting the Archlinux wiki summary: Inside a desktop environment (e.g. GNOME, KDE, Xfce, etc.), xdg-open simply passes the arguments to that desktop environment's file-opener application (gvfs-open, kde-open, or exo-open, respectively), which means that the associations are left up to the desktop environment. When no desktop environment is detected (for example when one runs a standalone window manager, e.g. Openbox), xdg-open will use its own configuration files. ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Given this fallback, I don't think there is much to worry about. If it is there, and the user is on a graphical desktop (3-4), it will work. If it is absent, we still have mailcap. Nothing to lose here. Hope this helps, -- Suvayu Open source is the future. It sets us free.