Bug 55597 - Dynamic abbrev mode like in emacs
Summary: Dynamic abbrev mode like in emacs
Status: RESOLVED NOT A BUG
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-06 11:09 UTC by Karl Vogel
Modified: 2005-02-13 09:39 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Karl Vogel 2003-03-06 11:09:07 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources

A dynamic abbrev mode like in emacs would be a very useful addition. ie. using the dabbrev key, a partial string lookup is done in the history buffer.

.. the emacs dynamic abbrev key docs:

M-/ runs `dabbrev-expand'

`dabbrev-expand' is an interactive compiled Lisp function
  -- loaded from "dabbrev"
(dabbrev-expand ARG)

Documentation:
Expand previous word "dynamically".

Expands to the most recent, preceding word for which this is a prefix.
If no suitable preceding word is found, words following point are
considered.  If still no suitable word is found, then look in the
buffers accepted by the function pointed out by variable
`dabbrev-friend-buffer-function'.

A positive prefix argument, N, says to take the Nth backward *distinct*
possibility.  A negative argument says search forward.

If the cursor has not moved from the end of the previous expansion and
no argument is given, replace the previously-made expansion
with the next possible expansion not yet tried.

The variable `dabbrev-backward-only' may be used to limit the
direction of search to backward if set non-nil.

See also `dabbrev-abbrev-char-regexp' and M-C-/.
Comment 1 Thiago Macieira 2003-03-06 20:04:50 UTC
In konsole? Are you sure you're requesting this to the right program? 
 
if you want to be able to use dabbrev-like expansion of words in your shell, you send this wishlist item 
to the shell maintainers, not to konsole. I think your rquest is misplaced 
Comment 2 Karl Vogel 2003-03-07 09:00:07 UTC
[posted this directly to the mailing list.. will attach it here too, just to
keep the info together with the bug/wish report]

Hell why not? Why restrict
it to the shell program?! I want to be able to use dynamic abbrev with
everything that appears on my screen.

I regularly use a konsole as a terminal to our OpenVMS systems, patching the
DCL shell isn't an option ('Use the source Luke' doesn't work here). 

Anyway I would expect this be done with a popup menu or something.. e.g.
when you type the dabbrev key, konsole scans the current word at the last
print position in the TEScreen buffer and then searches back in it's
history (TEScreen) for occurences of words starting with the same word and
then presents a popup where you can select (with cursor keys) the
completion you want.

Example.. if I type

clea<press dabbrev key here>

then I am presented with 'clear' in a popup. If I select this, it send 'r'
to the standard input of the KProcess (completing the word clear).


This saves me from having to 'Edit->Find in history' then enter my text,
then cut and paste that in whatever program I'm running... VERY useful
indeed!
Comment 3 Kurt Hindenburg 2005-02-13 09:39:31 UTC
Not going to happen.  

However, if you would like a DCOP function for 'Find in History' then that might be doable (still a wish).  At least that way you could write a script to do what you want.