From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: Re: little elisp help? Date: Wed, 02 Jul 2014 22:31:21 +0200 Message-ID: <874myzy02u.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49002) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2RBw-0002vC-QI for emacs-orgmode@gnu.org; Wed, 02 Jul 2014 16:31:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X2RBm-0004gj-LF for emacs-orgmode@gnu.org; Wed, 02 Jul 2014 16:31:44 -0400 Received: from plane.gmane.org ([80.91.229.3]:51893) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2RBm-0004gX-FL for emacs-orgmode@gnu.org; Wed, 02 Jul 2014 16:31:34 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1X2RBk-0005Ek-Ab for emacs-orgmode@gnu.org; Wed, 02 Jul 2014 22:31:32 +0200 Received: from g231109238.adsl.alicedsl.de ([92.231.109.238]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 02 Jul 2014 22:31:32 +0200 Received: from tjolitz by g231109238.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 02 Jul 2014 22:31:32 +0200 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 tom writes: > hi guys, > > I have this: > > (setq org-link-abbrev-alist > '(("foo" . "file:/path/to/%(myfun).txt"))) > > I'm trying to have "myfun" replace any spaces in the tag with > underscores, but I'm not having much luck. Would someone mind giving > me a hint? #+begin_src emacs-lisp (let ((cons-pair '("foo bar loo" "file:x"))) (replace-regexp-in-string "[[:space:]]" "_" (car cons-pair))) #+end_src #+results: : foo_bar__loo -- cheers, Thorsten