Questions tagged [url]

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

41 questions
15
votes
3 answers

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 just interested in the body. Now, short of…
user227
10
votes
3 answers

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 most likely someone did before me so is there a…
Random Dev
  • 203
  • 3
  • 7
8
votes
0 answers

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 but you can probably pick it up from . Note the warning in…
feklee
  • 1,029
  • 5
  • 17
7
votes
3 answers

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 25.0.50.1 (x86_64-apple-darwin13.4.0, NS…
Kirill
  • 1,019
  • 7
  • 19
5
votes
0 answers

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 working. I've tried various permutations of the…
Webdev Tory
  • 319
  • 1
  • 10
4
votes
1 answer

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 deafult browser? (i.e., like hyperref in LaTeX).
Name
  • 7,689
  • 4
  • 38
  • 84
4
votes
1 answer

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…
GergelyPolonkai
  • 748
  • 5
  • 12
4
votes
1 answer

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"))) I can use eww to access HTTP sites, but when…
SparedWhisle
  • 569
  • 3
  • 13
3
votes
1 answer

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 either myself or @Malabarba – we're on the Gitter…
Sean Allred
  • 6,861
  • 16
  • 85
3
votes
1 answer

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://github.com/seamusabshere/cache_method/issues/15"…
american-ninja-warrior
  • 3,773
  • 2
  • 21
  • 40
3
votes
0 answers

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?
Random832
  • 578
  • 3
  • 11
2
votes
1 answer

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 response; you can use the following shell…
Sean Allred
  • 6,861
  • 16
  • 85
2
votes
2 answers

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 consider an answer "better" if it didn't rely on an…
camdez
  • 396
  • 3
  • 6
2
votes
1 answer

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 integers with backslashes (e.g.…
kuanyui
  • 1,020
  • 6
  • 16
1
vote
0 answers

How can I have `browse-url-firefox` give focus to my web browser?

I'm trying to customize WWW url browsing in one specific mode. Looking at the documentation for browse-url led me to believe this could be achieved as follows with browse-url-browser-function: (defun flooose-elfeed-browse-url (url &rest c) …
flooose
  • 511
  • 6
  • 14
1
2 3