In linux, the desktop environment stores the proxy settings. These proxy settings are then picked up by applications running for that instance of the desktop environment for a particular user. Your browsers. terminal etc, pick up these settings.
In case of the GNOME terminal, it sets the HTTP_PROXY and HTTPS_PROXY variable while starting the shell. The values for these variables are set by terminal when it starts up and are valid for the duration of the shell.
Can we do something similarly in emacs other than setting up the proxy using the
set_proxy function in our init file? Can we set up a generic function that will pick up these settings from the desktop environment?
Starting emacs from the terminal and it picking up the proxy variables from the terminal environment is not the answer what I am looking for. I am specifically trying to find how emacs accesses Desktop Environment settings.