all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* EXWM
@ 2021-10-04 14:33 André A. Gomes
  2021-10-08  9:57 ` EXWM Arun Isaac
  2021-10-08 10:59 ` EXWM Arun Isaac
  0 siblings, 2 replies; 22+ messages in thread
From: André A. Gomes @ 2021-10-04 14:33 UTC (permalink / raw)
  To: guix-devel

Hi Guix,

I'd like to addres the way EXWM is packged in Guix.

EXWM starts (from the login manager, i.e. after X is running) by means
of a script that starts emacs by evaluating the following s-exp:

--8<---------------cut here---------------start------------->8---
(cond ((file-exists-p "~/.exwm") (load-file "~/.exwm"))
      ((not (featurep (quote exwm)))
       (require (quote exwm))
       (require (quote exwm-config))
       (exwm-config-default)
       (message (concat "exwm configuration not found. "
                        "Falling back to default configuration..."))))
--8<---------------cut here---------------end--------------->8---

I can't think of any good reason to doing this, but I can think of many
against.  I'll elaborate.

I remember, back in the day, to what great lengths I went to understand
what the hell what going on.  I had EXWM configured in my Emacs init.el
file (the sane, standard and documented way of doing it), and I've used
it before in other distros.

I wondered: why isn't it being honored?  And why the hell is ido-mode
on, if I did it enabled it?  Let's check the EXWM wiki and
documentation.  Nothing.  Ok, maybe I should check how EXWM is packaged
in Guix.  Let's be honest, the "lay user" will never do this.

The present approach assumes that one of the following holds.  Either
the user is stupid and he expects some standard EXWM config to "just
work", or he miracously knows he needs to write an extra .exwm file to
serve such a specfic purpose.  This doesn't configure EXWM in the most
general case (more on that below), and it's bonkers.

EXWM was thought to be started and used in many scenarios.  The most
common one, indeed, is to start it when no other window manager has been
started.  But users can also login into a full-blown DE (GNOME, Xfce,
etc) and active EXWM when they wish!  In this case, EXWM is able to take
control of things (i.e. replace the running window manager).  See how
the .exwm file is short-sighted?  This is a non-standard approach, and a
source of duplication and confusion.

Now, there's another problem.  One simply doesn't start EXWM from
another DE in Guix!  It always fails.  Why?  Because the user needs to
run the following beforehand (yes, the same bit that also appears in the
exwm binary wrapper):

--8<---------------cut here---------------start------------->8---
/gnu/store/HASH-xhost-1.0.8/bin/xhost +SI:localuser:$USER
--8<---------------cut here---------------end--------------->8---

I'm not sure how to handle this issue.  Most users would expect things
to just work.  There are lots of issues on github from Guix users
clueless about this.  Yes, I can mention this in the EXWM wiki, but
perhaps deeper measures should be taken.


It's trivial to fix part of the problem, and I have packaged EXWM
myself.  See the link below.

https://git.sr.ht/~aadcg/aadcg-guix-channel/commit/4a27f9991b0b692694f954cb595a9748a0146d36.

It seemed pointless to send a trivial patch without any further
explation, so feel free to discuss the topic.

Thank you.


--
André A. Gomes
"Free Thought, Free World"


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

* Re: EXWM
  2021-10-04 14:33 EXWM André A. Gomes
@ 2021-10-08  9:57 ` Arun Isaac
  2021-10-08 10:21   ` EXWM Jan Nieuwenhuizen
  2021-10-08 10:59 ` EXWM Arun Isaac
  1 sibling, 1 reply; 22+ messages in thread
From: Arun Isaac @ 2021-10-08  9:57 UTC (permalink / raw)
  To: André A. Gomes; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 239 bytes --]


Hi André,

I was involved in the packaging of exwm when it was first done, and I
hear your frustration. :-) Please do send patches (with me on Cc)
addressing the issue, and we can continue our discussion there.

Thank you,
Arun

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 524 bytes --]

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

* Re: EXWM
  2021-10-08  9:57 ` EXWM Arun Isaac
@ 2021-10-08 10:21   ` Jan Nieuwenhuizen
  2021-10-08 10:55     ` EXWM Arun Isaac
  2021-10-15  6:54     ` EXWM André A. Gomes
  0 siblings, 2 replies; 22+ messages in thread
From: Jan Nieuwenhuizen @ 2021-10-08 10:21 UTC (permalink / raw)
  To: Arun Isaac; +Cc: André A. Gomes, guix-devel

Arun Isaac writes:

Hello,

> I was involved in the packaging of exwm when it was first done, and I
> hear your frustration. :-) Please do send patches (with me on Cc)
> addressing the issue, and we can continue our discussion there.

As someone who didn't have a prior EXWM setup in their .emacs, I have
been enjoying the separate .exwm config file.

I'm wondering, how have you managed to switch off exwm when running a
nested emacs or a console emacs?

Greetings,
Janneke

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com


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

* Re: EXWM
  2021-10-08 10:21   ` EXWM Jan Nieuwenhuizen
