[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] little elisp help?
From: |
Thorsten Jolitz |
Subject: |
Re: [O] little elisp help? |
Date: |
Wed, 02 Jul 2014 22:31:21 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
tom <address@hidden> 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