Bug 92010 - Easier autocomplete access to more frequently used functions
Summary: Easier autocomplete access to more frequently used functions
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.3 all versions
Hardware: All All
: medium minor
Assignee: Justin L
URL:
Whiteboard: target:7.4.0 target:7.3.0.0.beta2
Keywords: bibisected
Depends on:
Blocks: AutoCorrect-Complete
  Show dependency treegraph
 
Reported: 2015-06-11 14:24 UTC by Yousuf Philips (jay) (retired)
Modified: 2021-12-15 17:44 UTC (History)
11 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2015-06-11 14:24:45 UTC
Not sure if this should be considered an enhancement or a bug, but after 4.2 if you type '=s' in Calc, it doesnt autoselect '=sum()', which i'm assuming is the most commonly used command beginning with 's'.
Comment 1 Heiko Tietze 2015-06-11 19:49:02 UTC
Would be quite annoying for users who want to get another function like =sd(). Usually autocomplete starts after the third character, or when the result is clear.
Comment 2 Yousuf Philips (jay) (retired) 2015-06-13 23:32:19 UTC
(In reply to Heiko Tietze from comment #1)
> Would be quite annoying for users who want to get another function like
> =sd().

No it wouldnt effect users who wanted to get to =sd(), as they would simply type =sd and it would likely autocomplete to =sd().
Comment 3 Cor Nouws 2015-06-15 15:13:46 UTC
Interesting. I never realized that the SUM was put as first in the row here :) rather then showing them in alphabetical order.
Since it worked OK in previous versions, and I see no reason for removing it, I would call it a bug.
Looking in 4.2.0, if proposes SUM.IF() .. 
From 4.3 indeed a totally different function.

thanks for filing Jay ;)
Comment 4 Robinson Tryon (qubit) 2015-12-14 05:32:43 UTC Comment hidden (obsolete)
Comment 5 Joel Madero 2016-01-09 21:57:17 UTC
In 5.2 it shows "Search()" after typing =s

Bibisect below:
 a7db49de2eb22e2626da22cea2e5f0016bb13192 is the first bad commit
commit a7db49de2eb22e2626da22cea2e5f0016bb13192
Author: Bjoern Michaelsen <bjoern.michaelsen@canonical.com>
Date:   Tue May 20 15:14:52 2014 +0000

    source-hash-21162eab55e3ae6e21c5cef6f7fd1f35d71aac3e
    
    commit 21162eab55e3ae6e21c5cef6f7fd1f35d71aac3e
    Author:     weigao <weigao@multicorewareinc.com>
    AuthorDate: Mon May 12 22:41:03 2014 +0200
    Commit:     Markus Mohrhard <markus.mohrhard@googlemail.com>
    CommitDate: Mon May 12 22:43:04 2014 +0200
    
        some fixes for positioning problems
    
        Change-Id: I4e970837ebe6867458e4a75c7cc323f8f6b3ecc8

:100644 100644 308d098780f879b74ddd7d602b3779f755a92667 506b1ee5ede4b36550cd126a6acbe5aa63aeef6c M	ccache.log
:100644 100644 0097e7e8cb2cefdafcc84dd6e74bd82538d6631b 4f6ce8c24edf2bfda04e59fdef851acce9457058 M	commitmsg
:100644 100644 4d57885ff65362e87a117e0c58058b3579935c57 d86116ba6ae08d8dfb1dd7975fb444e78242f07c M	make.log
:040000 040000 d138d86e11955b36705070088175fe0ffc675a89 7288225efb8ddf8078851222d49b287e732e8a18 M	opt


# bad: [423a84c4f7068853974887d98442bc2a2d0cc91b] source-hash-c15927f20d4727c3b8de68497b6949e72f9e6e9e
# good: [65fd30f5cb4cdd37995a33420ed8273c0a29bf00] source-hash-d6cde02dbce8c28c6af836e2dc1120f8a6ef9932
git bisect start 'latest' 'oldest'
# good: [e02439a3d6297a1f5334fa558ddec5ef4212c574] source-hash-6b8393474974d2af7a2cb3c47b3d5c081b550bdb
git bisect good e02439a3d6297a1f5334fa558ddec5ef4212c574
# good: [4850941efe43ae800be5c76e1102ab80ac2c085d] source-hash-980a6e552502f02f12c15bfb1c9f8e6269499f4b
git bisect good 4850941efe43ae800be5c76e1102ab80ac2c085d
# good: [a900e72b6357882284c5955bdf939bf14269f5fb] source-hash-dd1050b182260a26a1d0ba6d0ef3a6fecc3f4e07
git bisect good a900e72b6357882284c5955bdf939bf14269f5fb
# skip: [e80660c5a1d812cd04586dae1f22767fc3778c4a] source-hash-07c60c8ee2d1465544a6a39e57bc06b3690b8dfb
git bisect skip e80660c5a1d812cd04586dae1f22767fc3778c4a
# good: [df9bcaed2faa2a8d11b19f877cdff3a12a887278] source-hash-6ba9692d8bbe3e3c245aca9a7c928e81178d05f1
git bisect good df9bcaed2faa2a8d11b19f877cdff3a12a887278
# good: [741197a13a361480f59eeb3bd1401f984f49f1c0] source-hash-9a61470eb1fa161cba70f2e9c4ea8817dc7f617e
git bisect good 741197a13a361480f59eeb3bd1401f984f49f1c0
# good: [882db5e268e28962bdf805c820a5e031b0df9936] source-hash-383dccc094f8c8c07b4298ce0b7406d18cd61cee
git bisect good 882db5e268e28962bdf805c820a5e031b0df9936
# bad: [69e91b0c890097cfb1781733f260644bb1ec9ee8] source-hash-66fce1f61e7e088bd92e19ecb0dd94553de6f824
git bisect bad 69e91b0c890097cfb1781733f260644bb1ec9ee8
# bad: [a75e194c7cd73082efab3023747075606dd47593] source-hash-da33122c84c18ea78932c6ee607824c0f3d4de99
git bisect bad a75e194c7cd73082efab3023747075606dd47593
# bad: [6aa6add1039517969f143c18900d352fa2190c4c] source-hash-f492e45dd2fd1f0ef59f37cd0c3f125203831e98
git bisect bad 6aa6add1039517969f143c18900d352fa2190c4c
# bad: [a7db49de2eb22e2626da22cea2e5f0016bb13192] source-hash-21162eab55e3ae6e21c5cef6f7fd1f35d71aac3e
git bisect bad a7db49de2eb22e2626da22cea2e5f0016bb13192
# first bad commit: [a7db49de2eb22e2626da22cea2e5f0016bb13192] source-hash-21162eab55e3ae6e21c5cef6f7fd1f35d71aac3e
Comment 6 Yousuf Philips (jay) (retired) 2016-01-19 07:45:45 UTC
CCing Eike and Bjoern for their input.
Comment 7 Eike Rathke 2016-01-21 14:23:56 UTC
Meanwhile the function name suggestions were changed quite a bit in master and the first 3 matching function names are displayed, as of http://cgit.freedesktop.org/libreoffice/core/commit/?id=b2a82d9bb256516ac589350579b90f43b68bd452 by Keigo Kawamura.