@ 2021-10-08 10:55     ` Arun Isaac
  2021-10-10 13:16       ` EXWM Ludovic Courtès
  2021-10-15  6:54     ` EXWM André A. Gomes
  1 sibling, 1 reply; 22+ messages in thread
From: Arun Isaac @ 2021-10-08 10:55 UTC (permalink / raw)
  To: Jan Nieuwenhuizen; +Cc: André A. Gomes, guix-devel

[-- Attachment #1: Type: text/plain, Size: 669 bytes --]


Hi Janneke,

>> I was involved in the packaging of exwm when it was first done, and I
>> hear your frustration. :-) Please do send patches (with me on Cc)
>> addressing the issue, and we can continue our discussion there.
>
> As someone who didn't have a prior EXWM setup in their .emacs, I have
> been enjoying the separate .exwm config file.

Ah, I see. That may be good reason to not break this separation between
.emacs and .exwm.

> I'm wondering, how have you managed to switch off exwm when running a
> nested emacs or a console emacs?

I myself have never run a nested emacs or a console emacs session. So, I
have never encountered this problem.

Cheers!
Arun

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 524 bytes --]

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

* Re: EXWM
  2021-10-04 14:33 EXWM André A. Gomes
  2021-10-08  9:57 ` EXWM Arun Isaac
@ 2021-10-08 10:59 ` Arun Isaac
  2021-10-15  7:38   ` EXWM André A. Gomes
  1 sibling, 1 reply; 22+ messages in thread
From: Arun Isaac @ 2021-10-08 10:59 UTC (permalink / raw)
  To: André A. Gomes, guix-devel

[-- Attachment #1: Type: text/plain, Size: 553 bytes --]


Hi André,

> I remember, back in the day, to what great lengths I went to understand
> what the hell what going on.  I had EXWM configured in my Emacs init.el
> file (the sane, standard and documented way of doing it), and I've used
> it before in other distros.

Just to clarify, I have exwm configured in my ~/.emacs, and it works. I
don't have any ~/.exwm file. The way Guix currently starts exwm does not
require to you have a ~/.exwm. So, Guix does support the standard way of
configuring exwm. Do we agree on this?

Regards,
Arun

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 524 bytes --]

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

* Re: EXWM
  2021-10-08 10:55     ` EXWM Arun Isaac
@ 2021-10-10 13:16       ` Ludovic Courtès
  2021-10-15  7:15         ` EXWM André A. Gomes
  0 siblings, 1 reply; 22+ messages in thread
From: Ludovic Courtès @ 2021-10-10 13:16 UTC (permalink / raw)
  To: Arun Isaac; +Cc: André A. Gomes, guix-devel

Hello,

Arun Isaac <arunisaac@systemreboot.net> skribis:

>>> I was involved in the packaging of exwm when it was first done, and I
>>> hear your frustration. :-) Please do send patches (with me on Cc)
>>> addressing the issue, and we can continue our discussion there.
>>
>> As someone who didn't have a prior EXWM setup in their .emacs, I have
>> been enjoying the separate .exwm config file.
>
> Ah, I see. That may be good reason to not break this separation between
> .emacs and .exwm.

FWIW, I don’t have .exwm either; instead I have just a few lines of exwm
config straight in ~/.emacs, which shouldn’t prevent it from running in
the console or anything.

Ludo’.


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

* Re: EXWM
  2021-10-08 10:21   ` EXWM Jan Nieuwenhuizen
  2021-10-08 10:55     ` EXWM Arun Isaac
@ 2021-10-15  6:54     ` André A. Gomes
  1 sibling, 0 replies; 22+ messages in thread
From: André A. Gomes @ 2021-10-15  6:54 UTC (permalink / raw)
  To: Jan Nieuwenhuizen; +Cc: guix-devel

Jan Nieuwenhuizen <janneke@gnu.org> writes:

> I'm wondering, how have you managed to switch off exwm when running a
> nested emacs or a console emacs?

Exwm handles that by itself.

In a console, since it's a non-graphical session, Exwm won't even try to
do anything.  As for nested emacs, there's a variable called exwm-replace
which by default is set to 'ask---meaning that Exwm will ask if it
should replace the current window manager.


--
André A. Gomes
"Free Thought, Free World"


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

* Re: EXWM
  2021-10-10 13:16       ` EXWM Ludovic Courtès
@ 2021-10-15  7:15         ` André A. Gomes
  0 siblings, 0 replies; 22+ messages in thread
From: André A. Gomes @ 2021-10-15  7:15 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

Ludovic Courtès <ludo@gnu.org> writes:

