all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#54333: 29.0.50; browse-url-chrome in Wayland/pgtk
@ 2022-03-10 23:12 Stephen Eglen
  2022-03-11  0:47 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Eglen @ 2022-03-10 23:12 UTC (permalink / raw)
  To: 54333

Hi,
using pgtk under Wayland with  sway window manager, the following file
should reproduce the error I'm seeing:

----------------------------------------------------------------------

;; 1. works
(browse-url-firefox "http://news.bbc.co.uk")
;; 2. works (opens in chrome)
(browse-url-xdg-open "http://news.bbc.co.uk")

;; 3. doesn't work
(browse-url-chrome "http://news.bbc.co.uk")
;; 4. doesn't work
(browse-url-chromium "http://news.bbc.co.uk")


;; 5. works, after deleting the process-environment line

(defun browse-url-chrome1 (url &optional _new-window)
  "Ask the Google Chrome WWW browser to load URL.
Default to the URL around or before point.  The strings in
variable `browse-url-chrome-arguments' are also passed to
Google Chrome.
The optional argument NEW-WINDOW is not used."
  (interactive (browse-url-interactive-arg "URL: "))
  (setq url (browse-url-encode-url url))
  (apply #'start-process
	 (concat "google-chrome " url) nil
	 browse-url-chrome-program
	 (append
	  browse-url-chrome-arguments
	  (list url))))

(browse-url-chrome1 "http://news.bbc.co.uk")

----------------------------------------------------------------------

browse-url-firefox and browse-url-xdg-open work as expected, opening the
web page in firefox and chrome respectively (chrome is my default under
xdg-open)

If however I do 3 or 4, I can't get the page to open in chrome or
chromium.

If I delete the following line from the defun of browse-url-chrome
  (let* ((process-environment (browse-url-process-environment)))

then browse-url-chrome1 works as expected.  Is there something about the
logic in browse-url-emacs-display that assumes X, rather than wayland?

(browse-url-emacs-display) returns "wayland-1"

whereas $DISPLAY in the shell is :0

Stephen




In GNU Emacs 29.0.50 (build 3, x86_64-pc-linux-gnu, GTK+ Version 3.24.31, cairo version 1.17.4)
 of 2022-03-10 built on light
Repository revision: c6e079ae15002268d90869a43f66d962175e4cdb
Repository branch: master
System Description: Manjaro Linux

Configured using:
 'configure --with-pgtk'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSYSTEMD LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PGTK
PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP XIM
GTK3 ZLIB

Important settings:
  value of $LANG: en_GB.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp

Minor modes in effect:
  vertico-mode: t
  global-fasd-mode: t
  windmove-mode: t
  pdf-occur-global-minor-mode: t
  global-git-commit-mode: t
  magit-auto-revert-mode: t
  global-edit-server-edit-mode: t
  csv-field-index-mode: t
  shell-dirtrack-mode: t
  recentf-mode: t
  TeX-PDF-mode: t
  straight-use-package-mode: t
  straight-package-neutering-mode: t
  display-time-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t

Load-path shadows:
/home/stephen/.emacs.d/straight/build/ivy/elpa hides /home/stephen/.emacs.d/straight/build/lispy/elpa
/home/stephen/.emacs.d/straight/build/loccur/loccur hides ~/langs/emacs/elisp-ds/loccur
/home/stephen/.emacs.d/straight/build/csv-mode/csv-mode hides ~/langs/emacs/elisp-ds/csv-mode
~/langs/emacs/elisp-ds/emaxima/maxima-font-lock hides ~/langs/emacs/maxima-font-lock
~/langs/emacs/elisp-ds/emaxima/maxima hides ~/langs/emacs/maxima
/home/stephen/.emacs.d/straight/build/transient/transient hides /usr/local/share/emacs/29.0.50/lisp/transient
~/langs/emacs/mspools hides /usr/local/share/emacs/29.0.50/lisp/mail/mspools
/home/stephen/.emacs.d/straight/build/let-alist/let-alist hides /usr/local/share/emacs/29.0.50/lisp/emacs-lisp/let-alist

Features:
(shadow emacsbug shortdoc cursor-sensor vc-mtn vc-hg vc-bzr vc-src
vc-sccs vc-svn vc-cvs vc-rcs cl-print descr-text emoji-labels emoji
multisession sqlite misearch multi-isearch dired-aux gnus-dired pdf-sync
pdf-annot facemenu pdf-outline pdf-links pdf-history dabbrev shr-color
gnus-cite smiley mm-archive mail-extr textsec uni-scripts idna-mapping
ucs-normalize uni-confusable textsec-check qp so-long view mu4e mu4e-org
mu4e-main org-id vc-git ol-eww eww url-queue mm-url ol-rmail ol-mhe
ol-irc ol-info ol-gnus nnselect ol-docview ol-bibtex ol-bbdb ol-w3m
ol-doi org-link-doi lispy delsel lispy-inline avy etags fileloop edebug
backtrace help-fns lispy-tags json-mode json-snatcher js cc-mode
cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine
json-mode-autoloads json-snatcher-autoloads sudo-edit
sudo-edit-autoloads deadgrep spinner deadgrep-autoloads
spinner-autoloads yasnippet yasnippet-autoloads
flymake-shellcheck-autoloads wolfram-mode-autoloads orderless
orderless-autoloads consult-vertico vertico vertico-autoloads consult
consult-autoloads rg vc vc-dispatcher rg-info-hack rg-menu rg-ibuffer
rg-result wgrep-rg wgrep rg-history rg-header grep rg-autoloads
wgrep-autoloads fasd fasd-autoloads loccur loccur-autoloads
fd-dired-autoloads notdeft-global notdeft-org9 notdeft-autoloads hydra
lv lispy-autoloads zoutline-autoloads hydra-autoloads lv-autoloads
swiper-autoloads ivy-autoloads iedit-autoloads ace-window-autoloads
avy-autoloads gif-screencast xdg gif-screencast-autoloads keycast
keycast-autoloads olivetti olivetti-autoloads wwg
writer-word-goals-autoloads windswap windmove windswap-autoloads
list-unicode-display list-unicode-display-autoloads shackle trace
shackle-autoloads visual-fill-column visual-fill-column-autoloads
lua-mode lua-mode-autoloads hugo-autoloads org-recoll
yesterbox-autoloads package-lint finder package-lint-autoloads
docker-tramp-autoloads docker-tramp tramp-cache dockerfile-mode
sh-script smie executable dockerfile-mode-autoloads yaml-mode
yaml-mode-autoloads vterm-toggle tramp-sh vterm-toggle-autoloads vterm
tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat
ls-lisp face-remap term disp-table ehelp vterm-module term/xterm xterm
vterm-autoloads keychain-environment keychain-environment-autoloads
zygospore zygospore-autoloads solarized-light-theme solarized-theme
solarized solarized-faces solarized-theme-autoloads pdf-occur ibuf-ext
ibuffer ibuffer-loaddefs tablist tablist-filter semantic/wisent/comp
semantic/wisent semantic/wisent/wisent semantic/util-modes semantic/util
semantic semantic/tag semantic/lex semantic/fw mode-local cedet
pdf-isearch let-alist pdf-misc pdf-tools cus-edit cus-load pdf-view
magit-bookmark bookmark pp pdf-cache pdf-info tq pdf-util pdf-macs
pdf-tools-autoloads let-alist-autoloads tablist-autoloads
magit-submodule magit-obsolete magit-blame magit-stash magit-reflog
magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote
magit-commit magit-sequence magit-notes magit-worktree magit-tag
magit-merge magit-branch magit-reset magit-files magit-refs magit-status
magit package url-handlers magit-repos magit-apply magit-wip magit-log
which-func imenu magit-diff smerge-mode diff diff-mode git-commit
log-edit pcvs-util add-log magit-core magit-autorevert autorevert
filenotify magit-margin magit-transient magit-process with-editor
magit-mode transient magit-git magit-section magit-utils dash
magit-autoloads magit-section-autoloads git-commit-autoloads
with-editor-autoloads transient-autoloads dash-autoloads s edit-server
edit-server-autoloads poly-R poly-noweb ess-r-mode ess-r-flymake
flymake-proc flymake warnings ess-r-xref xref ess-trns ess-r-package
ess-r-completion ess-roxy ess-r-syntax ess-rd ess-s-lang ess-help
ess-mode ess-inf ess-tracebug compile poly-R-autoloads
poly-noweb-autoloads poly-markdown markdown-mode polymode poly-lock
polymode-base polymode-weave polymode-export polymode-compat
polymode-methods polymode-core polymode-classes eieio-custom eieio-base
color poly-markdown-autoloads polymode-autoloads ess-knitr
markdown-mode-autoloads org-mu4e midnight mu4e-icalendar mu4e-view
mu4e-view-gnus mu4e-view-common mu4e-headers mu4e-compose mu4e-context
mu4e-draft mu4e-actions ido rfc2368 smtpmail sendmail mule-util hl-line
mu4e-mark mu4e-proc mu4e-utils doc-view jka-compr image-mode exif
mu4e-lists mu4e-message flow-fill mu4e-vars mu4e-meta gnus-icalendar
org-capture gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-sum
shr pixel-fill kinsoku url-file url-dired svg dom browse-url url
url-proxy url-privacy url-expand url-methods url-history url-cookie
url-domsuf url-util gnus-group gnus-undo gnus-start gnus-dbus gnus-cloud
nnimap nnmail mail-source utf7 netrc nnoo parse-time gnus-spec gnus-int
gnus-range message mailcap yank-media rmc puny dired-x dired
dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config
mailheader gnus-win gnus nnheader gnus-util text-property-search
mail-utils range mm-decode mm-bodies mm-encode mail-parse rfc2231
rfc2047 rfc2045 mm-util ietf-drums mail-prsvr gmm-utils icalendar
diary-lib diary-loaddefs csv-mode sort csv-mode-autoloads finder-inf
ob-latex ob-ditaa ob-dot ob-shell shell ob-R recentf tree-widget
wid-edit ox-beamer ox-odt rng-loc rng-uri rng-parse rng-match rng-dt
rng-util rng-pttrn nxml-parse nxml-ns nxml-enc xmltok nxml-util ox-latex
ox-icalendar org-agenda org-refile ox-html table ox-ascii ox-publish ox
org-element org ob ob-tangle ob-ref ob-lob ob-table org-macro
org-footnote org-src ob-comint org-pcomplete pcomplete org-list
org-faces org-entities org-version ob-emacs-lisp org-table org-keys
org-loaddefs find-func avl-tree generator ol rx oc-basic bibtex iso8601
time-date oc ob-exp ob-core org-compat advice ob-eval org-macs
format-spec server hideshow-org hideshow cc-vars cc-defs ess ess-utils
ess-custom project ess-autoloads julia-repl-autoloads s-autoloads
julia-mode comint ansi-color ring julia-mode-latexsubs
julia-mode-autoloads fm emacs-keys move ff-paths cl ffap url-parse
auth-source eieio eieio-core eieio-loaddefs password-cache json map
url-vars my-tex tex dbus xml crm texmathp auctex-autoloads tex-site
use-package-core my-elisp time-stamp my-c tempo-examples tempo
others-elisp cal-menu calendar cal-loaddefs mailabbrev
use-package-autoloads bind-key-autoloads straight-autoloads cl-extra
straight info autoload radix-tree cl-seq pcase checkdoc lisp-mnt
thingatpt help-mode seq subr-x byte-opt cl-macs gv bytecomp byte-compile
cconv outlines edmacro kmacro cl-loaddefs cl-lib noutline outline
easy-mmode time iso-transl tooltip eldoc paren electric uniquify
ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/pgtk-win
pgtk-win term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode lisp-mode prog-mode register
page tab-bar menu-bar rfn-eshadow isearch easymenu timer select
scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors
frame minibuffer cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button
loaddefs faces cus-face macroexp files window text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads dbusbind inotify
dynamic-setting system-font-setting font-render-setting cairo gtk pgtk
lcms2 multi-tty make-network-process emacs)

Memory information:
((conses 16 1527588 185323)
 (symbols 48 83353 30)
 (strings 32 352021 25187)
 (string-bytes 1 34475083)
 (vectors 16 128303)
 (vector-slots 8 2973038 290558)
 (floats 8 8075 1347)
 (intervals 56 75233 6235)
 (buffers 992 73))





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-03-11  8:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-10 23:12 bug#54333: 29.0.50; browse-url-chrome in Wayland/pgtk Stephen Eglen
2022-03-11  0:47 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-03-11  1:49   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-03-11  8:30     ` Stephen Eglen
2022-03-11  8:37       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors

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.