Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [url]

The `url` package is used to retrieve URLs and is standard in GNU Emacs.

0
votes
0answers
11 views

Cannot open URL link in emacs under msys

When trying to open URL link in emacs under MSYS2 I get the error browse-url-default-windows-browser: Searching for program: No such file or directory, cygstart. Looking into the function browse-url-...
0
votes
1answer
14 views

wrong behavior of org-open-at-point with certain url

NOTE, this only happens on mac. Linux is fine. For the given link, which is directly copied from chrome url bar, https://lwn.net/Articles/262464/#Quick Quiz 5 org-open-at-point will open it as ...
0
votes
0answers
17 views

browse-url doesn't get href from html formatted mails

I'm using notmuch (https://notmuchmail.org/notmuch-emacs/). When viewing the HTML part of a mail that has a link (using a href tag), I can right-click on it and select "Open Link in <browser>". ...
1
vote
0answers
39 views

Why doesn't url-copy-file download these files?

I discovered this issue while trying to install all-the-icons. One step of installation involves using url-copy-file to install fonts. After running the install script, the font files are found in ...
1
vote
1answer
45 views

Browse url at point when clicking and pressing super

I am trying to make emacs open the url displayed under the current point when I left click and press the super key at the same time. I am trying with this code but it does not work (global-set-key (...
2
votes
1answer
89 views

Normalize string to make it file/path safe

Often I find my self doing this C-x C-f to create a file, while in the mini buffer prompt, paste a url like "https://github.com/seamusabshere/cache_method/issues/15" from the clipboard. Since "https:...
1
vote
1answer
202 views

emacs lisp error : Need a pre-parsed url

I'm trying to use tern with the latest version of emacs (27 : master branch) and I'm getting the following error : Request failed: ((wrong-type-argument Need a pre-parsed URL. [cl-struct-url http ...
2
votes
0answers
513 views

orgmode open link in system browser or eww

I want orgmode web links to open in my system browser with C-o, and to open in eww with C-u C-o. This seems in line with the function description for org-open-at-point but it doesn't seem to be ...
2
votes
1answer
86 views

Multiple URL formats for bug-reference-mode

I’m working on a project which is version controlled using GitLab. GitLab, unlike GitHub, uses two separate URL endpoints for issues and merge requests (AKA Pull Requests): https://gitlab.example....
0
votes
1answer
325 views

Why isn't url-http-end-of-headers set correctly when using url-automatic-caching?

This is a follow-up question to How can I make url.el work with the If-None-Match header? Evaluate the following form: (let ((url-request-method "GET") (url-automatic-caching t)) (with-...
1
vote
1answer
66 views

How can I make url.el work with the If-None-Match header?

Take the following form constructed according to : (let ((break-url-package nil)) (let ((url-request-method "GET") (url-request-extra-headers `(("Content-Type" . "application/json")...
0
votes
1answer
368 views

How to match the URL component from a markdown link?

I've been trying to hide the URL component of the markdown links in my buffer. I could select the markdown links using "\\(\\[.+\\]\\)\\((.+)\\)" However, I just want to capture the second half (...
1
vote
1answer
158 views

replace-regexp-in-string not replacing the entire match

So, I have a function that sends a URL to bit.ly for shortening and returns the short URL, and a (replace-regexp-in-string), which is supposed to grab the URL out of a string to passes it to that ...
4
votes
2answers
421 views

Is there a way to show/open a file from a URI/URL

Is there some way to download and show a file from a URI/URL? I now I can use wget and then open the downloaded file and I guess I could even try to write myself a small function to do this. But ...
3
votes
1answer
2k views

EWW cannot access HTTPS sites via proxy

Here's my proxy setup: (setq url-proxy-services '(("no_proxy" . "my-corp-proxy") ("http" . "my-corp-proxy:8080") ("https" . "my-port-proxy:8080")...
7
votes
3answers
2k views

How can I retrieve an HTTPS URL on Mac OS X without warnings about an untrusted authority?

The following code should in principle return the contents of https://badssl.com (with-current-buffer (url-retrieve-synchronously "https://badssl.com") (buffer-string)) But with my GNU Emacs ...
2
votes
0answers
71 views

Using Emacs as an nntp/news URL handler

Is there a function built in that I can call (maybe via emacsclient) to start gnus with a particular server / group given a URI?
7
votes
3answers
2k views

Go to body after url-retrieve-synchronously

I use url-retrieve-synchronously to download a JSON file from a remote server. This function returns a buffer which contains the entire content of the response, including HTTP headers. However, I'm ...
2
votes
2answers
181 views

How can I access a file at an (HTTP / HTTPS) URL?

If I have a URL to a file (for example, this gist), what's the easiest way to fetch that file from Emacs and edit a copy of it? Is there a better option than M-! curl -n [insert URL here] RET? I'd ...
8
votes
0answers
117 views

Make browse-url follow URLs with line breaks?

How can I make browse-url follow URLs with line breaks? Example from RFC 1738: Yes, Jim, I found it under <URL:ftp://info.cern.ch/pub/www/doc; type=d> but you can probably pick it up from <...
2
votes
1answer
188 views

Unicode and `url-unhex-string` and something like \345\205\266\344\273\226

I need to use Emacs built-in url.el url-unhex-string to decode uri (e.g. /%E5%85%B6%E4%BB%96/other) It works, but all non-ascii (I guess it should be Unicode) characters are all converted into ...
0
votes
1answer
79 views

browse-url default to certain url

Whenever I use browse-url function inside of w3m I would like to have a default URL displayed for me. It happens that what I mostly do is google searches, so if I could have https://google.com/search?...
3
votes
1answer
305 views

Why does this url package request receive a different response than the 'equivalent' curl request?

This is for sx.el, a StackExchange client for Emacs. I'm trying to determine whether this issue is a bug in url or a bug in StackExchange's API. If you need the API key, please get in touch with ...
4
votes
1answer
239 views

Double click on a web link results in visiting the link in the default browser

Assume that in the current buffer there is some text like http://emacs.stackexchange.com/. Is it possible to customize Emacs so that double clicking on this text, results in visiting the link by the ...
2
votes
2answers
50 views

`url-inhibit-uncompression` is ineffective; emulating curl with url.el

Consider the following: (let ((url-inhibit-uncompression t)) (switch-to-buffer (url-retrieve-synchronously "http://api.stackexchange.com/2.2/filter/create"))) I would expect to get ...
3
votes
1answer
911 views

How can I determine if a file is compressed from Elisp?

I know that I can use the file command to determine this, but I'd like a cross-platform solution using elisp only (or as few subprocesses as possible). I have the compressed data in a variable called ...