> Hello,
>
> Arun Isaac <arunisaac@systemreboot.net> skribis:
>
>>>> I was involved in the packaging of exwm when it was first done, and I
>>>> hear your frustration. :-) Please do send patches (with me on Cc)
>>>> addressing the issue, and we can continue our discussion there.
>>>
>>> As someone who didn't have a prior EXWM setup in their .emacs, I have
>>> been enjoying the separate .exwm config file.
>>
>> Ah, I see. That may be good reason to not break this separation between
>> .emacs and .exwm.
>
> FWIW, I don’t have .exwm either; instead I have just a few lines of exwm
> config straight in ~/.emacs, which shouldn’t prevent it from running in
> the console or anything.

I'm afraid you're approaching the issue from the wrong angle.  Exwm is
smart than you think.  As of today, there are workarounds (.exwm) that
attempt to "solve" non-existent issues.

As for the fact the you, Ludovic, don't have a .exwm file and configure
Exwm from your emacs init file: are you aware that you're running a
default Exwm config?

M-x find-library RET exwm-config; and take a look at
exwm-config-example.  I find this extremely annoying, since it defeats
the purpose of having a personal Exwm config.  The only way to avoid
this is to create an empty .exwm file.

Again, sending a patch is trivial (I've been running my own Exwm for a
while now), but I need to convince you first :)


-- 
André A. Gomes
"Free Thought, Free World"


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

* Re: EXWM
  2021-10-08 10:59 ` EXWM Arun Isaac
@ 2021-10-15  7:38   ` André A. Gomes
  2021-10-16 16:03     ` EXWM Arun Isaac
  0 siblings, 1 reply; 22+ messages in thread
From: André A. Gomes @ 2021-10-15  7:38 UTC (permalink / raw)
  To: Arun Isaac; +Cc: guix-devel

Arun Isaac <arunisaac@systemreboot.net> writes:

> Hi André,
>
>> I remember, back in the day, to what great lengths I went to understand
>> what the hell what going on.  I had EXWM configured in my Emacs init.el
>> file (the sane, standard and documented way of doing it), and I've used
>> it before in other distros.
>
> Just to clarify, I have exwm configured in my ~/.emacs, and it works. I
> don't have any ~/.exwm file. The way Guix currently starts exwm does not
> require to you have a ~/.exwm. So, Guix does support the standard way of
> configuring exwm. Do we agree on this?

Absolutely not.  Please read my previous message.

It seems that what you call "the standard way of configuring Exwm"
includes running the default config that Exwm packages, but this should
be optional.

Please look at C-h P exwm RET.  Item number 2 should be handled by the
user, but Guix forces it.  The only way out of it is to write a .exwm
file.  But, as I've stated previously, this (besides being a bad idea)
is not documented.  Users would only find out about it by looking at the
package definition, or by looking at how the emacs process was started.

Users can use their emacs init files as they wish, but that's a separate
issue.

My suggestion is simple: remove the added layer of complexity introduced
by the .exwm file; don't force a default Exwm config on the user.

What do you think?


--
André A. Gomes
"Free Thought, Free World"


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

* Re: EXWM
  2021-10-15  7:38   ` EXWM André A. Gomes
@ 2021-10-16 16:03     ` Arun Isaac
  2021-10-18  5:29       ` EXWM Jan Nieuwenhuizen
  0 siblings, 1 reply; 22+ messages in thread
From: Arun Isaac @ 2021-10-16 16:03 UTC (permalink / raw)
  To: André A. Gomes; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 465 bytes --]


Hi André,

> My suggestion is simple: remove the added layer of complexity introduced
> by the .exwm file; don't force a default Exwm config on the user.

I think I agree with you now. I checked, and exwm indeed does not run
when emacs is opened in the console even though my exwm config is
defined in my ~/.emacs. So, I see no reason to continue having
~/.exwm. If no one else has any objections, please do send a patch
fixing this.

Regards,
Arun

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 524 bytes --]

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

* Re: EXWM
  2021-10-16 16:03     ` EXWM Arun Isaac
@ 2021-10-18  5:29       ` Jan Nieuwenhuizen
  2021-10-18 16:44         ` EXWM André A. Gomes
  0 siblings, 1 reply; 22+ messages in thread
From: Jan Nieuwenhuizen @ 2021-10-18  5:29 UTC (permalink / raw)
  To: Arun Isaac; +Cc: André A. Gomes, guix-devel

Arun Isaac writes:

Hello,

>> My suggestion is simple: remove the added layer of complexity introduced
>> by the .exwm file; don't force a default Exwm config on the user.
>
> I think I agree with you now. I checked, and exwm indeed does not run
> when emacs is opened in the console even though my exwm config is
> defined in my ~/.emacs.

Interesting.  So the extra, unneccesary initialization code does not
hurt there.

I just tried adding my ~/.exwm into my init.el and running a nested
emacs and now I get a GUI dialog:

    Replace existing window manager? Y/N

Not great!  Not very suprisingly, the extra unnecessary initialization
/does/ hurt here.

> So, I see no reason to continue having ~/.exwm. If no one else has any
> objections, please do send a patch fixing this.

I would very much like for this nested emacs issue to be addressed
first.

I just don't really see the point in mixing two bits of code that are
meant to run in different scenarios, and then disabling one of them.

Greetings,
Janneke

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com


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

* Re: EXWM
  2021-10-18  5:29       ` EXWM Jan Nieuwenhuizen
@ 2021-10-18 16:44         ` André A. Gomes
  2021-10-20  7:27           ` EXWM Jan Nieuwenhuizen
  0 siblings, 1 reply; 22+ messages in thread
From: André A. Gomes @ 2021-10-18 16:44 UTC (permalink / raw)
  To: Jan Nieuwenhuizen; +Cc: guix-devel

Jan Nieuwenhuizen <janneke@gnu.org> writes:

> Arun Isaac writes:
>
> Hello,
>
>>> My suggestion is simple: remove the added layer of complexity introduced
>>> by the .exwm file; don't force a default Exwm config on the user.
>>
>> I think I agree with you now. I checked, and exwm indeed does not run
>> when emacs is opened in the console even though my exwm config is
>> defined in my ~/.emacs.
>
> Interesting.  So the extra, unneccesary initialization code does not
> hurt there.
>
> I just tried adding my ~/.exwm into my init.el and running a nested
> emacs and now I get a GUI dialog:
>
>     Replace existing window manager? Y/N
>
> Not great!  Not very suprisingly, the extra unnecessary initialization
> /does/ hurt here.

Isn't exwm doing precisely what it's supposed to do?  Isn't it fair that
the newly spawned (nested) Emacs has the right to take control over the
"older" Emacs?

It does so in a very polite way, by asking what should be done.  If you
disagree with the default behaviour, you can change the value of the
variable exwm-replace.

>> So, I see no reason to continue having ~/.exwm. If no one else has any
>> objections, please do send a patch fixing this.
>
> I would very much like for this nested emacs issue to be addressed
> first.
>
> I just don't really see the point in mixing two bits of code that are
> meant to run in different scenarios, and then disabling one of them.

I don't see how it could possibly qualify as an issue, and what those
"different scenarios" are.

There's one and only one scenario.  The user launches emacs.  Emacs
reads the user's init file, and carries out the instructions.

The confusion arises from thinking about Exwm as a "session", with a
.desktop file associated with it.  But that's a special case of
something more general and simple.

Exwm is an Emacs extension, requiring a graphical X session.  After all,
it manages X windows "à la Emacs".

If you try to start Exwm from the console, it will handle it.

If you start Exwm from DEs or WMs (GNOME, i3, whatever), it will handle
it (on Guix, that requires running xhost).  Yes, this is a good middle
ground for "beginners" that aren't ready to fully convert themselves to
the Light.

If you start Exwm from Exwm itself, it will handle it as well.

The so-called "emacs-exwm" session is nothing but a convenience to
handle a common scenario.  If Exwm handles X windows, then it makes
sense to start a graphical session and IMMEDIATELY start Emacs so that
Exwm kicks in.

What happens if Exwm doesn't kick in, btw?  You get a bunch of X windows
floating around, and you won't be able to handle them with ease.  Makes
sense.

What should the "emacs-exwm" session do, then?  With some
simplifications, nothing but this:

--8<---------------cut here---------------start------------->8---
dbus-launch --exit-with-session emacs -mm --debug-init
--8<---------------cut here---------------end--------------->8---

Yes, there shouldn't even be any "exwm" logic in it.  The user knows
better.  Let the user's init file be in charge. 

I did my best to show my point of view, and I won't press on it anymore.
The decision is on the community's side.

The patch the trivial.  Acceptance isn't.


--
André A. Gomes
"Free Thought, Free World"


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

