[PATCH] vim: add per-message tagging

2023-05-09 Thread Felipe Contreras
Also map space to mark a message as read and archived. Signed-off-by: Felipe Contreras --- I forced myself to use the version of notmuch-vim in notmuch and while it works, this is the single most important feature I missed the most. vim/notmuch.vim | 11 +++ 1 file changed, 11

Re: [PATCH 0/2] vim: doc: trivial fixes

2023-05-08 Thread Felipe Contreras
David Bremner wrote: > Felipe Contreras writes: > > > These are some trivial patches long overdue from upstream. > > > > They have been already sent in some form long time ago > > id:20210418224851.88240-3-felipe.contre...@gmail.com, but hopefully in a > &

[PATCH 2/2] vim: doc: minor spelling fix

2023-05-03 Thread Felipe Contreras
From: John Gliksberg Signed-off-by: Felipe Contreras --- vim/notmuch.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vim/notmuch.txt b/vim/notmuch.txt index 4a038102..c98f2b53 100644 --- a/vim/notmuch.txt +++ b/vim/notmuch.txt @@ -144,7 +144,7 @@ If you want to count

[PATCH 1/2] vim: doc: small fixes

2023-05-03 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- vim/README | 4 ++-- vim/notmuch.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/vim/README b/vim/README index c137bacd..777c20c0 100644 --- a/vim/README +++ b/vim/README @@ -53,10 +53,10 @@ Enjoy ;) As an example

[PATCH 0/2] vim: doc: trivial fixes

2023-05-03 Thread Felipe Contreras
These are some trivial patches long overdue from upstream. They have been already sent in some form long time ago id:20210418224851.88240-3-felipe.contre...@gmail.com, but hopefully in a smaller batch they'll get merged. Felipe Contreras (1): vim: doc: small fixes John Gliksberg (1): vim

Re: Recommended method to pair Notmuch with Neovim?

2023-04-18 Thread Felipe Contreras
Ralph Seichter wrote: > * Felipe Contreras: > > > I just installed neovim-ruby and tried to send an email with > > neovim+notmuch-vim: it was sent just fine. > > That's good to hear. Hopefully I am just doing something wrong, which > would be easiest to f

Re: Recommended method to pair Notmuch with Neovim?

2023-04-18 Thread Felipe Contreras
Ralph Seichter wrote: > * Felipe Contreras: > > > neovim aims to support most of what vim does. > > At the time of me writing this, the Neovim tracker on GitHub lists a > whopping 1380 open issues, so I'd imagine that goal has not yet been > reached. ;-) I imag

Re: Recommended method to pair Notmuch with Neovim?

2023-04-17 Thread Felipe Contreras
Ralph Seichter wrote: > * Felipe Contreras: > > > There hasn't been any development because to be frank it just works. > > I did not mean to imply that "no repository changes" is necessarily a > bad thing. However, Neovim being quite volatile, I intuitively expe

Re: Recommended method to pair Notmuch with Neovim?

2023-04-17 Thread Felipe Contreras
Ralph Seichter wrote: > Based on the Notmuch documentation [1] and Internet search results, > Felipe Contreras' notmuch-vim plugin [2] used to be a popular method of > combining Notmuch with Vim (at least classic Vim). However, there have > not been any Git repository updates for

Re: inbox-update: new competition of notmuch-lore

2023-04-17 Thread Felipe Contreras
n for > them, too. Or simply a tree in public-inbox which allows clients to > use a mere checkout ... 99% of the time the content is not needed for the MUAs. So perhaps there could be a way to request the body of the message through libnotmuch, and some provider of virtual messages retri

inbox-update: new competition of notmuch-lore

2023-04-16 Thread Felipe Contreras
converted, but that's probably easy to add later on. You can check the GitHub page for more information [2]. Cheers. [1] https://github.com/wkz/notmuch-lore [2] https://github.com/felipec/notmuch-tools -- Felipe Contreras ___ notmuch mailing list

Re: [PATCH v3 1/5] test: use bash specific test for feature tests

2023-04-13 Thread Felipe Contreras
erse, but long story short: you can just use the above and it should work on all shells and all configurations. You can just do "$VAR", *but* it wouldn't work with `set -u`. I never use -u, so I don't care, but if you do care, do "${VAR-}". Cheers. -- Felipe Contreras _

Re: [PATCH v3 1/5] test: use bash specific test for feature tests

