From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Org-mode link returned path is truncated when contains space Date: Wed, 31 May 2017 16:06:35 +0200 Message-ID: <87wp8x3ytw.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54580) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dG4Gn-0002ot-E0 for emacs-orgmode@gnu.org; Wed, 31 May 2017 10:06:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dG4Gm-0006yr-Lu for emacs-orgmode@gnu.org; Wed, 31 May 2017 10:06:41 -0400 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:51024) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dG4Gm-0006xy-Fc for emacs-orgmode@gnu.org; Wed, 31 May 2017 10:06:40 -0400 In-Reply-To: (numbchild@gmail.com's message of "Wed, 31 May 2017 16:31:23 +0800") 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" To: "numbchild@gmail.com" Cc: Org-mode Hello, "numbchild@gmail.com" writes: > I have a link in org-moe file like this: > > #+BEGIN_SRC org > [[file:Data/images/logos/Full color Git logo for light backgrounds.png]] > #+END_SRC > > > *The file did exist.* > > I have elisp code like this to fontify link when the file does not exist: > > #+BEGIN_SRC emacs-lisp > (org-link-set-parameters > "file" > ;; TODO: fix path contains space case. > :face (lambda (path) (if (file-exists-p path) 'org-link 'org-warning))) > #+END_SRC > > > But it is fontied as red. I tried to debug info by print of ~path~ in > upper `org-link-set-parameters` lambda function. > > It return for path: > > #+BEGIN_EXAMPLE > "Data/images/logos/Full" > #+END_EXAMPLE Could you update Org to a more recent version, e.g., 9.0.7. It may have been fixed already. Regards, -- Nicolas Goaziou