Questions tagged [url]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
40 views

How can I open URLs from within Emacs?

When I ran GNOME, I used to be able to click on any link in Emacs, and it would open in my default web browser. But now that I'm using i3, it doesn't work any more, even though I haven't changed any ...
0
votes
0answers
70 views

url-retrieve-synchronously on github doesn't return any response

Running the function (url-retrieve-synchronously "https://api.github.com/users/lawlist/gists") returns an empty buffer. This only happens with github. What could possibly be the cause?
1
vote
1answer
40 views

Function to find a file or open a URL depending on argument?

Q: in there a function that can find a file or open a URL as needed? I have a string that can be either a) a local filename, or b) a URL. Is there an existing function that I can call on the string ...
0
votes
1answer
99 views

url-retrieve-synchronously: How to retrieve Github gist list

Q: How to retrieve a list of Github gists using url-retrieve-synchronously? I am able to visit my gist list in a web browser: https://api.github.com/users/lawlist/gists When I try evaluating: (...
0
votes
0answers
34 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
26 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 ...
1
vote
0answers
82 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
85 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
108 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
258 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 ...
3
votes
0answers
671 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 ...
3
votes
1answer
122 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
485 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
95 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
451 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
224 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 ...
5
votes
2answers
705 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 ...
4
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
80 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
268 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
126 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
232 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
94 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
327 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
317 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
54 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
1k 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 ...