Skip to content
TheChatArchiveThe Chat Archive
Geminigemini-2.5-flash· GoogleHugging Face LMArena Human Preference 140K

I want to create a logseq query that queries task that is scheduled tomorrow

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with Claudeclaude-opus-4-20250514’s answer.
  1. User

    I want to create a logseq query that queries task that is scheduled tomorrow

  2. Gemini Assistant

    Here's a Logseq query that will show you all tasks scheduled for tomorrow.

    Logseq's query language is powerful and allows for relative dates, which is perfect for this.

    #+BEGIN_QUERY
    {:title "🗓️ Tasks Scheduled for Tomorrow"
     :query [:find (pull ?block [*])
             :where
             [?block :block/marker ?marker]
             [(contains? #{"TODO" "DOING" "NOW" "LATER" "WAITING"} ?marker)] ; Only active tasks
             [:< ?block :block/scheduled :tomorrow] ; This is the core part!
            ]
     :result-transform (fn [result]
                         (sort-by (fn [h] (get-in h [:block/scheduled])) result))
     :group-by-page? false
     :breadcrumb-show? true
     :collapsed? false
    }
    #+END_QUERY
    

    Explanation of the Query:

    1. #+BEGIN_QUERY / #+END_QUERY: These lines are Logseq's way of indicating a query block.

    2. :title "🗓️ Tasks Scheduled for Tomorrow": This sets the title that will appear above your query results. You can customize this.

    3. :query [:find (pull ?block [*]) :where ...]: This is the main query logic.

      • :find (pull ?block [*]): This tells Logseq to find blocks (?block) and pull all their properties ([*]).
      • :where: This defines the conditions for the blocks to be included in the results.
        • [?block :block/marker ?marker]: Ensures the block is a task (i.e., has a marker like TODO, DONE, etc.).
        • [(contains? #{"TODO" "DOING" "NOW" "LATER" "WAITING"} ?marker)]: This filters the results to only show "active" tasks. If you want to include DONE tasks, you can add it to this set. If you want all tasks regardless of status, remove this line entirely.
        • [:< ?block :block/scheduled :tomorrow]: This is the crucial part.
          • :block/scheduled: Targets the SCHEDULED: property of a block.
          • :tomorrow: This is a Logseq keyword that dynamically resolves to tomorrow's date. The < is often used with :scheduled and a date keyword to mean "scheduled on that specific date".
    4. :result-transform (fn [result] (sort-by (fn [h] (get-in h [:block/scheduled])) result)): This is an optional but highly recommended part. It sorts the results by their scheduled date, which makes them easier to read.

    5. :group-by-page? false: By default, Logseq groups query results by the page they belong to. Setting this to false lists them directly, which is often preferred for task lists.

    6. :breadcrumb-show? true: Shows the page path for each task, which helps you know where the task originated.

    7. :collapsed? false: Keeps the query results expanded by default. Change to true if you want them collapsed.

    How to use it:

    1. Go to any page in your Logseq graph (e.g., your daily journal page, an inbox page, or a dedicated dashboard page).
    2. Type /Query and select "Query" from the pop-up menu, or simply type #+BEGIN_QUERY and press enter.
    3. Paste the entire query block above into your Logseq page.
    4. Click out of the block, and the query results will appear.

    Example Task (that would be included):

    Let's say today is October 26, 2023.

    - TODO Call client about project update
      SCHEDULED: <2023-10-27 Fri>
    

    This task would appear in the query results.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.