@Keigo:
Maybe you could enhance the system by looking for a match in the recently used function list first?
Comment 9 QA Administrators 2018-09-14 02:46:42 UTC Comment hidden (obsolete)
Comment 10 Xisco Faulí 2020-03-09 13:28:02 UTC
Please add keyword 'needsUXEval' and CC 'libreoffice-ux-advise@lists.freedesktop.org' if input from UX is needed.
Comment 11 Justin L 2021-12-03 07:05:12 UTC
Yikes. I was going to remove "regression" since master changed so much, but then I saw this commit (which removed references to MRU).

author	Winfried Donkers on 2014-05-12 16:44:20 +0000
commit 5b0b7553241bb5150b12bbf7625b4b0b36970272
    tdf#75264 fix incorrect/missing function tips in Calc
Comment 12 Justin L 2021-12-03 14:21:59 UTC
It was working in 4.2, so first bad is in 4.3. My own bibisect (with many skips) confirmed that before Winfried's commit, it would default to =sum(), but afterwards it defaulted to =search().

https://cgit.freedesktop.org/libreoffice/core/commit/?id=5b0b7553241bb5150b12bbf7625b4b0b36970272

All this stuff gets passed to rDoc.GetFormulaEntries - which I assume sorts them.
Comment 13 Eike Rathke 2021-12-06 16:24:59 UTC
I wouldn't call that a regression.. the old system suggested *only* functions of the most recent list, and *only one* function, it did not suggest anything else. We now have a different functionality. Whether to sort functions of the MRU list first is another thing.
Comment 14 Justin L 2021-12-08 05:20:54 UTC
Proposed fix at http://gerrit.libreoffice.org/c/core/+/126499

(In reply to Eike Rathke from comment #13)
> I wouldn't call that a regression.. the old system suggested *only*
> functions of the most recent list
Yup. Thanks for stating that. That is what I had expected from a code read, but didn't believe it because I thought my experiences contradicted that.
Comment 15 Commit Notification 2021-12-13 21:18:47 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/b93a6964e0466c1b67d2c233040357a8f6c75214

tdf#92010 sc autoFormula: prefer MRU formulas

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 16 Commit Notification 2021-12-13 21:19:59 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/b2fb1631ab5b3c1d9d09aefa0d3a81307e7ffa35

related tdf#92010 sc autoformula: ensure proper sorting order

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 17 Commit Notification 2021-12-13 22:30:46 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/a141f91037f9cf29822a369261f9e99dffffb964

tdf#92010 sc autoFormula: prefer MRU formulas

It will be available in 7.3.0.0.beta2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 18 Commit Notification 2021-12-13 22:30:58 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/42be5b7c75b2d50b93e110b0cd906a48b3bb0e26

related tdf#92010 sc autoformula: ensure proper sorting order

It will be available in 7.3.0.0.beta2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 19 Roman Kuznetsov 2021-12-14 09:26:10 UTC
Justin, thank you for the patches!

Can I ask how it works now? Is there a some constant list with frequently used functions inside LibreOffice? Or this feature works only when LO Calc works and after Calc restarting it creates the list again?
Comment 20 Justin L 2021-12-14 09:48:52 UTC
(In reply to Roman Kuznetsov from comment #19)
> Is there a some constant list with frequently
> used functions inside LibreOffice?
There is a pre-defined list of LastRecentlyUsed (if, average, sum, min, max) builtin. Functions that the user uses are obviously added.

> Or this feature works only when LO Calc
> works and after Calc restarting it creates the list again?
A quick test with an unsaved document indicates that this LRU must be saved in the users profile. (I typed =ztest(), found it in the LRU the next time I typed "=". Then I closed the untitled document without saving and restarted LO. Typing "=" again still shows ZTEST in the LRU.)
Comment 21 Eike Rathke 2021-12-15 17:44:05 UTC
The list is saved in user/registrymodifications.xcu with
<item oor:path="/org.openoffice.Office.Calc/Input"><prop oor:name="LastFunctions" ...
as numeric OpCode values (so the same list can be presented with different UI localizations).