Comments (8)
@kiwanami are you still there? 😄
from emacs-edbi.
@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.
@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.
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.
Great, would love to hear from you!
from emacs-edbi.
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.
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.
Any update on this?
from emacs-edbi.
Related Issues (20)
- Unable to save query editor file content to file. HOT 9
- can you remove auto-complete dependency? HOT 8
- Is it possible to store the connection details? HOT 1
- Change the window-title edbi:query-result without number HOT 1
- Multiple queries possible? HOT 2
- Can't install from melpa-stable HOT 3
- No rows shown in result for SQL Server query with ntext column
- I can't connect mysql database HOT 1
- Query returns nil when value is 0
- A way to connect to other not SQL dbs?
- add two tips HOT 1
- Cannot open a sqlite database that has been created using WAL mode HOT 2
- make emacs-edbi aware of local::lib installations of RPC::EPC::Service and DBI modules HOT 2
- Selected row colors in Emacs dark modes?
- Quoting tables
- Does your library have functions for reading columns directly from the sql results into elisp? HOT 1
- Add connection bookmarks/names
- Export the query results
- Query execute does not return?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emacs-edbi.