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
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
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
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
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
= 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
, 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
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
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
/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
, 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
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
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
=> #
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
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
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
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
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
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, ,
> > +
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
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
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?
> >
&
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.
> >>
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
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
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
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
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
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
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
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
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
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
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 |
=> #
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
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
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
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
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
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
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.
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
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
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
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
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
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<
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
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
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
.
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
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
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
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
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
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
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
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
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
.
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
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
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
Struct, and the
information is stored in a struct rb_data_type_t, rather than passed
as arguments.
Check_Type is replaced with Check_TypedStruct, which is a wrapper for
rb_check_typeddata (with casts).
--
Felipe Contreras
___
notmuch mailing list -- notmuch@notmuchma
On Wed, May 12, 2021 at 4:59 PM David Bremner wrote:
>
> Felipe Contreras writes:
>
> > The type is not actually needed.
> >
> > Signed-off-by: Felipe Contreras
> > ---
> > bindings/ruby/defs.h | 22 +++---
> > 1 file changed, 1
hed flag in
IMAP.
I'm not actually deleting anything, I just don't want to see those
messages in my notmuch client (thanks to excluded_tags).
--
Felipe Contreras
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org
On Sun, May 9, 2021 at 4:38 AM David Bremner wrote:
> Felipe Contreras writes:
> > I understand deleting files is complex, but what's wrong with simply
> > tagging the T (trashed) messages as 'deleted'?
> >
> > I'm using synchronize_flags=true.
>
> Th
then
> let me know and I can provide you with a copy of the current source.
Would you consider moving to a different web framework? If so, I could
take a bite creating such a site, except probably with a Ruby
framework.
Cheers.
--
Felipe Contreras
___
On Fri, Apr 30, 2021 at 5:14 PM Felipe Contreras
wrote:
> I understand why Ali Polatel did commit c7893408 (ruby: Kill garbage
> collection related cruft., 2010-05-26); because the order of the object
> destruction cannot be ensured in Ruby, however, there's ways to
> workaround that
On Tue, May 4, 2021 at 3:17 AM Felipe Contreras
wrote:
>
> This superseeds my previous series [1] with much more cleanups.
>
> An important new change is the move towards RTypedData, which is way superior
> to the old RData
> objects.
>
> Everything should work basically
Using the rb_data_type_t data we can call the correct notmuch destroy
function.
Signed-off-by: Felipe Contreras
---
bindings/ruby/database.c | 6 +-
bindings/ruby/defs.h | 14 ++
bindings/ruby/directory.c | 7 +--
bindings/ruby/filenames.c | 7 +--
bindings/ruby
Signed-off-by: Felipe Contreras
---
bindings/ruby/database.c | 16
bindings/ruby/defs.h | 37 +++--
bindings/ruby/directory.c | 4 ++--
bindings/ruby/init.c | 16
bindings/ruby/message.c | 6 +++---
bindings/ruby
Signed-off-by: Felipe Contreras
---
bindings/ruby/database.c | 2 +-
bindings/ruby/defs.h | 6 --
bindings/ruby/init.c | 4
3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/bindings/ruby/database.c b/bindings/ruby/database.c
index b9ad3373..bb4273e6 100644
This makes the code more maintainable and will help in further patches.
No functional changes.
Signed-off-by: Felipe Contreras
---
bindings/ruby/database.c | 14 +++---
bindings/ruby/defs.h | 3 +++
bindings/ruby/directory.c | 4 ++--
bindings/ruby/message.c | 6
The error path is very unlikely.
Signed-off-by: Felipe Contreras
---
bindings/ruby/defs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bindings/ruby/defs.h b/bindings/ruby/defs.h
index ae3ea101..12538a3a 100644
--- a/bindings/ruby/defs.h
+++ b/bindings/ruby/defs.h
There is not much point in complicating the code for error messages that
can be easily constructed.
Before:
database closed (RuntimeError)
After:
Notmuch::Database object destroyed (RuntimeError)
Signed-off-by: Felipe Contreras
---
bindings/ruby/defs.h | 30
The type is not actually needed.
Signed-off-by: Felipe Contreras
---
bindings/ruby/defs.h | 22 +++---
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/bindings/ruby/defs.h b/bindings/ruby/defs.h
index 46e2caf8..8fb47b4c 100644
--- a/bindings/ruby/defs.h
+++ b
There's no need to do Check_Type, Data_Get_Struct calls
rb_data_object_get(), which already does that.
Signed-off-by: Felipe Contreras
---
bindings/ruby/defs.h | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/bindings/ruby/defs.h b/bindings/ruby/defs.h
index e95ea239
There's no need to repeat the same code over and over.
Signed-off-by: Felipe Contreras
---
bindings/ruby/defs.h | 81
1 file changed, 22 insertions(+), 59 deletions(-)
diff --git a/bindings/ruby/defs.h b/bindings/ruby/defs.h
index 48544ca2..e95ea239
Apparently commit 5c9e3855 (ruby: Don't barf if an object is destroyed
more than once, 2010-05-26) missed these two.
Signed-off-by: Felipe Contreras
---
bindings/ruby/directory.c | 2 +-
bindings/ruby/threads.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/bindings
This superseeds my previous series [1] with much more cleanups.
An important new change is the move towards RTypedData, which is way superior
to the old RData
objects.
Everything should work basically the same though.
[1] id: 20210503075457.649056-1-felipe.contre...@gmail.com
Felipe Contreras
The type is not actually needed.
Signed-off-by: Felipe Contreras
---
bindings/ruby/defs.h | 22 +++---
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/bindings/ruby/defs.h b/bindings/ruby/defs.h
index 46e2caf8..edbcc729 100644
--- a/bindings/ruby/defs.h
+++ b
There's no need to repeat the same code over and over.
Signed-off-by: Felipe Contreras
---
bindings/ruby/defs.h | 81
1 file changed, 22 insertions(+), 59 deletions(-)
diff --git a/bindings/ruby/defs.h b/bindings/ruby/defs.h
index 48544ca2..e95ea239
This are simple cleanups that should not have any functional changes.
Felipe Contreras (3):
ruby: improve all Data_Get_Notmuch_* helpers
ruby: improve general data get helper
ruby: simplify data get helper
bindings/ruby/defs.h | 84
1 file
There's no need to do Check_Type, Data_Get_Struct calls
rb_data_object_get(), which already does that.
Signed-off-by: Felipe Contreras
---
bindings/ruby/defs.h | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/bindings/ruby/defs.h b/bindings/ruby/defs.h
index e95ea239
On Sun, May 2, 2021 at 6:02 AM David Bremner wrote:
>
> Felipe Contreras writes:
>
> > We always do test_expect_equal_file, so do it in test_ruby() directly.
> >
> > The only subtest where we don't (get non-existent file) can be easily
> > modified.
>
>
eld to Mail::Field.new is deprecated and will
> >> be removed in Mail 2.8.0. Use Mail::Field.parse instead.
>
> I believe this problem was fixed in a different way by Felipe's patch
> applied as 8af4cd16
Indeed, but Jules' patch may be a bett
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
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
It exists since 2013, let's allow it to be used in Ruby.
Signed-off-by: Felipe Contreras
---
bindings/ruby/init.c | 24
bindings/ruby/query.c | 8 +---
test/T395-ruby.sh | 17 +
3 files changed, 46 insertions(+), 3 deletions(-)
diff --git
test cleanups [1].
[1] id:20210501115923.483816-1-felipe.contre...@gmail.com
Felipe Contreras (3):
ruby: use notmuch_exclude_t enum
ruby: add keyword arguments to db.query
test: ruby: simplify basic tests
bindings/ruby/database.c | 47 +---
bindings/ruby
Signed-off-by: Felipe Contreras
---
test/T395-ruby.sh | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/test/T395-ruby.sh b/test/T395-ruby.sh
index 30168109..597330d3 100755
--- a/test/T395-ruby.sh
+++ b/test/T395-ruby.sh
@@ -20,22 +20,22 @@ test_ruby
Local variables are perfectly fine.
Signed-off-by: Felipe Contreras
---
test/T395-ruby.sh | 22 +++---
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/test/T395-ruby.sh b/test/T395-ruby.sh
index f5a8d245..30168109 100755
--- a/test/T395-ruby.sh
+++ b/test/T395
Signed-off-by: Felipe Contreras
---
test/T395-ruby.sh | 20
1 file changed, 8 insertions(+), 12 deletions(-)
diff --git a/test/T395-ruby.sh b/test/T395-ruby.sh
index f871ddd9..f5a8d245 100755
--- a/test/T395-ruby.sh
+++ b/test/T395-ruby.sh
@@ -24,7 +24,7 @@ notmuch search
Signed-off-by: Felipe Contreras
---
test/T395-ruby.sh | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/test/T395-ruby.sh b/test/T395-ruby.sh
index 55bf4c2b..f871ddd9 100755
--- a/test/T395-ruby.sh
+++ b/test/T395-ruby.sh
@@ -25,7 +25,7 @@ test_ruby <<&qu
We always do test_expect_equal_file, so do it in test_ruby() directly.
The only subtest where we don't (get non-existent file) can be easily
modified.
Signed-off-by: Felipe Contreras
---
test/T395-ruby.sh | 18 +++---
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git
I found a lot of areas of improvement in the Ruby tests, so I decided to clean
them up.
With these changes the tests are now much simpler and follow more closely the
typical Ruby idioms.
Felipe Contreras (9):
test: move test_ruby() inside the only client
test: ruby: refactor test_ruby
Signed-off-by: Felipe Contreras
---
test/T395-ruby.sh | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/test/T395-ruby.sh b/test/T395-ruby.sh
index 1d27e191..94fab106 100755
--- a/test/T395-ruby.sh
+++ b/test/T395-ruby.sh
@@ -12,10 +12,7 @@ test_ruby() {
(
cat
There's no point in repeating the same initialization in all the tests.
Signed-off-by: Felipe Contreras
---
test/T395-ruby.sh | 48 +++
1 file changed, 11 insertions(+), 37 deletions(-)
diff --git a/test/T395-ruby.sh b/test/T395-ruby.sh
index
There's no need to complicate the script passing the MAIL_DIR
environment variable.
Signed-off-by: Felipe Contreras
---
test/T395-ruby.sh | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/test/T395-ruby.sh b/test/T395-ruby.sh
index 94fab106..67d6e205 100755
--- a/test
Not much point in polluting the main library, and also will be useful to
modify it in tandem with the tests.
Signed-off-by: Felipe Contreras
---
test/T395-ruby.sh | 4
test/test-lib.sh | 4
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/test/T395-ruby.sh b/test/T395
1 - 100 of 583 matches
Mail list logo