* Getting the TAB key for filename completion @ 2008-08-19 0:07 Davin Pearson 2008-08-20 5:21 ` Kevin Rodgers [not found] ` <mailman.17097.1219209711.18990.help-gnu-emacs@gnu.org> 0 siblings, 2 replies; 7+ messages in thread From: Davin Pearson @ 2008-08-19 0:07 UTC (permalink / raw) To: help-gnu-emacs I have installed hippie-expand inside my Emacs. Specifically I have installed the following command: (fset 'my-complete-file (make-hippie-expand-function '(try-complete-file-name-partially try-complete-file-name))) My trouble is that I cannot bind this command to the TAB key when you enter the command M-x compile RET. Could someone please advise me how to get file name completion with the TAB key online? ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Getting the TAB key for filename completion 2008-08-19 0:07 Getting the TAB key for filename completion Davin Pearson @ 2008-08-20 5:21 ` Kevin Rodgers [not found] ` <mailman.17097.1219209711.18990.help-gnu-emacs@gnu.org> 1 sibling, 0 replies; 7+ messages in thread From: Kevin Rodgers @ 2008-08-20 5:21 UTC (permalink / raw) To: help-gnu-emacs Davin Pearson wrote: > I have installed hippie-expand inside my Emacs. Specifically I have > installed the following command: > > (fset 'my-complete-file (make-hippie-expand-function > '(try-complete-file-name-partially > try-complete-file-name))) > > > > My trouble is that I cannot bind this command to the TAB key when you > enter the command M-x compile RET. Could someone please advise me how > to get file name completion with the TAB key online? `M-x compile' reads its COMMAND argument by calling read-from-minibuffer with a nil KEYMAP argument, which defaults to minibuffer-local-map: (define-key minibuffer-local-map "\t" 'my-complete-file); or (kbd "TAB") The tricky part would be trying to restrict that binding to `M-x compile'. I think it'd be easier to define a new command: (defun my-compile () "Run `\\[compile]' with TAB temporarily bound to `my-complete-file'." (interactive) (let ((tab-command (lookup-key minibuffer-local-map "\t"))) (define-key minibuffer-local-map "\t" 'my-complete-file) (unwind-protect (call-interactively 'compile) (define-key minibuffer-local-map "\t" tab-command)))) -- Kevin Rodgers Denver, Colorado, USA ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <mailman.17097.1219209711.18990.help-gnu-emacs@gnu.org>]
* Re: Getting the TAB key for filename completion [not found] ` <mailman.17097.1219209711.18990.help-gnu-emacs@gnu.org> @ 2008-08-20 8:24 ` Davin Pearson 2008-08-20 11:03 ` Peter Dyballa 0 siblings, 1 reply; 7+ messages in thread From: Davin Pearson @ 2008-08-20 8:24 UTC (permalink / raw) To: help-gnu-emacs On Aug 20, 5:21 pm, Kevin Rodgers <kevin.d.rodg...@gmail.com> wrote: > (define-key minibuffer-local-map "\t" 'my-complete-file); or (kbd "TAB") Thanks, this works fine for me. Another question I have is this. Why doesn't the following command redefine Control-Q to quit? (global-set-key "\C-q" 'keyboard-quit) Is this a bug in Emacs? My suspicion is that is the case. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Getting the TAB key for filename completion 2008-08-20 8:24 ` Davin Pearson @ 2008-08-20 11:03 ` Peter Dyballa 2008-08-20 11:40 ` Nikolaj Schumacher 0 siblings, 1 reply; 7+ messages in thread From: Peter Dyballa @ 2008-08-20 11:03 UTC (permalink / raw) To: Davin Pearson; +Cc: help-gnu-emacs Am 20.08.2008 um 10:24 schrieb Davin Pearson: > Another question I have is this. Why doesn't the following command > redefine Control-Q to quit? > > (global-set-key "\C-q" 'keyboard-quit) Because it's a prefix key, like for example Esc? -- Greetings Pete The future will be much better tomorrow. – George W. Bush ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Getting the TAB key for filename completion 2008-08-20 11:03 ` Peter Dyballa @ 2008-08-20 11:40 ` Nikolaj Schumacher 2008-08-21 1:34 ` Davin Pearson [not found] ` <mailman.17201.1219282492.18990.help-gnu-emacs@gnu.org> 0 siblings, 2 replies; 7+ messages in thread From: Nikolaj Schumacher @ 2008-08-20 11:40 UTC (permalink / raw) To: Peter Dyballa; +Cc: Davin Pearson, help-gnu-emacs Peter Dyballa <Peter_Dyballa@Web.DE> wrote: > Am 20.08.2008 um 10:24 schrieb Davin Pearson: > >> Another question I have is this. Why doesn't the following command >> redefine Control-Q to quit? >> >> (global-set-key "\C-q" 'keyboard-quit) > > Because it's a prefix key, like for example Esc? It's not a prefix key. And redefining it works for me. Are you sure `keyboard-quit' is the command you mean? regards, Nikolaj Schumacher ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Getting the TAB key for filename completion 2008-08-20 11:40 ` Nikolaj Schumacher @ 2008-08-21 1:34 ` Davin Pearson [not found] ` <mailman.17201.1219282492.18990.help-gnu-emacs@gnu.org> 1 sibling, 0 replies; 7+ messages in thread From: Davin Pearson @ 2008-08-21 1:34 UTC (permalink / raw) To: Nikolaj Schumacher; +Cc: help-gnu-emacs 2008/8/20 Nikolaj Schumacher <me@nschum.de>: > And redefining it works for me. Are you sure `keyboard-quit' is the > command you mean? Evaluate the following code: (global-set-key "\C-q" 'keyboard-quit) Then do a C-x C-e on the following form: (while t) You will see that the only way to break out of the infinite loop is to press C-g. Note that C-q doesn't work in spite of the above binding of C-q. I assume that the reason C-q doesn't work is because of a design oversight of the creators of Emacs. -- Sincerely and kindest regards, Davin. Davin Pearson http://www.davinpearson.com ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <mailman.17201.1219282492.18990.help-gnu-emacs@gnu.org>]
* Re: Getting the TAB key for filename completion [not found] ` <mailman.17201.1219282492.18990.help-gnu-emacs@gnu.org> @ 2008-08-21 5:33 ` Andreas Politz 0 siblings, 0 replies; 7+ messages in thread From: Andreas Politz @ 2008-08-21 5:33 UTC (permalink / raw) To: help-gnu-emacs Davin Pearson wrote: > 2008/8/20 Nikolaj Schumacher <me@nschum.de>: >> And redefining it works for me. Are you sure `keyboard-quit' is the >> command you mean? > > Evaluate the following code: > > (global-set-key "\C-q" 'keyboard-quit) > > Then do a C-x C-e on the following form: > > (while t) > > You will see that the only way to break out of the infinite loop is to > press C-g. Note that C-q doesn't work in spite of the above binding > of C-q. I assume that the reason C-q doesn't work is because of a > design oversight of the creators of Emacs. > > (set-input-mode x y z ?\C-q) -ap ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-08-21 5:33 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-08-19 0:07 Getting the TAB key for filename completion Davin Pearson 2008-08-20 5:21 ` Kevin Rodgers [not found] ` <mailman.17097.1219209711.18990.help-gnu-emacs@gnu.org> 2008-08-20 8:24 ` Davin Pearson 2008-08-20 11:03 ` Peter Dyballa 2008-08-20 11:40 ` Nikolaj Schumacher 2008-08-21 1:34 ` Davin Pearson [not found] ` <mailman.17201.1219282492.18990.help-gnu-emacs@gnu.org> 2008-08-21 5:33 ` Andreas Politz
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.