unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#13511: 24.3.50; C-x C-f M-n does not produce buffer filename
       [not found] <3E6B15C3-1D35-4D88-9632-67981102C389@ismobile.com>
@ 2013-01-21 10:00 ` Jan Djärv
  2013-01-21 10:50   ` Juri Linkov
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Djärv @ 2013-01-21 10:00 UTC (permalink / raw)
  To: 13511

Hello.

Put this content:
-------------- cut here --------------
5253e3277c7cb3b84eb2c08fba1730ef ./images/about.bmp
-------------- cut here --------------

in a file, say ~/tst.txt.
Put the cursor at the ., and do
C-x C-f M-n

The current filename for the buffer is not inserted into the minibuffer.
You have to press M-n a second time to get ~/tst.txt.

Sometimes, given more content in the file, the minibuffer shows
~/images/about.bmp.  I haven't been able to narrow this down to a
minimal test case.

I was under the impression that C-x C-f M-n should always give the
filename of the current buffer.

        Jan D.


In GNU Emacs 24.3.50.1 (x86_64-apple-darwin12.2.1, NS apple-appkit-1187.34)
of 2013-01-14 on jdvpro.local
Bzr revision: 111517 rgm@gnu.org-20130114010938-c030qqf77k8jckrm
Windowing system distributor `Apple', version 10.3.1187
Configured using:
`configure --verbose --with-ns CFLAGS=-g --no-create --no-recursion'

Important settings:
 value of $LC_COLLATE: C
 value of $LANG: sv_SE.UTF-8
 locale-coding-system: utf-8-unix
 default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
 tooltip-mode: t
 mouse-wheel-mode: t
 tool-bar-mode: t
 menu-bar-mode: t
 file-name-shadow-mode: t
 global-font-lock-mode: t
 font-lock-mode: t
 blink-cursor-mode: t
 auto-composition-mode: t
 auto-encryption-mode: t
 auto-compression-mode: t
 line-number-mode: t
 transient-mark-mode: t

Recent input:
<escape> x r e p o r t - e m <tab> C-g <escape> x r 
e p o r t - e m <tab> <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Quit

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils time-date tooltip ediff-hook vc-hooks
lisp-float-type mwheel ns-win tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment lisp-mode register page menu-bar
rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax
facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak
czech european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces
cus-face macroexp files text-properties overlay sha1 md5 base64 format
env code-pages mule custom widget hashtable-print-readable backquote
make-network-process ns multi-tty emacs)





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#13511: 24.3.50; C-x C-f M-n does not produce buffer filename
  2013-01-21 10:00 ` bug#13511: 24.3.50; C-x C-f M-n does not produce buffer filename Jan Djärv
@ 2013-01-21 10:50   ` Juri Linkov
  2013-01-21 17:18     ` Jan Djärv
  0 siblings, 1 reply; 4+ messages in thread
From: Juri Linkov @ 2013-01-21 10:50 UTC (permalink / raw)
  To: Jan Djärv; +Cc: 13511

> The current filename for the buffer is not inserted into the minibuffer.
> You have to press M-n a second time to get ~/tst.txt.
>
> Sometimes, given more content in the file, the minibuffer shows
> ~/images/about.bmp.  I haven't been able to narrow this down to a
> minimal test case.
>
> I was under the impression that C-x C-f M-n should always give the
> filename of the current buffer.

Since ffap doesn't do what you expect, perhaps `C-x C-f M-n' should
give the filename of the current buffer, and second M-n to guess
the filename under cursor using ffap, i.e. to exchange these suggestions
from their current default values.

Or ffap could be improved to better guess the filename under cursor.
Currently it checks whether the file under cursor exists, and
if it doesn't exist it gives the current directory (because of `.'
at the beginning of nonexistent ./images/about.bmp).  Maybe it should not
check the existence of the file and give just ./images/about.bmp
for `C-x C-f M-n'?





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#13511: 24.3.50; C-x C-f M-n does not produce buffer filename
  2013-01-21 10:50   ` Juri Linkov
