Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 02-24-2017, 06:08 AM   #1
reinsley
Connoisseur
reinsley began at the beginning.
 
reinsley's Avatar
 
Posts: 65
Karma: 10
Join Date: Dec 2016
Location: France
Device: Kindle PaperWhite
How to send cursor to the home position by code ?

My default sort search is by "date upward".
The focus could be on any line, I'd like to highlight the #1 line by code.

TIA
reinsley is offline   Reply With Quote
Old 02-24-2017, 07:00 AM   #2
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,610
Karma: 29710338
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@reinsley - 'Code' in what - a plugin, a template?

Ctrl+Home key does it manually, like it does in just about every application - Mac might be something different Ψ²

BR
BetterRed is offline   Reply With Quote
Advert
Old 02-24-2017, 07:58 AM   #3
reinsley
Connoisseur
reinsley began at the beginning.
 
reinsley's Avatar
 
Posts: 65
Karma: 10
Join Date: Dec 2016
Location: France
Device: Kindle PaperWhite
Thanks.

A line of code in the search line. In a template I suppose.

I have many searches that are recorded :

One is based on date ( to see all books, search date of entry in calibre - descending order, last book added is top of list).

One is based on read_date ( a customer column, to see already read books).

When I jump from one search to another one, the enlighted line can be anywhere. I use your solution to enlight the first line and jump to the top of list, if needed.

The idea is to avoid to hit Ctrl+Home. Or add a mysearch AND something.

search:"date:<=today"
search:"date:>2011-02-01"
search:"date:>2011-02-01" AND "CURSOR=HOME"

The first two examples are correct but cursor may be anywhere.
The last is wrong, but it's the idea.

Best regards
reinsley is offline   Reply With Quote
Old 02-24-2017, 08:46 AM   #4
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,610
Karma: 29710338
Join Date: Mar 2012
Location: Sydney Australia
Device: none
I not aware of any book list related template functions. You might be able to do such a thing in a user defined function. But that might be a mighty big might

For the sort of thing you're doing I prefer the View Manager plugin, I usually want a different column layout as well as a different order, VM does that too.

Anyway - Ctrl+Home isn't much effort. But if you're mouse-bound, a GUI plugin that does the Ctrl+Home via an clickable icon in the toolbar may appeal - not to me though:

Click image for larger version

Name:	1.JPG
Views:	314
Size:	24.5 KB
ID:	155267

BR
BetterRed is offline   Reply With Quote
Old 02-25-2017, 02:08 PM   #5
reinsley
Connoisseur
reinsley began at the beginning.
 
reinsley's Avatar
 
Posts: 65
Karma: 10
Join Date: Dec 2016
Location: France
Device: Kindle PaperWhite
I appreciate your tips.

Ctrl+home is ok, I was looking for a smart and elegant one liner search.

VM is tempting me, I will intall it.

Best regards
reinsley is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Get cursor position or highlighted text inside plugin otherpasserby Plugins 10 12-16-2018 05:40 AM
Ended Boox C67ML free to good home (in EU, send worldwide) June Flea Market 7 02-23-2016 04:26 PM
Reopening CC loses position, and reader app doesn't reopen at current position iatheia Calibre Companion 9 11-13-2015 08:20 PM
Cursor after Merge mentorian Library Management 3 08-23-2011 02:22 PM
Dead cursor lordd Amazon Kindle 0 01-02-2008 09:54 PM


All times are GMT -4. The time now is 08:01 PM.


MobileRead.com is a privately owned, operated and funded community.