Giter VIP home page Giter VIP logo

Comments (22)

gauteh avatar gauteh commented on September 28, 2024

from astroid.

hugoroy avatar hugoroy commented on September 28, 2024

Well, I wouldn't need anything fancy and so using shell for notmuch commands would make me very happy :-) / for instance:

thread_index.hook(notmuch tag -inbox -unread +archive)=a

from astroid.

gauteh avatar gauteh commented on September 28, 2024

Hugo Roy writes on January 3, 2016 21:36:

Well, I wouldn't need anything fancy and so using shell for notmuch commands would make me very happy :-) / for instance:

thread_index.hook(notmuch tag -inbox -unread +archive)=a

Yeah, this seems like a good idea, but perhaps use something like:

main_window.run
thread_index.run
thread_index.multi.run

with pre-defined arguments.

from astroid.

hugoroy avatar hugoroy commented on September 28, 2024

I don't know. That looks like another configuration file needed to pre-define the arguments. I think it's alright if it's not pre-defined. But I don't have strong arguments any way.

from astroid.

gauteh avatar gauteh commented on September 28, 2024

What I mean is that you can configure e.g.:

thread_index.run(notmuch tag -inbox -unread +archive)=a

which will run the command with one argument which is the thread id of
the currently selected thread:

notmuch tag -inbox -unread +archive thread:00000xxx

but you could also use your own script:

thread_index.run(~/.config/astroid/scripts/toggle_archive)=a

where you use notmuch commands to check if it already is archived and
then do what you want.

so the command:
thread_index.run will be run with 'thread:0000xxx' as the first and only
argument.

thread_index.multi.run will run the command with one argument for each
thread so that the script that gets it can act on all of them.

In this way you can:

  • create a script to toggle archive
  • output the file (using notmuch commands) or do something with it, as in #36 (probably fixing that issue?)

you do not need another configuration file.

from astroid.

hugoroy avatar hugoroy commented on September 28, 2024

↪ janvier 4, 2016 10:18 , Gaute Hope:

What I mean is that you can configure e.g.:

thread_index.run(notmuch tag -inbox -unread +archive)=a

which will run the command with one argument which is the thread id of
the currently selected thread:

notmuch tag -inbox -unread +archive thread:00000xxx

but you could also use your own script:

thread_index.run(~/.config/astroid/scripts/toggle_archive)=a

where you use notmuch commands to check if it already is archived and
then do what you want.

Okay, now I understand. Yes this is pretty much perfect I think :)

In this way you can:

  • create a script to toggle archive
  • output the file (using notmuch commands) or do something with it, as in #36 (probably fixing that issue?)

Yes, that looks like a very, very good start to enable this indeed.

from astroid.

gauteh avatar gauteh commented on September 28, 2024

Once the parser for this is up I think the following commands
should also be supported:

(mode here is either 'main_window' (which works for all),
'thread_index', etc).

mode.search('query:asdfasdf')=keyspec
thread_index.toggle_tag('tag_a,tag_b')=keyspec
thread_view.toggle_tag('tag_a,tag_b')=keyspec

from astroid.

gauteh avatar gauteh commented on September 28, 2024

Fixed in #76.

from astroid.

hugoroy avatar hugoroy commented on September 28, 2024

@gauteh any idea how to use something like

thread_index.run(/home/hugo/.config/astroid/hooks/toggle waiting %1)=w

on an email in thread_view rather than on an whole thread?

from astroid.

gauteh avatar gauteh commented on September 28, 2024

from astroid.

hugoroy avatar hugoroy commented on September 28, 2024

from astroid.

gauteh avatar gauteh commented on September 28, 2024

from astroid.

mxmehl avatar mxmehl commented on September 28, 2024

I've added an example in the wiki for thread_view.run using %2 as message ID

from astroid.

hugoroy avatar hugoroy commented on September 28, 2024

from astroid.

gauteh avatar gauteh commented on September 28, 2024

from astroid.

hugoroy avatar hugoroy commented on September 28, 2024

from astroid.

mxmehl avatar mxmehl commented on September 28, 2024

@hugoroy is this something where my wiki additions have been unclear, or just a random mistake?

from astroid.

hugoroy avatar hugoroy commented on September 28, 2024

from astroid.

mxmehl avatar mxmehl commented on September 28, 2024

from astroid.

hugoroy avatar hugoroy commented on September 28, 2024

from astroid.

mxmehl avatar mxmehl commented on September 28, 2024

Done. But there's room for optimization I guess :)

Thanks! One question: shouldn't the second example have thread_view.run as keybinding?

from astroid.

hugoroy avatar hugoroy commented on September 28, 2024

from astroid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.