Giter Club home page Giter Club logo

Comments (6)

jschlatow avatar jschlatow commented on June 18, 2024 1

By setting the modes to "any" you exclude the markdown action because the default mode is "normal". You can just omit markdown.modes to take the defaults.

In normal mode, the first matching action is displayed. Since the file action also matches and occurs first in the config file, it shadows the markdown action. You can change the order in the config file so that the markdown actions takes precedence.

from taskopen.

jschlatow avatar jschlatow commented on June 18, 2024

@leandrochiarini, can you please post the output of taskopen diagnostics?

from taskopen.

leandrochiarini avatar leandrochiarini commented on June 18, 2024

Of course, sorry

Environment
  Platform:       Linux
  Taskopen:       fatal: No names found, cannot describe anything.
  Taskwarrior:    2.6.1 (c564bbc0b)
  Configuration:  /home/lchiarini/.taskopenrc
Current configuration
  Binaries and paths:
    taskbin            = task
    taskargs           =
    editor             = /usr/bin/nvim
    path_ext           = /usr/share/taskopen/scripts
  General:
    debug              = false
    no_annotation_hook = addnote $ID
    task_attributes    = priority,project,tags,description
  Action groups:
  Subcommands:
    default            = normal
  Actions:
    files
      .target          = annotations
      .regex           = ^[\.\/~]+.*\.(.*)
      .labelregex      = .*
      .command         = xdg-open $FILE
      .modes           = batch,any,normal
    notes
      .target          = annotations
      .regex           = (N|n)otes?
      .labelregex      = .*
      .command         = $EDITOR $HOME/tasknotes/$UUID.txt
      .modes           = batch,any,normal

from taskopen.

jschlatow avatar jschlatow commented on June 18, 2024

I don't see a 'markdown' action in your diagnostics. Can you double check that you put into the correct config file? According to your diagnostics, this would be ~/.taskopenrc.

from taskopen.

leandrochiarini avatar leandrochiarini commented on June 18, 2024

I had previously installed via the arch linux repository (which fixed the fatal error on the version of taskopen), installing again according the instructions in the repository (and fixing the link to the .taskopenrc as you mentioned), which now gives

Environment
  Platform:       Linux
  Taskopen:       v2.0.0beta
  Taskwarrior:    2.6.1 (c564bbc0b)
  Configuration:  /home/lchiarini/.taskopenrc
Current configuration
  Binaries and paths:
    taskbin            = task
    taskargs           =
    editor             = /usr/bin/nvim
    path_ext           = /usr/share/taskopen/scripts
  General:
    debug              = false
    no_annotation_hook = addnote $ID
    task_attributes    = priority,project,tags,description
  Action groups:
  Subcommands:
    default            = normal
  Actions:
    files
      .target          = annotations
      .regex           = ^[\.\/~]+.*\.(.*)
      .labelregex      = .*
      .command         = xdg-open $FILE
      .modes           = batch,any,normal
    notes
      .target          = annotations
      .regex           = (N|n)otes?
      .labelregex      = .*
      .command         = $EDITOR $HOME/tasknotes/$UUID.txt
      .modes           = batch,any,normal
    markdown
      .target          = annotations
      .regex           = .*md
      .labelregex      = .*
      .command         = nvim $FILE
      .modes           = any

I did also just notice I get the error
Invalid config option in [Actions]: , any: Invalid config option in [Actions]: , batch:
so I changed markdown.modes to just any. Using taskopen 36 --debug again, I get:

Executing: task rc.verbose=blank,label,edit rc.json.array=on  context show
Executing: task rc.verbose=blank,label,edit rc.json.array=on   36 +PENDING export
Please select one or multiple actions:
 1) files: /home/lchiarini/Desktop/2022-06-20-Note-17-50.xopp
    ("Example") -- 36
    command: xdg-open $FILE
 2) files: /home/lchiarini/Desktop/test.md
    ("Example") -- 36
    command: xdg-open $FILE
 3) notes: note
    ("Example") -- 36
    command: $EDITOR $HOME/tasknotes/$UUID.txt

Thanks again for the quick reply.

from taskopen.

leandrochiarini avatar leandrochiarini commented on June 18, 2024

Perfect! It works like a charm, thank you again for the help!

from taskopen.

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.