From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id KOqSMqbJjmIvWAAAbAwnHQ (envelope-from ) for ; Thu, 26 May 2022 02:28:22 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id aI19MqbJjmKLuAAA9RJhRA (envelope-from ) for ; Thu, 26 May 2022 02:28:22 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 59AE13E33E for ; Thu, 26 May 2022 02:28:22 +0200 (CEST) Received: from localhost ([::1]:35884 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nu1MS-0006iE-Sp for larch@yhetil.org; Wed, 25 May 2022 20:28:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33590) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nu1Jd-00050M-NS for emacs-orgmode@gnu.org; Wed, 25 May 2022 20:25:25 -0400 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]:34374) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nu1Jb-0005VK-OQ for emacs-orgmode@gnu.org; Wed, 25 May 2022 20:25:25 -0400 Received: by mail-ed1-x534.google.com with SMTP id o28so4109edi.1 for ; Wed, 25 May 2022 17:25:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=dHZPhDmAZ4eyDj+52JBPNXJ7JEayTeVyAe/QgqzQG5M=; b=ZxasilJ+GMmPiguqd8EL7lQM2pkKLppJYOQa8wEvSXAANYM5AjGxwPzfvWFf8xccdE q3ZchpD6PuL1KegyX0tMssG1mqshsQGcdLYmndDFWF63x5VNumPjOeJ/QD4vDGfnF5ov HkmeNHQuwXFNhnLMNFQPuL9mBxUQAsS5L0cyfnebrDMmCD7Hufqo2OqvxzsluYlUn7PL d9nxPkVvQzIV10fbx3KmixJGcuFgU3wJASwE49HbCz+jYvnsczxkZ4e5jwB57QeG6DxI C2C09x3d7g+GG64hlv3dawMos0pDpKL1vBhL9Xf3hToUPMCMvkLcouiUpIXqj43qXYYj YRwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=dHZPhDmAZ4eyDj+52JBPNXJ7JEayTeVyAe/QgqzQG5M=; b=gbYc7RShdiimDm/fW8Ybff+CjxlBpoNqDw8Y4n8+DwhCNU4vJwiczJvI6n2GLp2d11 uC/fe6IjAFWuainQbjcn6xrqd/PK0QOFBSNSqGjjrGnLVP8cBc0mweHO+IF6qCKuY8vK cRuEBCBB49MwUdHtnxZD0bRdHCq3KdLNe8Q1+Y1nz7Kfy50Xah6Rd602YKCe75oOPnK6 LD6vYZMuDZegdcmkllhMISArKAF8TQWvV4VnVVifC/S8kPgvzHGPg1/EaliM+ia0pjpK W8RbZC8D/Nh+o9BvbxOvkhCcW6SAvu2Oh/HvWg8aoFNTJoOZTGp7UpLUm3kascPDtSFo 0YOA== X-Gm-Message-State: AOAM533A7OovtzLIY4pbQ8Uu/HUX+26ApGGlISUN6w1cw/H/NURV0M25 oNuqD3J+78U2Zda8G261ptVBSvF7dRwkopEPn54= X-Google-Smtp-Source: ABdhPJz2liVOlIresoSFILWRqSAlDEcnAvJEcTZB7YOqxbhG80Ighse0pRNcPMhI44NWhR7zZHGSrG4K4IBQQIq2iHI= X-Received: by 2002:aa7:ca44:0:b0:42a:cd1e:ac6f with SMTP id j4-20020aa7ca44000000b0042acd1eac6fmr36589049edt.328.1653524721533; Wed, 25 May 2022 17:25:21 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a17:906:478b:b0:6fe:f76c:8596 with HTTP; Wed, 25 May 2022 17:25:20 -0700 (PDT) In-Reply-To: <62673cdd-14da-8526-c1eb-ca4c74592476@gmail.com> References: <87ilqq6jjr.fsf@localhost> <874k297ukf.fsf@localhost> <62673cdd-14da-8526-c1eb-ca4c74592476@gmail.com> From: Samuel Wales Date: Wed, 25 May 2022 17:25:20 -0700 Message-ID: Subject: Re: Emacs launched from Firefox To: Max Nikulin Cc: emacs-orgmode@gnu.org Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::534; envelope-from=samologist@gmail.com; helo=mail-ed1-x534.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1653524902; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=dHZPhDmAZ4eyDj+52JBPNXJ7JEayTeVyAe/QgqzQG5M=; b=XwPEcnZAKvzYWHMfHkmC7hx98wALY0wRFYLCiqxtiTeTvGnuUFWhtZP12dVK19LCglDSAK DiayycH8EbPkbUo3sDXdKle2f2zzEXoAcxy2umcMIoldXr5gbO48FW3omS6TNMZ4Ik/092 5BfkIjFR3pYL/m+sBh3XaBNyAGx8EGmbD8Z31khTpY7i+2Juj7Ql7k6rPVKxGRiyYc/sXc Pcm/Iz3HX4twv0GGZ/sTdV8cNX6ZcpAtfyfCXozx2UJlFHVSq8K29EKQh5Wn//wKuuJuVa CKplimYcvFFDDS89li3yjzvrJ9zqQBfH/3LuscHt6Dil0WqNDltqc/HtudWXfw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1653524902; a=rsa-sha256; cv=none; b=rXMtqgtMPteGKP07NcWo//dgTKPxXihjInkNkvMpkuqByVV6pdZvl01L5fxfk+29ylgBqP Bmn7/h+ZmIzm2FIkD3Fx6aKzc9GuF38oY8LwAIY4Pb0xxNYc1y5+uSsgtKxNNZTZJcR+l1 Ejm/Pg2GBd6BQYaXEZyIJHpxoT9jFK0dQx3NhLyLEV/qnQ9wrfSg6y0zNHw/CeEvGTJcvy CX7Y7DqYrLeZUwCJgt+mt9STUHwWLPX7Q+5OFy/B2oDjhmSGKcj6xJzpKRCcBaZMF2DLFI AOYRHduRys0fRWsdAQbIsz1HEMNdZ1JeDBpjlw8/iUWvQM6KlFP4NYtRg2sj9A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=ZxasilJ+; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.04 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=ZxasilJ+; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 59AE13E33E X-Spam-Score: -4.04 X-Migadu-Scanner: scn1.migadu.com X-TUID: 3XpHUcIyntFz thank you for that /very/ useful information. cannot seem to reproduce at this time as i'd have to narrow down the dialog box in which this occurs [i think on a save link in gmail with some extensions or so is one place] for haelth reasons but i think part of the problem is that .emacs is not called, and/or that a tiny little unreadable xterm is launched and emacs is run in it. why firefox would do that, idk. i will quite likely need the information in your post if the .emacs and/or xterm thing gets solved. but it turns out that with /usr/bin/emacs in normal use [no personal script needed] everything is accessible. my path doesn't override that. so idk why ff makes emacs not load .emacs or does an xterm. /usr/bin/emacs results in indeed emacs25 atm. gnome and kde are too heavy for my computer, and they can't do everything fluxbox can, and fluxbox mostly wfm. i don't get what things de's do that i need, but perhaps setting default fonts/colors for various toolkits is one of them. On 5/2/22, Max Nikulin wrote: > I am not sure from which site you downloaded that attachment, MIME type > may vary depending on the HTTP server configuration. You yay check > Content-Type response header in the browser development tools or using > > curl -I '' > > command. It may be "text/plain", "text/x-patch", "application/x-patch", > etc. > > In Firefox settings (about:preferences page) check that "Applications" > section either does not contain an entry for the MIME type (is unlikely > in your case since you already opened a file) or its handler is > configured to "Always ask" till you select your new handler. > > System-wide .desktop file may reside e.g. in > "/usr/share/applications/emacs.desktop". You can put your customized > file in e.g. "~/.local/share/applications/" directory > ("$XDG_DATA_HOME/applications/") or into "applications" subdirectory of > "$XDG_DATA_DIRS" entry. For details see > https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html > > Customize "Exec" entry in the .desktop file to add your options, e.g. > create "emacs-a11y.desktop" > > ---- >8 ---- > [Desktop Entry] > Version=1.0 > Name=Accessible Emacs (GUI) > GenericName=Text Editor > Comment=GNU Emacs is an extensible, customizable text editor - and more > MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++; > TryExec=/usr/bin/emacs > Exec=/usr/bin/emacs %F > Icon=emacs > Type=Application > Terminal=false > Categories=Utility;Development;TextEditor; > StartupWMClass=Emacs > Keywords=Text;Editor; > ---- 8< ---- > > It is better to set unique "Name" to distinguish it from the default > Emacs launcher. Desktop file format reference: > https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html > > Notice that browser launcher script may reset PATH environment to some > safe value, so executables from custom directories may be unavailable > without specifying of the full path. > > MIME type should be among the values of the MimeType field inside the > ".desktop" file or in the "mimeapps.list" file. In the former case run > (with proper directory) > > update-desktop-database ~/.local/share/applications > > In the latter case add to "~/config/mimeapps.list" mapping from the MIME > type to your .desktop file > > ---- >8 ---- > [Added Associations] > text/plain=emacs-a11y.desktop; > ---- 8< ---- > > And maybe > > ---- >8 ---- > [Default Applications] > text/plain=emacs-a11y.desktop; > ---- 8< ---- > > With such recipe a new instance of Emacs will be launched for each > downloaded file. Likely you would prefer to use you main Emacs session > or a special session of Emacs for untrusted content fetched from web. In > such case you can use "emacsclient" command in the ".desktop" file and > maybe systemd user socket+service units pair to run Emacs on demand. > > If you are still using emacs-25 then e.g. "--fg-daemon" option is > unavailable and related files are not included in the package. For > inspiration you may check > http://git.savannah.gnu.org/cgit/emacs.git/tree/etc/emacsclient.desktop > http://git.savannah.gnu.org/cgit/emacs.git/tree/etc/emacs.service > https://www.gnu.org/software/emacs/manual/html_node/emacs/Emacs-Server.html > > Finally a rather unrelated question. Do you find accessibility tools in > Gnome or KDE inconvenient? I believed that it should be more difficult > to arrange setup from scratch for fluxbox. However I never tried any of > these options. > >> On 5/1/22, Max Nikulin wrote: >>> On 01/05/2022 11:53, Samuel Wales wrote: >>>> >>>> [firefox did not offer to allow a command line to run my shell script >>>> which sets up emacs correctly, and idk if it even ran with my .emacs. >>>> does it do -q? not sure because emacs is too unusable to even find >>>> that out. so firefox fails to be accessible in that dialog box. >>> >>> Samuel, I think, firefox does exactly what it can find in MIME >>> associations (e.g. ~/.config/mimeapps.list) and in the .desktop file of >>> the selected application. >>> >>> There is an emacsclient.desktop file in Emacs git master that tries to >>> connect to the existing Emacs session. It is a relatively new addition, >>> so packages for Linux distributions may miss it. >>> >>> You can either use standard Emacs initialization to get all your >>> customization available through default emacs.desktop or create a custom >>> .desktop file that contain all CLI options specific to your setup. > -- The Kafka Pandemic A blog about science, health, human rights, and misopathy: https://thekafkapandemic.blogspot.com