mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-21 18:38:08 +01:00
notmuch-mutt: replace extra command with notmuch thread search feature
This should be be slightly faster since it avoids forking a shell and is less code in and less dependencies for the script. Since String::ShellQuote isn't used elsewhere, drop mention of it.
This commit is contained in:
parent
6d383d4049
commit
93d936c5ae
3 changed files with 2 additions and 10 deletions
|
@ -39,8 +39,6 @@ To *run* notmuch-mutt you will need Perl with the following libraries:
|
||||||
(Debian package: libmail-box-perl)
|
(Debian package: libmail-box-perl)
|
||||||
- Mail::Header <https://metacpan.org/pod/Mail::Header>
|
- Mail::Header <https://metacpan.org/pod/Mail::Header>
|
||||||
(Debian package: libmailtools-perl)
|
(Debian package: libmailtools-perl)
|
||||||
- String::ShellQuote <https://metacpan.org/pod/String::ShellQuote>
|
|
||||||
(Debian package: libstring-shellquote-perl)
|
|
||||||
- Term::ReadLine::Gnu <https://metacpan.org/pod/Term::ReadLine::Gnu>
|
- Term::ReadLine::Gnu <https://metacpan.org/pod/Term::ReadLine::Gnu>
|
||||||
(Debian package: libterm-readline-gnu-perl)
|
(Debian package: libterm-readline-gnu-perl)
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,6 @@ use Getopt::Long qw(:config no_getopt_compat);
|
||||||
use Mail::Header;
|
use Mail::Header;
|
||||||
use Mail::Box::Maildir;
|
use Mail::Box::Maildir;
|
||||||
use Pod::Usage;
|
use Pod::Usage;
|
||||||
use String::ShellQuote;
|
|
||||||
use Term::ReadLine;
|
use Term::ReadLine;
|
||||||
use Digest::SHA;
|
use Digest::SHA;
|
||||||
|
|
||||||
|
@ -126,13 +125,9 @@ sub thread_action($$@) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$mid =~ s/ //g; # notmuch strips spaces before storing Message-Id
|
$mid =~ s/ //g; # notmuch strips spaces before storing Message-Id
|
||||||
$mid =~ s/"/""/g; # escape all double quote characters
|
$mid =~ s/"/""""/g; # escape all double quote characters twice
|
||||||
|
|
||||||
my $search_cmd = 'notmuch search --output=threads ' . shell_quote(qq{id:"$mid"});
|
search($results_dir, $remove_dups, qq{thread:"{id:""$mid""}"});
|
||||||
my $tid = `$search_cmd`; # get thread id
|
|
||||||
chomp($tid);
|
|
||||||
|
|
||||||
search($results_dir, $remove_dups, $tid);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub tag_action(@) {
|
sub tag_action(@) {
|
||||||
|
|
1
debian/control
vendored
1
debian/control
vendored
|
@ -227,7 +227,6 @@ Architecture: all
|
||||||
Depends:
|
Depends:
|
||||||
libmail-box-perl,
|
libmail-box-perl,
|
||||||
libmailtools-perl,
|
libmailtools-perl,
|
||||||
libstring-shellquote-perl,
|
|
||||||
libterm-readline-gnu-perl,
|
libterm-readline-gnu-perl,
|
||||||
notmuch (>= 0.4),
|
notmuch (>= 0.4),
|
||||||
${misc:Depends},
|
${misc:Depends},
|
||||||
|
|
Loading…
Reference in a new issue