Giter Site home page Giter Site logo

Comments (8)

ReneFroger avatar ReneFroger commented on July 28, 2024

@kiwanami are you still there? 😄

from emacs-edbi.

kiwanami avatar kiwanami commented on July 28, 2024

@ReneFroger I'm sorry for my slow response. Recently, I have little time to spend github...

Well, will you try this command?

(defun my-edbi-evaluate ()
  (interactive)
  (lexical-let ((buf (current-buffer)))
    (edbi:seq
     (edbi:dbview-query-editor-execute-command)
     (lambda ()
       (select-window (get-buffer-window buf))))))

Almost tasks of edbi are working in async manner. So, we need to wait for async task finishing.
deferred.el and edbi.el provide such async framework.
edbi:seq is convenient macro like do in Haskell.

from emacs-edbi.

ReneFroger avatar ReneFroger commented on July 28, 2024

@kiwanami thanks for your reply, but unfortunately, It didn't worked out as expected. Note that I use 2 frames. One frame for the EDBI query.And another frame for the EDBI results.

When I call my-edbi-evaluate in Edbi query editor, the cursor / pointer jumps to the EDBI results in the another frame and stays there, instead staying in the edbi query editor.

from emacs-edbi.

kiwanami avatar kiwanami commented on July 28, 2024

Oh, I see. You are using emacs frames.
Now, I'm not able to use the PC, I'll check it later.

from emacs-edbi.

ReneFroger avatar ReneFroger commented on July 28, 2024

Great, would love to hear from you!

from emacs-edbi.

kiwanami avatar kiwanami commented on July 28, 2024

Will you try this?

(defun my-edbi-evaluate ()
  (interactive)
  (lexical-let ((fm (selected-frame)))
    (edbi:seq
     (edbi:dbview-query-editor-execute-command)
     (lambda ()
       (select-frame-set-input-focus fm)
       (other-window 1)
       ))))

Because edbi:dbview-query-editor-execute-command uses pop-to-buffer, window pop-up is not avoidable. Customizing such the window control, we need a new customize mechanism.

from emacs-edbi.

ReneFroger avatar ReneFroger commented on July 28, 2024

Thanks for the explaination, it's appreciated. It's clear now!

Your new functions works only when there are no other windows defined. It will be a problem when there are more windows.

For example, I have a window 1 with buffer filled with the code. And window 2, with the query editor. Both in frame 1. And frame 2, with the EDBI results in the window.

When I call my-edbi-evaluate from window 2, with the EDBI query editor, the pointer/cursor ends in the window 1 with the code, instead in the window 2.

from emacs-edbi.

ReneFroger avatar ReneFroger commented on July 28, 2024

Any update on this?

from emacs-edbi.

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.