@ 2013-01-21 17:18     ` Jan Djärv
  2013-01-21 17:19       ` Jan Djärv
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Djärv @ 2013-01-21 17:18 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 13511

Hello.

21 jan 2013 kl. 11:50 skrev Juri Linkov <juri@jurta.org>:

>> The current filename for the buffer is not inserted into the minibuffer.
>> You have to press M-n a second time to get ~/tst.txt.
>> 
>> Sometimes, given more content in the file, the minibuffer shows
>> ~/images/about.bmp.  I haven't been able to narrow this down to a
>> minimal test case.
>> 
>> I was under the impression that C-x C-f M-n should always give the
>> filename of the current buffer.
> 
> Since ffap doesn't do what you expect, perhaps `C-x C-f M-n' should
> give the filename of the current buffer, and second M-n to guess
> the filename under cursor using ffap, i.e. to exchange these suggestions
> from their current default values.
> 
> Or ffap could be improved to better guess the filename under cursor.
> Currently it checks whether the file under cursor exists, and
> if it doesn't exist it gives the current directory (because of `.'
> at the beginning of nonexistent ./images/about.bmp).  Maybe it should not
> check the existence of the file and give just ./images/about.bmp
> for `C-x C-f M-n'?

I didn't know ffap was involved.  I'm content to customize file-name-at-point-functions, as I can't imagine when I would wan't ffap.  It really doesn't work well, I also got "Stack overflow in regexp matcher" a few times.  Hard to reproduce though.

I would expect if ffap can't produce a file that exists, or an error occurs, it should produce the current buffer filename.

	Jan D.






^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#13511: 24.3.50; C-x C-f M-n does not produce buffer filename
  2013-01-21 17:18     ` Jan Djärv
@ 2013-01-21 17:19       ` Jan Djärv
  0 siblings, 0 replies; 4+ messages in thread
From: Jan Djärv @ 2013-01-21 17:19 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 13511-done

Closing, customize file-name-at-point-functions solves the problem.

	Jan D.

21 jan 2013 kl. 18:18 skrev Jan Djärv <jan.h.d@swipnet.se>:

> Hello.
> 
> 21 jan 2013 kl. 11:50 skrev Juri Linkov <juri@jurta.org>:
> 
>>> The current filename for the buffer is not inserted into the minibuffer.
>>> You have to press M-n a second time to get ~/tst.txt.
>>> 
>>> Sometimes, given more content in the file, the minibuffer shows
>>> ~/images/about.bmp.  I haven't been able to narrow this down to a
>>> minimal test case.
>>> 
>>> I was under the impression that C-x C-f M-n should always give the
>>> filename of the current buffer.
>> 
>> Since ffap doesn't do what you expect, perhaps `C-x C-f M-n' should
>> give the filename of the current buffer, and second M-n to guess
>> the filename under cursor using ffap, i.e. to exchange these suggestions
>> from their current default values.
>> 
>> Or ffap could be improved to better guess the filename under cursor.
>> Currently it checks whether the file under cursor exists, and
>> if it doesn't exist it gives the current directory (because of `.'
>> at the beginning of nonexistent ./images/about.bmp).  Maybe it should not
>> check the existence of the file and give just ./images/about.bmp
>> for `C-x C-f M-n'?
> 
> I didn't know ffap was involved.  I'm content to customize file-name-at-point-functions, as I can't imagine when I would wan't ffap.  It really doesn't work well, I also got "Stack overflow in regexp matcher" a few times.  Hard to reproduce though.
> 
> I would expect if ffap can't produce a file that exists, or an error occurs, it should produce the current buffer filename.
> 
> 	Jan D.
> 






^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-01-21 17:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <3E6B15C3-1D35-4D88-9632-67981102C389@ismobile.com>
2013-01-21 10:00 ` bug#13511: 24.3.50; C-x C-f M-n does not produce buffer filename Jan Djärv
2013-01-21 10:50   ` Juri Linkov
2013-01-21 17:18     ` Jan Djärv
2013-01-21 17:19       ` Jan Djärv

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).