2023-04-13 Thread Felipe Contreras
FOO-0} -eq 1 ]`, or as I prefer: `[ "$FOO" = 1 ]`. -- Felipe Contreras ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org

Re: Reimagining notmuch-git/nmbug

2023-04-05 Thread Felipe Contreras
On Tue, Apr 4, 2023 at 12:54 PM David Bremner wrote: > > Felipe Contreras writes: > > > On Mon, Apr 3, 2023 at 6:37 PM David Bremner wrote: > > > Or we could say that after jumping a certain threshold of lastmod we > > delete all the messages and start fr

Re: Reimagining notmuch-git/nmbug

2023-04-03 Thread Felipe Contreras
pport multiple formats. In fact, the format could be specified in the URL, like `nm::1:$HOME/mail` for the current notmuch-git format, and `nm::2:$HOME/mail` for the new. -- Felipe Contreras ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org

Re: Reimagining notmuch-git/nmbug

2023-04-03 Thread Felipe Contreras
On Mon, Apr 3, 2023 at 6:37 PM David Bremner wrote: > > Felipe Contreras writes: > > > > > That should work to update existing tags, but how are we going to > > detect if a message has disappeared? Or is that not a thing? > > Indeed the same thought had occurred

[PATCH] ruby: query: fix get sort

2023-04-03 Thread Felipe Contreras
The order was wrong, right now `query.sort` doesn't return a number. Signed-off-by: Felipe Contreras --- bindings/ruby/query.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bindings/ruby/query.c b/bindings/ruby/query.c index 8a2b4d3d..077def02 100644 --- a/bindings/ruby

Re: Reimagining notmuch-git/nmbug

2023-04-03 Thread Felipe Contreras
revisions? If so, it might make sense to set $lastmod to 0 initially. Then we could unconditionally do: $db.query('lastmod:%d..' % $lastmod, sort: Notmuch::SORT_UNSORTED) -- Felipe Contreras ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org

Re: Reimagining notmuch-git/nmbug

2023-04-03 Thread Felipe Contreras
ke notmuch-git does using BLAKE2b, the operation is much faster. I've pushed the changes, now there's a dependency, but you can just `gem install blake2b`. I'm able to clone the database of the performance corpus in 5 seconds: % git clone --bare nm::$PWD/mail mail.git Chee

Re: Reimagining notmuch-git/nmbug

2023-04-03 Thread Felipe Contreras
On Mon, Apr 3, 2023 at 4:49 AM David Bremner wrote: > > Felipe Contreras writes: > > > Hi, > > > > I noticed you promoted notmuch-git as a user tool to toy around with it. > > > > Very quickly I realized that most of what it does is something I've &g

Re: [PATCH 0/3] ruby: get rid of Tags object

2023-04-02 Thread Felipe Contreras
On Sun, Apr 2, 2023 at 5:18 PM David Bremner wrote: > > Felipe Contreras writes: > > > We don't need a Tags enumerable object only for a small number of strings, > > we > > can just get them directly. > > > > This fixes an interaction problem where we mi

[PATCH 3/3] ruby: add db.{set,get}_config

2023-03-31 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- bindings/ruby/database.c | 45 bindings/ruby/defs.h | 6 ++ bindings/ruby/init.c | 2 ++ 3 files changed, 53 insertions(+) diff --git a/bindings/ruby/database.c b/bindings/ruby/database.c index 4372afa1

[PATCH 2/3] ruby: add directory.delete

2023-03-31 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- bindings/ruby/defs.h | 3 +++ bindings/ruby/directory.c | 19 +++ bindings/ruby/init.c | 1 + 3 files changed, 23 insertions(+) diff --git a/bindings/ruby/defs.h b/bindings/ruby/defs.h index c4943681..3ef228b7 100644 --- a/bindings

[PATCH 0/3] ruby: api updates

2023-03-31 Thread Felipe Contreras
bindings. Felipe Contreras (3): ruby: add database.revision ruby: add directory.delete ruby: add db.{set,get}_config bindings/ruby/database.c | 63 +++ bindings/ruby/defs.h | 12 bindings/ruby/directory.c | 19 bindings/ruby/init.c

[PATCH 1/3] ruby: add database.revision

2023-03-31 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- bindings/ruby/database.c | 18 ++ bindings/ruby/defs.h | 3 +++ bindings/ruby/init.c | 1 + 3 files changed, 22 insertions(+) diff --git a/bindings/ruby/database.c b/bindings/ruby/database.c index b6de1254..4372afa1 100644

Re: [PATCH 0/2] ruby: database open improvements

2023-03-31 Thread Felipe Contreras
On Fri, Mar 31, 2023 at 5:07 AM David Bremner wrote: > > Felipe Contreras writes: > > > Essentially we want to do notmuch_database_open_with_config() and load the > > default database. > > > > Applied to master. Thanks for this change, both are things I'd wanted

[PATCH] ruby: db: reorganize initializer

2023-03-31 Thread Felipe Contreras
In order to make it more extensible. No functional changes. Signed-off-by: Felipe Contreras --- bindings/ruby/database.c | 52 bindings/ruby/defs.h | 2 -- bindings/ruby/init.c | 4 3 files changed, 32 insertions(+), 26 deletions(-) diff

Re: Reimagining notmuch-git/nmbug

2023-03-29 Thread Felipe Contreras
On Wed, Mar 29, 2023 at 3:50 AM Michael J Gruber wrote: > > Am Mi., 29. März 2023 um 10:41 Uhr schrieb Felipe Contreras > : > > > > Hi, > > > > I noticed you promoted notmuch-git as a user tool to toy around with it. > > > > Very quickly I realize

Reimagining notmuch-git/nmbug

2023-03-29 Thread Felipe Contreras
ers [2] https://github.com/felipec/git-notmuch [3] https://git-scm.com/docs/git-fast-import -- Felipe Contreras ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org

Re: [PATCH 0/3] ruby: get rid of FileNames object

2023-03-28 Thread Felipe Contreras
On Tue, Mar 28, 2023 at 12:47 AM Felipe Contreras wrote: > We can replace the Foo object any other kind of Enumerable, and the > code works just the same: > > foo = %w[inbox unread] I realized this might be too idiomatic of Ruby, it's the same thing as: foo = [ 'inb

Re: [PATCH 0/3] ruby: get rid of FileNames object

2023-03-28 Thread Felipe Contreras
On Mon, Mar 27, 2023 at 6:13 PM David Bremner wrote: > > Felipe Contreras writes: > > > We don't need a FileNames enumerable object only for a small number of > > strings, > > we can just get them directly. > > > > This iterator is meant to be tran

[PATCH 2/3] ruby: filenames: return string array directly

2023-03-27 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- bindings/ruby/filenames.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bindings/ruby/filenames.c b/bindings/ruby/filenames.c index 17873393..17ec4406 100644 --- a/bindings/ruby/filenames.c +++ b/bindings/ruby/filenames.c @@ -23,7

[PATCH 3/3] ruby: remove FileNames object

2023-03-27 Thread Felipe Contreras
Not used anymore now that we return an array of strings directly. Signed-off-by: Felipe Contreras --- bindings/ruby/defs.h | 10 bindings/ruby/filenames.c | 52 --- bindings/ruby/init.c | 14 --- 3 files changed, 76 deletions

[PATCH 1/3] ruby: add filenames helper

2023-03-27 Thread Felipe Contreras
Right now it doesn't do much, but it will help for further reorganization. Signed-off-by: Felipe Contreras --- bindings/ruby/defs.h | 3 +++ bindings/ruby/directory.c | 4 ++-- bindings/ruby/filenames.c | 6 ++ bindings/ruby/message.c | 2 +- 4 files changed, 12 insertions(+), 3

[PATCH 0/3] ruby: get rid of FileNames object

2023-03-27 Thread Felipe Contreras
on that approach but since there isn't any and there's no reason this shouldn't work, here's the same for Filenames. Felipe Contreras (3): ruby: add filenames helper ruby: filenames: return string array directly ruby: remove FileNames object bindings/ruby/defs.h | 9 +-- bindings/ruby

[PATCH 2/2] ruby: database: make path arg optional

2023-03-22 Thread Felipe Contreras
It can be automatically loaded from the configuration now. Signed-off-by: Felipe Contreras --- bindings/ruby/database.c | 10 +++--- test/T395-ruby.sh| 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/bindings/ruby/database.c b/bindings/ruby/database.c index

[PATCH 1/2] ruby: use database_open_with_config

2023-03-22 Thread Felipe Contreras
Fixes warning: warning: ‘notmuch_database_open’ is deprecated: function deprecated as of libnotmuch 5.4 Signed-off-by: Felipe Contreras --- bindings/ruby/database.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bindings/ruby/database.c b/bindings/ruby/database.c index

[PATCH 0/2] ruby: database open improvements

2023-03-22 Thread Felipe Contreras
Essentially we want to do notmuch_database_open_with_config() and load the default database. Felipe Contreras (2): ruby: use database_open_with_config ruby: database: make path arg optional bindings/ruby/database.c | 12 test/T395-ruby.sh| 2 +- 2 files changed, 9

Re: BUG: ruby segfault in notmuch_rb_tags_each

2023-03-22 Thread Felipe Contreras
least it can be reproduced! > > Pinging Felipe to see if he has any ideas. Gmail didn't raise this to my inbox. Great. -- Felipe Contreras ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org

Re: BUG: ruby segfault in notmuch_rb_tags_each

2023-03-22 Thread Felipe Contreras
you can try this workaround in the Message constructor of notmuch-vim: @tags = msg.tags.map(&:to_s) I'm attaching a simple script that reproduces the issue. Cheers. -- Felipe Contreras simple.rb Description: application/ruby ___ notmuch mailing

[PATCH 3/3] ruby: remove Tags object

2023-03-22 Thread Felipe Contreras
Not used anymore now that we return an array of strings directly. Signed-off-by: Felipe Contreras --- bindings/ruby/defs.h | 7 -- bindings/ruby/init.c | 14 --- bindings/ruby/tags.c | 55 3 files changed, 76 deletions(-) diff --git

[PATCH 2/3] ruby: tags: return string array directly

2023-03-22 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- bindings/ruby/tags.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bindings/ruby/tags.c b/bindings/ruby/tags.c index cc6ea59e..cad17d4c 100644 --- a/bindings/ruby/tags.c +++ b/bindings/ruby/tags.c @@ -23,7 +23,12 @@ VALUE

[PATCH 1/3] ruby: add tags helper

2023-03-22 Thread Felipe Contreras
Right now it doesn't do much, but it will help for further reorganization. Signed-off-by: Felipe Contreras --- bindings/ruby/database.c | 2 +- bindings/ruby/defs.h | 3 +++ bindings/ruby/message.c | 2 +- bindings/ruby/messages.c | 2 +- bindings/ruby/tags.c | 6 ++ bindings/ruby

[PATCH 0/3] ruby: get rid of Tags object

2023-03-22 Thread Felipe Contreras
= notmuch_message_get_tags(message); // Traverse it This iterator is meant to be transient and works only once, so we better just iterate it once. Felipe Contreras (3): ruby: add tags helper ruby: tags: return string array directly ruby: remove Tags object bindings/ruby/database.c | 2 +- bindings

[PATCH v2] ruby: cleanup object_destroy()

2021-08-03 Thread Felipe Contreras
, so nothing was returned (void). All the destroy functions are void, and that's what we want. Signed-off-by: Felipe Contreras --- Rebased on top of latest master. bindings/ruby/defs.h | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/bindings/ruby/defs.h b/bindings

Re: [ANN] notmuch-vim 0.7 released

2021-07-09 Thread Felipe Contreras
On Thu, Jul 8, 2021 at 12:51 AM Ralph Seichter wrote: > > * Felipe Contreras: > > > https://github.com/felipec/notmuch-vim > > > > I stopped working on it in 2014, but I'm back. > > Welcome back. This is an interesting plugin for sure. I'd like to > package

Re: [ANN] notmuch-vim 0.7 released

2021-07-09 Thread Felipe Contreras
Hi, On Fri, Jul 9, 2021 at 12:50 PM Steve Litt wrote: > Felipe Contreras said on Wed, 07 Jul 2021 23:21:42 -0500 > >notmuch-vim is a fully-functional mail user agent implemented in vim. > >It uses as inspiration other text-based MUAs such as mutt and sup, but > >it's bette

[ANN] notmuch-vim 0.7 released

2021-07-07 Thread Felipe Contreras
/felipec/notmuch-vim I stopped working on it in 2014, but I'm back. Enjoy. 4 Aaron Borden 27 Felipe Contreras 1 Franz Fellner 1 John Gliksberg 1 Jules Aguillon -- Felipe Contreras ___ notmuch mailing list -- notmuch

[PATCH 2/2] ruby: cleanup object_destroy()

2021-07-06 Thread Felipe Contreras
, so nothing was returned (void). All the destroy functions are void, and that's what we want. Signed-off-by: Felipe Contreras --- bindings/ruby/defs.h | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/bindings/ruby/defs.h b/bindings/ruby/defs.h index daac13ab..b3f0621c

[PATCH 1/2] ruby: split database close and destroy

2021-07-06 Thread Felipe Contreras
Mirrors the C API: 7864350c (Split notmuch_database_close into two functions, 2012-04-25). Signed-off-by: Felipe Contreras --- bindings/ruby/database.c | 19 ++- bindings/ruby/defs.h | 3 +++ bindings/ruby/init.c | 1 + 3 files changed, 22 insertions(+), 1 deletion

[PATCH 0/2] ruby: sync database close/destroy

2021-07-06 Thread Felipe Contreras
Sychronize with notmuch API, where notmuch_database_close is different from notmuch_database_destroy. At least since a long time ago. Felipe Contreras (2): ruby: split database close and destroy ruby: cleanup object_destroy() bindings/ruby/database.c | 19 ++- bindings/ruby

[PATCH v2 3/3] ruby: make db.config return an enumerator

2021-06-29 Thread Felipe Contreras
=> # This allows us to do: db.config.to_a db.config.to_h db.config.each { |k, v| ... } And of course what is already possible: db.config { |k, v| ... } Signed-off-by: Felipe Contreras --- bindings/ruby/database.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bindings/r

[PATCH v2 2/3] ruby: add db.config

2021-06-29 Thread Felipe Contreras
In order to use notmuch_config_get_pairs. Signed-off-by: Felipe Contreras --- bindings/ruby/database.c | 31 +++ bindings/ruby/defs.h | 4 bindings/ruby/init.c | 1 + test/T395-ruby.sh| 8 4 files changed, 44 insertions(+) diff --git

[PATCH v2 1/3] ruby: add new Database.open_with_config

2021-06-29 Thread Felipe Contreras
In order to make use of notmuch_database_open_with_config. Signed-off-by: Felipe Contreras --- bindings/ruby/database.c | 62 bindings/ruby/defs.h | 6 bindings/ruby/init.c | 1 + test/T395-ruby.sh| 6 4 files changed, 75

[PATCH v2 0/3] ruby: add latest config API

2021-06-29 Thread Felipe Contreras
style update to one test. Felipe Contreras (3): ruby: add new Database.open_with_config ruby: add db.config ruby: make db.config return an enumerator bindings/ruby/database.c | 95 bindings/ruby/defs.h | 10 + bindings/ruby/init.c | 2

Re: [PATCH v2 1/2] ruby: add keyword arguments to db.query

2021-06-28 Thread Felipe Contreras
On Sun, Jun 27, 2021 at 12:18 PM David Bremner wrote: > > Felipe Contreras writes: > > > That way we don't need pass them to the query object ourselves. > > I have applied this change to master. As we discussed previously, I > prefer to leave the sort order explicit in

Re: [PATCH 1/3] ruby: add new Database.open_with_config

2021-06-27 Thread Felipe Contreras
On Sun, Jun 27, 2021 at 1:02 PM David Bremner wrote: > > Felipe Contreras writes: > > > +ret = notmuch_database_open_with_config (database_path, mode, > > + config_path, profile, , > > +

[PATCH] perf-test: fix for verbose

2021-06-26 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- I don't know how $verbose is supposed to be set, but when I manually did it didn't work. performance-test/perf-test-lib.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/performance-test/perf-test-lib.sh b/performance-test/perf-test

[PATCH] perf-test: add ruby test

2021-06-26 Thread Felipe Contreras
Simply list the message-id of all the messages in a loop 100 times. Suggested-by: David Bremner Signed-off-by: Felipe Contreras --- performance-test/T05-ruby.sh | 24 1 file changed, 24 insertions(+) create mode 100755 performance-test/T05-ruby.sh diff --git

Re: [PATCH 2/2] ruby: enable garbage collection using talloc

2021-06-26 Thread Felipe Contreras
On Sat, Jun 26, 2021 at 2:54 PM David Bremner wrote: > > Felipe Contreras writes: > > >> > >> One issue to double check: in a few places we explicitely _don't_ use > >> talloc. What happens when those objects are passed to talloc_steal? > > &

Re: [PATCH 2/2] ruby: enable garbage collection using talloc

2021-06-26 Thread Felipe Contreras
On Fri, Jun 11, 2021 at 3:54 AM David Bremner wrote: > > David Bremner writes: > > > Felipe Contreras writes: > > > >> We basically steal all the objects from their notmuch parents, therefore > >> they are completely under Ruby's gc control. > >>

Re: [PATCH 2/2] ruby: enable garbage collection using talloc

2021-06-26 Thread Felipe Contreras
On Thu, Jun 10, 2021 at 7:46 PM David Bremner wrote: > > Felipe Contreras writes: > > > We basically steal all the objects from their notmuch parents, therefore > > they are completely under Ruby's gc control. > > > > The order at which these objects a

Re: [PATCH 3/3] test: ruby: simplify basic tests

2021-06-07 Thread Felipe Contreras
On Mon, Jun 7, 2021 at 6:53 PM David Bremner wrote: > > Felipe Contreras writes: > > >> > >> Is this assuming that the sort order in the CLI is the same as in the > >> library / bindings? that seems a bit fragile if so. > > > > Both the CLI and th

Re: How to recover from this permanent fatal error?

2021-06-07 Thread Felipe Contreras
Olly Betts wrote: > On Sun, Jun 06, 2021 at 07:48:39AM -0500, Felipe Contreras wrote: > > On Sun, Jun 6, 2021 at 5:08 AM Olly Betts wrote: > > > > > You could try commenting out the body of GlassTable::set_overwritten() > > > in xapian-core/backends/glass/glass_t

Re: How to recover from this permanent fatal error?

2021-06-06 Thread Felipe Contreras
lt-xapian-check: DatabaseError: Block 152676: used more than once in the Btree -- Felipe Contreras ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org

Re: How to recover from this permanent fatal error?

2021-06-05 Thread Felipe Contreras
On Sat, Jun 5, 2021 at 8:45 PM Olly Betts wrote: > > On Sat, Jun 05, 2021 at 09:39:28AM -0500, Felipe Contreras wrote: > > On Fri, Jun 4, 2021 at 9:43 PM Olly Betts wrote: > > > I'd suggest trying this simple tool I wrote that can probably rescue the > > > tags

Re: How to recover from this permanent fatal error?

2021-06-05 Thread Felipe Contreras
On Fri, Jun 4, 2021 at 9:43 PM Olly Betts wrote: > > On Fri, Jun 04, 2021 at 08:40:56PM -0500, Felipe Contreras wrote: > > On Fri, Jun 4, 2021 at 8:37 PM David Bremner wrote: > > > Felipe Contreras writes: > > > > > > I can't use notmuch anymore, I g

Re: [PATCH] completion: remove "setup" from the list of possible completions

2021-06-05 Thread Felipe Contreras
quot; is completed. The user can change this and show all commands with: zstyle ':completion:*:*:git:*' tag-order 'all-commands' So really, we can have the best of both worlds. All you have to do is decide what kind of configuration you want. Cheers. -- Felipe Contreras

Re: How to recover from this permanent fatal error?

2021-06-04 Thread Felipe Contreras
On Fri, Jun 4, 2021 at 8:37 PM David Bremner wrote: > Felipe Contreras writes: > > I can't use notmuch anymore, I get this error: > > > > A Xapian exception occurred opening database: The revision being read > > has been discarded - you should call Xapian::Datab

How to recover from this permanent fatal error?

2021-06-04 Thread Felipe Contreras
got the issue. All I can find about the issue is that somebody reported the exact same message to the mailing list (id:87txmb4xyz@mcs.anl.gov), but did not receive any feedback. Ideas? -- Felipe Contreras ___ notmuch mailing list -- notmuch

Re: [PATCH v2 0/2] ruby: improve db.query

2021-06-04 Thread Felipe Contreras
On Sun, May 23, 2021 at 9:19 PM Felipe Contreras wrote: > > I find it a bit annoying to have to modify the query object to add > options when Notmuch::Database.query() can do that just fine. > > This series also adds a mapping to the notmuch_exclude_t enum in order > to

Re: [PATCH 2/3] ruby: add db.config

2021-06-03 Thread Felipe Contreras
On Thu, Jun 3, 2021 at 10:29 PM Felipe Contreras wrote: > --- a/test/T395-ruby.sh > +++ b/test/T395-ruby.sh > @@ -88,4 +88,11 @@ test_ruby < puts Notmuch::Database.open_with_config.path > EOF > > +test_begin_subtest "config" > +notmuch config list |

[PATCH 3/3] ruby: make db.config return an enumerator

2021-06-03 Thread Felipe Contreras
=> # This allows us to do: db.config.to_a db.config.to_h db.config.each { |k, v| ... } And of course what is already possible: db.config { |k, v| ... } Signed-off-by: Felipe Contreras --- bindings/ruby/database.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bindings/r

[PATCH 2/3] ruby: add db.config

2021-06-03 Thread Felipe Contreras
In order to use notmuch_config_get_pairs. Signed-off-by: Felipe Contreras --- bindings/ruby/database.c | 31 +++ bindings/ruby/defs.h | 4 bindings/ruby/init.c | 1 + test/T395-ruby.sh| 7 +++ 4 files changed, 43 insertions(+) diff --git

[PATCH 1/3] ruby: add new Database.open_with_config

2021-06-03 Thread Felipe Contreras
In order to make use of notmuch_database_open_with_config. Signed-off-by: Felipe Contreras --- bindings/ruby/database.c | 62 bindings/ruby/defs.h | 6 bindings/ruby/init.c | 1 + test/T395-ruby.sh| 6 4 files changed, 75

[PATCH 0/3] ruby: add latest config API

2021-06-03 Thread Felipe Contreras
and it's not too overly complicated, the notmuch API already has much better constucts. This patch series allows the user to simply do: $db = Notmuch::Database.open_with_config $config = $db.config.to_h And much more. Felipe Contreras (3): ruby: add new Database.open_with_config ruby: add

Re: [PATCH 0/2] ruby: enable garbage collection

2021-05-27 Thread Felipe Contreras
On Sat, May 22, 2021 at 5:49 AM David Bremner wrote: > > Felipe Contreras writes: > > > Ruby is a gc language, we shouldn't be doing workaround to free memory when > > Ruby is perfectly > > capable of doing so. > > > > The problem is that talloc want

Re: [PATCH v3] test: replace notmuch_passwd_sanitize() with _libconfig_sanitize()

2021-05-23 Thread Felipe Contreras
On Fri, May 21, 2021 at 1:22 PM Tomi Ollila wrote: > > On Fri, May 21 2021, Felipe Contreras wrote: > > > On Thu, May 20, 2021 at 2:43 AM Tomi Ollila wrote: > >> > >> On Wed, May 19 2021, Felipe Contreras wrote: > >> > >> > On Wed, May 19, 20

Re: [PATCH 2/3] ruby: add keyword arguments to db.query

2021-05-23 Thread Felipe Contreras
On Sun, May 23, 2021 at 7:29 AM David Bremner wrote: > > Felipe Contreras writes: > > > That way we don't need pass them to the query object ourselves. > > LGTM, but when I tried to resolve the conflicts I messed something up > and the ruby sort test(s) started failing.

[PATCH v2 2/2] test: ruby: simplify basic tests

2021-05-23 Thread Felipe Contreras
We don't need to check for the order here, that is done in another test. Signed-off-by: Felipe Contreras --- test/T395-ruby.sh | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/test/T395-ruby.sh b/test/T395-ruby.sh index e828efed..9298bc9e 100755 --- a/test/T395

[PATCH v2 1/2] ruby: add keyword arguments to db.query

2021-05-23 Thread Felipe Contreras
That way we don't need pass them to the query object ourselves. Signed-off-by: Felipe Contreras --- bindings/ruby/database.c | 47 +--- bindings/ruby/defs.h | 2 +- bindings/ruby/init.c | 2 +- test/T395-ruby.sh| 18 +++ 4 files

[PATCH v2 0/2] ruby: improve db.query

2021-05-23 Thread Felipe Contreras
on master of May 23. Felipe Contreras (2): ruby: add keyword arguments to db.query test: ruby: simplify basic tests bindings/ruby/database.c | 47 +--- bindings/ruby/defs.h | 2 +- bindings/ruby/init.c | 2 +- test/T395-ruby.sh| 30

Re: [PATCH 3/3] test: ruby: simplify basic tests

2021-05-23 Thread Felipe Contreras
On Sun, May 23, 2021 at 7:32 AM David Bremner wrote: > > Felipe Contreras writes: > > > We don't need to check for the order here, that is done in another test. > > > > Signed-off-by: Felipe Contreras > > --- > > test/T395-ruby.sh | 12

Re: [PATCH v3] test: replace notmuch_passwd_sanitize() with _libconfig_sanitize()

2021-05-21 Thread Felipe Contreras
On Thu, May 20, 2021 at 2:43 AM Tomi Ollila wrote: > > On Wed, May 19 2021, Felipe Contreras wrote: > > > On Wed, May 19, 2021 at 12:34 PM Tomi Ollila wrote: > > > >> Haha, as we do _libconfig_sanitize < OUTPUT > OUTPUT.clean > >> reading python sc

Re: [PATCH v3] test: replace notmuch_passwd_sanitize() with _libconfig_sanitize()

2021-05-19 Thread Felipe Contreras
On Wed, May 19, 2021 at 12:34 PM Tomi Ollila wrote: > Haha, as we do _libconfig_sanitize < OUTPUT > OUTPUT.clean > reading python script from stdin don't work (perl has __DATA__ ;). > (bitten again, I did and tested the change... :D). That can be fixed with: python /dev/fd/3 3<

Re: [PATCH v3] test: replace notmuch_passwd_sanitize() with _libconfig_sanitize()

2021-05-19 Thread Felipe Contreras
l = l.replace(".(none)", "", 1).replace(".localdomain", "", 1) > +elif l[:3] == "a: ": > +sq = chr(39) # single quote > +l = l.replace(sq + name, sq + "USER_FULL_NAME", 1) Then we can simply do: l.replace("'" + name, "'USER_FULL_NAME", 1) The rest looks fine to me. -- Felipe Contreras ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org

Re: [PATCH v2] test: replace notmuch_passwd_sanitize() with _libconfig_sanitize()

2021-05-17 Thread Felipe Contreras
to check for that, even better if we generate the proper output: if name: l = l.replace(name, "USER_FULL_NAME") else: l = "a: \'USER_FULL_NAME\'\\n" This makes the test pass with no geckos name, but we need to use bash strings: $'string'. Otherwise we would need to do something much more weird. Cheers. -- Felipe Contreras ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org

[PATCH 1/2] ruby: create an actual wrapper struct

2021-05-17 Thread Felipe Contreras
pointer (e.g. notmuch_database_t). This struct is tied to the Ruby object, and is freed when the Ruby object is freed by the garbage collector. We do nothing with this wrapper, so no functionality should be changed. Signed-off-by: Felipe Contreras --- bindings/ruby/database.c | 2 +- bindings

[PATCH 2/2] ruby: enable garbage collection using talloc

2021-05-17 Thread Felipe Contreras
. Signed-off-by: Felipe Contreras --- bindings/ruby/database.c | 2 +- bindings/ruby/defs.h | 11 +++ bindings/ruby/extconf.rb | 1 + 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/bindings/ruby/database.c b/bindings/ruby/database.c index 66100de2..3737be17 100644

[PATCH 0/2] ruby: enable garbage collection

2021-05-17 Thread Felipe Contreras
conclussion. On the other hand the talloc_steal approach works perfectly fine. Felipe Contreras (2): ruby: create an actual wrapper struct ruby: enable garbage collection using talloc bindings/ruby/database.c | 2 +- bindings/ruby/defs.h | 42 +++- bindings

Re: [PATCH] ruby: improve compilation with CFLAGS

2021-05-16 Thread Felipe Contreras
On Mon, May 17, 2021 at 12:48 AM Felipe Contreras wrote: > > The ruby MakeMakefile generates a makefile that is suboptimal, which has > CFLAGS like this: > > CFLAGS = $(CCDLFLAGS) -march=x86-64 -mtune=generic \ > -O2 -pipe -fno-plt -fPIC $(ARCH_FLAG) > > This w

[PATCH] ruby: improve compilation with CFLAGS

2021-05-16 Thread Felipe Contreras
the necessary flags in the parent Makefile so everyone is happy. Signed-off-by: Felipe Contreras --- bindings/Makefile.local | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bindings/Makefile.local b/bindings/Makefile.local index bc960bbc..3672e69f 100644 --- a/bindings

[PATCH v2 6/6] test: split emacs functionality to its own file

2021-05-15 Thread Felipe Contreras
This way it's easier to identify the tests that do require emacs stuff. Signed-off-by: Felipe Contreras --- test/T160-json.sh | 1 + test/T170-sexp.sh | 1 + test/T310-emacs.sh | 1 + test/T320-emacs-large-search-buffer.sh

[PATCH v2 5/6] test: emacs: fix a couple of shellcheck complaints

2021-05-15 Thread Felipe Contreras
sh line 21: test_require_external_prereq ${TEST_EMACSCLIENT} || ret=1 ^-^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: test_require_external_prereq "${TEST_EMACSCLIENT}" || ret=1 Signed-off-by: Felipe

[PATCH v2 4/6] test: emacs: check for configured emacs

2021-05-15 Thread Felipe Contreras
Commit d59d9c81 (test: Make the emacsclient binary user-configurable, 2012-11-27) modified the prereq check for the configured emacsclient, but we probably want to do the same for emacs itself. Signed-off-by: Felipe Contreras --- test/test-lib.sh | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v2 3/6] test: emacs: simplify missing dependencies check

2021-05-15 Thread Felipe Contreras
No functional changes. Signed-off-by: Felipe Contreras --- test/test-lib.sh | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index c1395c87..e1a597f7 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -115,9 +115,11

[PATCH v2 1/6] test: trivial style cleanups

2021-05-15 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- test/T000-basic.sh | 2 +- test/T070-insert.sh | 2 +- test/T590-thread-breakage.sh | 10 +- test/export-dirs.sh | 2 +- test/test-lib.sh | 6 +++--- 5 files changed, 11 insertions(+), 11 deletions(-) diff

[PATCH v2 0/6] test: several cleanups

2021-05-15 Thread Felipe Contreras
. Felipe Contreras (6): test: trivial style cleanups test: more style fixes test: emacs: simplify missing dependencies check test: emacs: check for configured emacs test: emacs: fix a couple of shellcheck complaints test: split emacs functionality to its own file test/T000-basic.sh

[PATCH v2 2/6] test: more style fixes

2021-05-15 Thread Felipe Contreras
In order to fit the git coding style. Signed-off-by: Felipe Contreras --- test/T140-excludes.sh | 3 +- test/T190-multipart.sh | 3 +- test/T490-parse-time-string.sh | 6 +-- test/export-dirs.sh| 3 +- test/test-lib-common.sh| 6 +-- test/test-lib.sh

Re: [PATCH v2 10/10] ruby: new notmuch_rb_object_destroy() helper

2021-05-12 Thread Felipe Contreras
On Wed, May 12, 2021 at 5:10 PM David Bremner wrote: > > Felipe Contreras writes: > > > +static inline notmuch_status_t > > +notmuch_rb_object_destroy (VALUE rb_object, const rb_data_type_t *type) > > +{ > > +void *nm_obje

  1   2   3   4   5   6   7   >