* Re: EXWM
  2021-10-18 16:44         ` EXWM André A. Gomes
@ 2021-10-20  7:27           ` Jan Nieuwenhuizen
  2021-10-22 10:25             ` EXWM André A. Gomes
  0 siblings, 1 reply; 22+ messages in thread
From: Jan Nieuwenhuizen @ 2021-10-20  7:27 UTC (permalink / raw)
  To: André A. Gomes; +Cc: guix-devel

André A. Gomes writes:

> Jan Nieuwenhuizen <janneke@gnu.org> writes:
>
>> I just tried adding my ~/.exwm into my init.el and running a nested
>> emacs and now I get a GUI dialog:
>>
>>     Replace existing window manager? Y/N
>>
>> Not great!  Not very suprisingly, the extra unnecessary initialization
>> /does/ hurt here.
>
> Isn't exwm doing precisely what it's supposed to do?  Isn't it fair that
> the newly spawned (nested) Emacs has the right to take control over the
> "older" Emacs?

Of course; that's my point exactly!  Emacs cannot know, and thus cannot
help but doing the annoying thing: throwing a dialogue.  That is what
this code

--8<---------------cut here---------------start------------->8---
(cond ((file-exists-p "~/.exwm") (load-file "~/.exwm"))
      ((not (featurep (quote exwm)))
       (require (quote exwm))
       (require (quote exwm-config))
       (exwm-config-default)
       (message (concat "exwm configuration not found. "
                        "Falling back to default configuration..."))))
--8<---------------cut here---------------end--------------->8---

helps to prevent in a very nice way.  Let's please keep it!

Greetings,
Janneke

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com


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

* Re: EXWM
  2021-10-20  7:27           ` EXWM Jan Nieuwenhuizen
@ 2021-10-22 10:25             ` André A. Gomes
  2021-10-22 10:37               ` EXWM Arun Isaac
  2021-10-22 18:55               ` EXWM Ricardo Wurmus
  0 siblings, 2 replies; 22+ messages in thread
From: André A. Gomes @ 2021-10-22 10:25 UTC (permalink / raw)
  To: Jan Nieuwenhuizen; +Cc: guix-devel

Jan Nieuwenhuizen <janneke@gnu.org> writes:

> André A. Gomes writes:
>
>> Jan Nieuwenhuizen <janneke@gnu.org> writes:
>>
>>> I just tried adding my ~/.exwm into my init.el and running a nested
>>> emacs and now I get a GUI dialog:
>>>
>>>     Replace existing window manager? Y/N
>>>
>>> Not great!  Not very suprisingly, the extra unnecessary initialization
>>> /does/ hurt here.
>>
>> Isn't exwm doing precisely what it's supposed to do?  Isn't it fair that
>> the newly spawned (nested) Emacs has the right to take control over the
>> "older" Emacs?
>
> Of course; that's my point exactly!  Emacs cannot know, and thus cannot
> help but doing the annoying thing: throwing a dialogue.  That is what
> this code
>
> (cond ((file-exists-p "~/.exwm") (load-file "~/.exwm"))
>       ((not (featurep (quote exwm)))
>        (require (quote exwm))
>        (require (quote exwm-config))
>        (exwm-config-default)
>        (message (concat "exwm configuration not found. "
>                         "Falling back to default configuration..."))))
>
> helps to prevent in a very nice way.  Let's please keep it!

After all the effort I put into all of my previous messages, it's
unfortunate to receive such a reply.

I packaged EXWM (the right way) for myself a long time ago.  If I'm
putting effort into this, it's because I think the community is missing
an opportunity to improve.  I won't get anything from any of this.  You,
on the other hand, seem to be interested in your selfish agenda.

Your reply indicates that little or no effort was put into understanding
my points.  And no effort was put to indicate where did my reasoning go
wrong.

I give up.  Let "worse is better" reign.


--
André A. Gomes
"Free Thought, Free World"


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

* Re: EXWM
  2021-10-22 10:25             ` EXWM André A. Gomes
@ 2021-10-22 10:37               ` Arun Isaac
  2021-10-22 10:52                 ` EXWM André A. Gomes
  2021-10-22 18:55               ` EXWM Ricardo Wurmus
  1 sibling, 1 reply; 22+ messages in thread
From: Arun Isaac @ 2021-10-22 10:37 UTC (permalink / raw)
  To: André A. Gomes, Jan Nieuwenhuizen; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 651 bytes --]


Hi André,

> Your reply indicates that little or no effort was put into understanding
> my points.  And no effort was put to indicate where did my reasoning go
> wrong.

I, for one, did not understand how your workflow is affected by the way
EXWM is currently packaged in Guix. As far as I understand, Guix's
~/.exwm separation is optional and you are not forced to create it. I
don't have an ~/.exwm, for example.

But, it is possible that I may have misunderstood something you
said. Perhaps, making your point more precise by providing a patch or
just a code snippet showing your modified exwm package would help.

Thanks,
Arun

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 524 bytes --]

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

* Re: EXWM
  2021-10-22 10:37               ` EXWM Arun Isaac
@ 2021-10-22 10:52                 ` André A. Gomes
  0 siblings, 0 replies; 22+ messages in thread
From: André A. Gomes @ 2021-10-22 10:52 UTC (permalink / raw)
  To: Arun Isaac; +Cc: guix-devel

Arun Isaac <arunisaac@systemreboot.net> writes:

> Hi André,
>
>> Your reply indicates that little or no effort was put into understanding
>> my points.  And no effort was put to indicate where did my reasoning go
>> wrong.
>
> I, for one, did not understand how your workflow is affected by the way
> EXWM is currently packaged in Guix. As far as I understand, Guix's
> ~/.exwm separation is optional and you are not forced to create it. I
> don't have an ~/.exwm, for example.

It's frustrating to keep repeating myself at this point, but let's do
it.

It is optional, indeed.  Now assume that you don't have a .exwm file.
Then (exwm-config-default) runs.  But that's backwards, since the user
might not want that piece of code to run.  

I have explained this from several points of view, several times.  For
instance, in one of the replies to Ludovic.

> But, it is possible that I may have misunderstood something you
> said. Perhaps, making your point more precise by providing a patch or
> just a code snippet showing your modified exwm package would help.

I did all of that.  I sent a link with my own EXWM package definition.
And I've illustrated my points with code snippets.

https://git.sr.ht/~aadcg/aadcg-guix-channel/tree/master/item/packages/aadcg-emacs-xyz.scm#L150


--
André A. Gomes
"Free Thought, Free World"


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

* Re: EXWM
  2021-10-22 10:25             ` EXWM André A. Gomes
  2021-10-22 10:37               ` EXWM Arun Isaac
@ 2021-10-22 18:55               ` Ricardo Wurmus
  2021-10-22 19:36                 ` EXWM André A. Gomes
  1 sibling, 1 reply; 22+ messages in thread
From: Ricardo Wurmus @ 2021-10-22 18:55 UTC (permalink / raw)
  To: André A. Gomes; +Cc: guix-devel


Hi André,

> I packaged EXWM (the right way) for myself a long time ago.  If 
> I'm
> putting effort into this, it's because I think the community is 
> missing
> an opportunity to improve.  I won't get anything from any of 
> this.  You,
> on the other hand, seem to be interested in your selfish agenda.

it’s frustrating to get the feeling to be misunderstood.  But 
please take a step back before judging others.  “selfish agenda” 
sounds a lot harsher than is warranted in this context.

Some background: Guix implements a philosophy that could be 
described as “magic with escape hatches”.  We usually offer neat 
features and automation by *default*, but we also provide escape 
hatches for those who don’t want the magic or have different 
requirements.  The expectation to have EXWM start right up after 
selecting it as a window manager is justified, in my opinion.  Do 
we offer a sufficient escape hatch here?

-- 
Ricardo


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

* Re: EXWM
  2021-10-22 18:55               ` EXWM Ricardo Wurmus
@ 2021-10-22 19:36                 ` André A. Gomes
  2021-10-22 20:15                   ` EXWM André A. Gomes
  0 siblings, 1 reply; 22+ messages in thread
From: André A. Gomes @ 2021-10-22 19:36 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

Ricardo Wurmus <rekado@elephly.net> writes:

> Hi André,
>
>> I packaged EXWM (the right way) for myself a long time ago.  If I'm
>> putting effort into this, it's because I think the community is
>> missing
>> an opportunity to improve.  I won't get anything from any of this.
>> You,
>> on the other hand, seem to be interested in your selfish agenda.
>
> it’s frustrating to get the feeling to be misunderstood.  But please
> take a step back before judging others.  “selfish agenda” sounds a lot
> harsher than is warranted in this context.

I apologise for the choice of words.

> Some background: Guix implements a philosophy that could be described
> as “magic with escape hatches”.  We usually offer neat features and
> automation by *default*, but we also provide escape hatches for those
> who don’t want the magic or have different requirements.

I do understand that, and that's why I like Guix.

I started a thread before sending a patch, since I antecipated that it
would be a sensitive topic.  On top of that, I was concerned about
backwards compatibility since, at this point, lots of users are perhaps
used to the .exwm file.

> The expectation to have EXWM start right up after selecting it as a
>window manager is justified, in my opinion.  Do we offer a sufficient
>escape hatch here?

No.  My point is that the "magic" that Guix provides in this case is a
double-edged sword.

Guix forces the execution of (exwm-config-default), unless the user has
a .exwm file.  That forces a default config on EXWM users, which is
unpleasant for those (like me) that have been using it for a long time.
Notice that those users have their EXWM configuration where it belongs,
i.e. in their Emacs' init file.

The .exwm file is non-standard, and it's not documented in any EXWM
project resource.  This would be somehow alleviated if (exwm-enable)
would run, instead of (exwm-config-default).

But we can do better.

I've advocated to the fact that "choosing EXWM as a window manager" is a
meaningless statement.  The meaningful statement is "choosing Emacs as
the window manager".  The user's Emacs init file dictates how EXWM is to
be initiated and operated.  In short, the EXWM bin wrapper should simply
start Emacs.

The approach I describe is the "standard" and documented way of using
and "starting EXWM".  See C-h P exwm RET for more info.

Thank you.


