Re: [Zim-wiki] Ubuntu Dash and Zim txt files

2012-12-12 Thread Marcel Stimberg
Hi Jaap,

 Turns out that if I specify the rule for *.txt indeed ubuntu /
 nautilus get it right, but now several other appplications (based on
 spec  0.16) think all text files are zim pages :(
oh, that's bad news :-/ Could you be a bit more specific about which
other applications have issues? If it is a Ubuntu vs. other
distributions thing, we could keep the change for Ubuntu as a patch in
the Ubuntu package at least? Either way, it seems that the only
generally applicable solution is to change the file extension...

Cheers,
  Marcel

___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Ubuntu Dash and Zim txt files

2012-12-05 Thread Marcel Stimberg
Hi Bill and Jaap,

 The Ubuntu Dash allows the input of search terms to select a file. This
 can be used to identify a specific Zim page - quite a useful feature.
 However, as Zim pages are stored as *.txt files, the Dash opens them in the
 default text editor rather than Zim. This cancels out the usefulness :-).
yes, I realized the same a while ago -- it quite limits the usefulness
of the Zeitgeist integration as well (which makes recently used Zim
pages appear in the dash).

 Actually zim already does this. We install a rule in the mime type
 information database that matches the header in zim  page files.

 Unfortunately not all other applications respect this rule and give instead
 preference to the default rule for the .txt extension. Ubuntu file
 management being one such case where this rule is ignored.
I had a look at this issue a while ago and there did not seem to be an
easy solution apart from changing the file extension. I was about to
draft a bug report to the xdgmime library (which is ultimately used by
GNOME when deciding about the filetype) when I realized that there is
actually a problem in zim's mimetype specification: It does not define
the *.txt extension as a glob pattern. Looking at the GIO source
code the logic behind content type determination is:
* Get a list of possible mimetypes for the filename from xdgmime
* If none or more than one result is returned, look at the content of the file
The problem is that for .txt files, only one result is returned in the
first step, as only text/plain defines it as a glob pattern:
$ rgrep *.txt /usr/share/mime/packages/*.xml
/usr/share/mime/packages/freedesktop.org.xml:glob pattern=*.txt/

After adding the same line to /usr/share/mime/packages/zim.xml (and
updating the mime database), opening zim pages from the dash works
like a charm!

Thanks Bill for making me look into this again :)
Best,
  Marcel

___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


[Zim-wiki] mime type of zim notes

2011-12-04 Thread Marcel Stimberg
Hi all,

after letting the code rot for a while, I finally want to finish the
Zeitgeist integration plugin for zim[1]. However, the usefulness is
currently reduced because the mime type of zim pages is not correctly
detected by my system (Ubuntu 11.10) -- did anyone else notice this as
well? The file utility works fine, but the Gnome environment (e.g.
nautilus) just recognizes the file type as text/plain:

$file foo.txt
foo.txt: text/x-zim-wiki
$ gvfs-info foo.txt | grep content-type
  standard::content-type: text/plain
  standard::fast-content-type: text/plain

Thanks,
  Marcel

[1] https://bugs.launchpad.net/zim/+bug/610515

___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp



Re: [Zim-wiki] mime type of zim notes

2011-12-04 Thread Marcel Stimberg
Hi Michael,

thanks for the confirmation. I looked a bit more into the subject and
found the reason for the observed behaviour -- in fact, a quite simple
reason: For determining the file type, it is recommended (and
implemented by xdg-open etc.) to first look at the glob pattern (i.e.
normally the file extension) and only then to look at the file
content. And as zim notes have the extension .txt, they are recognized
as text/plain which registers this extension.

I think there are two solutions to this problem:
* Register the .txt extension for the text/x-zim-wiki mime type --
this has the small disadvantage that for all .txt files, a time-costly
(relatively speaking) content lookup has to be performed
* Use a different extension for zim notes (e.g. Tomboy uses .note)

Any thoughts on this?

Cheers,
  Marcel

___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Zim 0.52

2011-07-13 Thread Marcel Stimberg
Hi nomnex,

 The next big step up would be table implementation. I was looking if
 the bug report status had changed, but they've been some change on
 Launchpad:

 https://bugs.launchpad.net/~zim-wiki/+reportedbugs

 There are currently no open bugs.

The correct name for the launchpad project is zim not zim-wiki,
bugs are here:
https://bugs.launchpad.net/zim
You can find the bug report for table support here, apparently it did
not change recently:
https://bugs.launchpad.net/zim/+bug/208589

Best,
  Marcel

___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Minimum Gtk version to support in zim

2011-03-31 Thread Marcel Stimberg
Hi Jaap,

 I see following available:
 Ubuntu:    2.22 (maverick), 2.12 (Lucid - LST)
Are you sure about Lucid? The version of libgtk-2.0-0 in Lucid seems
to be 2.20, python-gtk2 is 2.17. The same holds for Debian stable and
testing.

Best,
  Marcel

PS: I'm on Maverick and Natty, so no problems here :)

___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Minimum Gtk version to support in zim

2011-03-31 Thread Marcel Stimberg
 But I think zim should support debian old-stables
 release at least for some month. Squeeze is now stable for two month and
 not every admin starts updating directly.
I think this is all not about supporting a release (i.e. providing
bug fixes) but about whether *new* versions of zim ( 0.5) will work
with outdated distributions. Out of curiosity: Are you using zim's
most recent release or are you using an older version on your work PC
that is running Jaunty?

As a side note: I'd really suggest your employer to update your
outdated Ubuntu version. Jaunty reached end of life last October, i.e.
since then you did not receive any updates, no security fixes etc. If
updating every 6 month is not an option, stay with an LTS release.

Best
  Marcel

___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Main branch rename

2011-02-27 Thread Marcel Stimberg
Hi Fabian,

I had the same issue with my branch, the problem is known in Launchpad[1].
To fix it, you not only have to fix branch.conf as you already
guessed, but also trigger a re-reading of the file. This can be done
with a simple python script that you can find in the bug report.

To access the file branch.conf, you can use sftp, e.g.
sftp f...@bazaar.launchpad.net:~fmos/zim/features/.bzr/branch
sftp get branch.conf
[edit the branch.conf file]
sftp put branch.conf

Cheers,
  Marcel

[1] https://bugs.launchpad.net/launchpad/+bug/377519

___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp