Bug#1055838: gnome: GNOME Text Editor not chosen or listed for text files

2023-11-13 Thread Simon McVittie
On Sun, 12 Nov 2023 at 15:23:10 +, Simon McVittie wrote:
> On Sun, 12 Nov 2023 at 14:12:25 +0100, Paul Menzel wrote:
> > With Debian sid/unstable and *gnome* 1:44+1, text files, for example with
> > the suffix .txt, are opened with LibreOffice Writer and not GNOME Text
> > Editor (*gnome-text-editor* 45.0-1).
> 
> This seems to be because /usr/share/applications/gnome-mimeapps.list in
> gnome-session-common lists gedit but not gnome-text-editor.

A fix is on its way into unstable, and I've proposed a stable-update for
Debian 12.3.

> > It’s not even listed in the application choices.
> 
> I'm surprised by that, because
> /usr/share/applications/org.gnome.TextEditor.desktop does list text/plain
> as a supported file type

I think I might have misunderstood what you meant by "the application
choices".

To clarify, Nautilus does not dynamically add a menu item per text editor
with labels like "Open With Text Editor", "Open With gedit", "Open With
emacs", "Open With gVim" and so on - that is not intended behaviour. It is
only intended to have two "Open With" menu entries: the first is for the
default application (the same one you would get for a double-click), and
the second opens a window where you can choose a non-default application.

The behaviour I see is:

* Right-click on a plain text file in nautilus (GNOME Files)
* The top option is "Open With (some default app) [Return]".
  The bug you reported is that for you, the app is LibreOffice Writer (and
  I can reproduce this on a default task-gnome-desktop installation).
  With the bug fixed, it should be Text Editor (which is the
  gnome-text-editor package), or possibly gedit.
* The second option is "Open With..." with no keyboard shortcut.
* If you choose to "Open With...", even before this bug is fixed, you
  should see "Text Editor" listed under the "Recommended Applications"
  heading.
* After this bug is fixed, "Text Editor" should move up to
  "Default Application", replacing LibreOffice Writer, which moves down
  to "Recommended Applications".

Is that the same thing you see? If not, please describe what you see in
similar detail, and how it differs from what you expect.

Thanks,
smcv



Bug#1055838: gnome: GNOME Text Editor not chosen or listed for text files

2023-11-12 Thread Simon McVittie
Control: reassign -1 gnome-session-common 45.0-1
Control: affects -1 + gnome-core

On Sun, 12 Nov 2023 at 14:12:25 +0100, Paul Menzel wrote:
> With Debian sid/unstable and *gnome* 1:44+1, text files, for example with
> the suffix .txt, are opened with LibreOffice Writer and not GNOME Text
> Editor (*gnome-text-editor* 45.0-1).

This seems to be because /usr/share/applications/gnome-mimeapps.list in
gnome-session-common lists gedit but not gnome-text-editor. It should
list both, with some appropriate default priority order (presumably
gnome-text-editor > gedit, since gnome-text-editor is the one that is
pulled in by the gnome-core metapackage).

You should be able to work around this by editing ~/.config/mimeapps.list
to add:

[Default Applications]
text/plain=org.gnome.TextEditor.desktop

This should be fixed by a change to gnome-session-common rather than gnome,
so I'm reassigning the bug.

> It’s not even listed in the application choices.

I'm surprised by that, because
/usr/share/applications/org.gnome.TextEditor.desktop does list text/plain
as a supported file type, but perhaps updating gnome-mimeapps.list would
fix that too.

smcv



Bug#1055838: gnome: GNOME Text Editor not chosen or listed for text files

2023-11-12 Thread Paul Menzel

package: gnome
version: 1:44+1
severity: normal


Dear Debian folks,


With Debian sid/unstable and *gnome* 1:44+1, text files, for example 
with the suffix .txt, are opened with LibreOffice Writer and not GNOME 
Text Editor (*gnome-text-editor* 45.0-1). It’s not even listed in the 
application choices. `xdg-open` also opens the text file with 
LibreOffice. In the past, *gedit was used by default, so it’d be great 
if now GNOME Text Editor could do the same.



Kind regards,

Paul