--
André A. Gomes
"Free Thought, Free World"


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

* Re: EXWM
  2021-10-22 19:36                 ` EXWM André A. Gomes
@ 2021-10-22 20:15                   ` André A. Gomes
  2021-10-23 15:02                     ` EXWM André A. Gomes
  0 siblings, 1 reply; 22+ messages in thread
From: André A. Gomes @ 2021-10-22 20:15 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

André A. Gomes <andremegafone@gmail.com> writes:

> Guix forces the execution of (exwm-config-default), unless the user has
> a .exwm file.  That forces a default config on EXWM users, which is
> unpleasant for those (like me) that have been using it for a long time.
> Notice that those users have their EXWM configuration where it belongs,
> i.e. in their Emacs' init file.

There's a subtle and important detail I missed, and I've only noticed it
now.

This returns

--8<---------------cut here---------------start------------->8---
emacs -q --batch --eval '(progn (require (quote exwm)) (print (featurep (quote exwm))))'
--8<---------------cut here---------------end--------------->8---

true, whereas

--8<---------------cut here---------------start------------->8---
emacs -q --batch --eval '(print (featurep (quote exwm)))'
--8<---------------cut here---------------end--------------->8---

returns nil.  But

--8<---------------cut here---------------start------------->8---
emacs -q --batch --eval '(print (fboundp (quote exwm-enable)))'
--8<---------------cut here---------------end--------------->8---

returns t (as long as emacs-exwm is installed)!

Therefore the claim that Guix forces a default EXWM config on the users
isn't entirely true.

I was led to think that way since, most likely, I didn't add (require
'exwm) in my Emacs init file.  In result, EXWM's symbols were actually
bound, but, due to the lack of the require statement, it was running
with the non-desired default config.

I apologise for my lack of attention.

I'd say that this also qualifies as evidence that the present "magic" is
a double-edge sword.


--
André A. Gomes
"Free Thought, Free World"


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

* Re: EXWM
  2021-10-22 20:15                   ` EXWM André A. Gomes
@ 2021-10-23 15:02                     ` André A. Gomes
  0 siblings, 0 replies; 22+ messages in thread
From: André A. Gomes @ 2021-10-23 15:02 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

André A. Gomes <andremegafone@gmail.com> writes:

> Therefore the claim that Guix forces a default EXWM config on the users
> isn't entirely true.

Actually, I made a mistake again.  Guix seems to force a default EXWM
config.  Find a proof below.

Emacs, as of today, is started by evaluating the following sexp:

--8<---------------cut here---------------start------------->8---
(cond ((file-exists-p "~/.exwm") (load-file "~/.exwm"))
      ((not (featurep (quote exwm)))
       (require (quote exwm))
       (require (quote exwm-config))
       (exwm-config-default)
       (message (concat "exwm configuration not found. "
                        "Falling back to default configuration..."))))
--8<---------------cut here---------------end--------------->8---

This sexp is the first thing evaluated, taking precedence over the
the user's init file.  As a result, (not (featurep (quote exwm))) always
returns t.  Therefore, Guix forces the default EXWM config.

In other words, the above sexp is equivalent to:

--8<---------------cut here---------------start------------->8---
(cond ((file-exists-p "~/.exwm") (load-file "~/.exwm"))
      (t
       (require (quote exwm))
       (require (quote exwm-config))
       (exwm-config-default)
       (message (concat "exwm configuration not found. "
                        "Falling back to default configuration..."))))
--8<---------------cut here---------------end--------------->8---

As I've been advocating, this seems to qualify as Guix not honouring the
user's Emacs init file.

I'm surprised no one noticed it before.


--
André A. Gomes
"Free Thought, Free World"


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

* Re: EXWM
@ 2022-01-01 19:19 calcium
  2022-01-03 20:03 ` EXWM André A. Gomes
  0 siblings, 1 reply; 22+ messages in thread
From: calcium @ 2022-01-01 19:19 UTC (permalink / raw)
  To: guix-devel

I was totally at lost when I started my emacs/exwm session and tried to `find-file' only to be redirected to an 'ido-find-file` with whom I don't know how to navigate.

In the moment, it felt very intrusive for me and I was very afraid to be unable to control my emacs because I have set all my emacs's keybindings to non-standard keys ((in a modal way (à la vim) but using my own custom modals) and without honoring the `C-c' convetion.) and I don't know how to navigate emacs using the default key bindings.

Luckly, this time (because packages can evolve to add more default key bindings), it was just the annoyance of ido that affected me.


I was thankfully able to understand what was going on by finding the Guix-devel archive discussing this issue.

I think that if we choose to keep things as they are, a simple fix that would help next users know what is going on without having to find an archived mailing list :

