From: grocery_stocker <cdalten@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: arguments in url question
Date: Sun, 16 Mar 2008 19:25:30 -0700 (PDT) [thread overview]
Message-ID: <0d49795c-c0de-4def-83fb-3f96794860eb@c19g2000prf.googlegroups.com> (raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=GB2312, Size: 1081 bytes --]
The following question stems from the following url
http://xahlee.org/emacs/wrap-url.html
The following function on his web page basically makes a url ouf given
a link.
(defun wrap-url-string (url &optional raw)
"Make the string into a html link.\n
Example:
http://en.wikipedia.org/wiki/Emacs
becomes
<a href=\"http://en.wikipedia.org/wiki/Emacs\">Emacs¨J</a>.
If the url is a wikipedia link, then the link text
is shortened to its title.
If the optional argument raw is not nil, no shortening will happen."
(require 'gnus-util)
(let ((linktext url))
(setq linktext (gnus-url-unhex-string linktext nil))
(if (and (not raw) (string-match "wikipedia.org" url))
(progn
(setq linktext (concat (car (last (split-string linktext
"/"))) "¨J") )
)
)
(concat "<a href=\"" url "\">" linktext "</a>" )
)
)
What I don't get is how can a url have optional arguments. I mean
wouldn't something like
¡°http://yahoo.com/news/3829.php¡±
just be passed as one argument to the function i this case?
next reply other threads:[~2008-03-17 2:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-17 2:25 grocery_stocker [this message]
2008-03-17 3:16 ` arguments in url question Ben Pfaff
2008-03-17 4:00 ` Chad
2008-03-17 4:09 ` Ben Pfaff
2008-03-17 21:34 ` Barry Margolin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0d49795c-c0de-4def-83fb-3f96794860eb@c19g2000prf.googlegroups.com \
--to=cdalten@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.