a ) being more explicit in messages in both cases like :
    (message "no \"~/.exwm\" elisp configuration found to setup exwm. "
             "Falling back to executing the default config using `(exwm-config-default)'")
    (message "executing the elisp found at \"~/.exwm\"")
b ) while still keeping the explicit messages, creating the ~/.exwm file when it doesn't exist populated with guix's choice of default settings (so that the user can read and tweak his config)

Because the message thrown by the snippet bellow is not enough at all.
  
--8<---------------cut here---------------start------------->8---
(cond ((file-exists-p "~/.exwm") (load-file "~/.exwm"))
       ((not (featurep (quote exwm)))
        (require (quote exwm))
        (require (quote exwm-config))
        (exwm-config-default)
        (message (concat "exwm configuration not found. "
                         "Falling back to default configuration..."))))
--8<---------------cut here---------------end--------------->8---




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

* Re: EXWM
  2022-01-01 19:19 EXWM calcium
@ 2022-01-03 20:03 ` André A. Gomes
  0 siblings, 0 replies; 22+ messages in thread
From: André A. Gomes @ 2022-01-03 20:03 UTC (permalink / raw)
  To: calcium; +Cc: guix-devel

calcium <calcium@disroot.org> writes:

> I was totally at lost when I started my emacs/exwm session and tried to `find-file' only to be redirected to an 'ido-find-file` with whom I don't know how to navigate.
>
> In the moment, it felt very intrusive for me and I was very afraid to be unable to control my emacs because I have set all my emacs's keybindings to non-standard keys ((in a modal way (à la vim) but using my own custom modals) and without honoring the `C-c' convetion.) and I don't know how to navigate emacs using the default key bindings.
>
> Luckly, this time (because packages can evolve to add more default key bindings), it was just the annoyance of ido that affected me.
>
>
> I was thankfully able to understand what was going on by finding the Guix-devel archive discussing this issue.
>
> I think that if we choose to keep things as they are, a simple fix that would help next users know what is going on without having to find an archived mailing list :
>
> a ) being more explicit in messages in both cases like :
>     (message "no \"~/.exwm\" elisp configuration found to setup exwm. "
>              "Falling back to executing the default config using `(exwm-config-default)'")
>     (message "executing the elisp found at \"~/.exwm\"")
> b ) while still keeping the explicit messages, creating the ~/.exwm file when it doesn't exist populated with guix's choice of default settings (so that the user can read and tweak his config)
>
> Because the message thrown by the snippet bellow is not enough at all.
>   
>
> (cond ((file-exists-p "~/.exwm") (load-file "~/.exwm"))
>        ((not (featurep (quote exwm)))
>         (require (quote exwm))
>         (require (quote exwm-config))
>         (exwm-config-default)
>         (message (concat "exwm configuration not found. "
>                          "Falling back to default configuration..."))))
>

I feel you (been there, felt that).

I tried, without success, to raise awareness about the issue (perhaps in
the archived thread you mention).  Sadly, no one agreed or tried to
prove me wrong.

I wrote a very simple and sane EXWM package definition, and you can find
it here:

https://git.sr.ht/~aadcg/aadcg-guix-channel/tree/master/item/packages/aadcg-emacs-xyz.scm#L147

I could send it as a patch, but without interest from the
developers/maintainers it makes little sense.


-- 
André A. Gomes
"Free Thought, Free World"


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

end of thread, other threads:[~2022-01-03 20:04 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-04 14:33 EXWM André A. Gomes
2021-10-08  9:57 ` EXWM Arun Isaac
2021-10-08 10:21   ` EXWM Jan Nieuwenhuizen
2021-10-08 10:55     ` EXWM Arun Isaac
2021-10-10 13:16       ` EXWM Ludovic Courtès
2021-10-15  7:15         ` EXWM André A. Gomes
2021-10-15  6:54     ` EXWM André A. Gomes
2021-10-08 10:59 ` EXWM Arun Isaac
2021-10-15  7:38   ` EXWM André A. Gomes
2021-10-16 16:03     ` EXWM Arun Isaac
2021-10-18  5:29       ` EXWM Jan Nieuwenhuizen
2021-10-18 16:44         ` EXWM André A. Gomes
2021-10-20  7:27           ` EXWM Jan Nieuwenhuizen
2021-10-22 10:25             ` EXWM André A. Gomes
2021-10-22 10:37               ` EXWM Arun Isaac
2021-10-22 10:52                 ` EXWM André A. Gomes
2021-10-22 18:55               ` EXWM Ricardo Wurmus
2021-10-22 19:36                 ` EXWM André A. Gomes
2021-10-22 20:15                   ` EXWM André A. Gomes
2021-10-23 15:02                     ` EXWM André A. Gomes
  -- strict thread matches above, loose matches on Subject: below --
2022-01-01 19:19 EXWM calcium
2022-01-03 20:03 ` EXWM André A. Gomes

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.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.