unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Support find-tag in Info-mode
@ 2005-11-03 19:06 Bill Wohler
  2005-11-04 17:27 ` Richard M. Stallman
  0 siblings, 1 reply; 4+ messages in thread
From: Bill Wohler @ 2005-11-03 19:06 UTC (permalink / raw)


Try to use M-. on `foo' in Info-mode and you get the error, "Can't find
tag foo'.

I have little experience with syntax entries, but the following fixes
find-tag at the expense of losing the ability to consider a contraction
as part of the same word:

    (add-hook 'Info-mode-hook
	      '(lambda ()
		 (modify-syntax-entry ?' "'   ")))

This works for me since I have little need for selecting contractions in
Info-mode. However, I think it would be good to come up with a more
general solution that fixes find-tag in Info-mode. Is there some
syntax-entry magic that can be used, or would it be more appropriate for
find-tag to try stripping a trailing ' if the original search fails?

-- 
Bill Wohler <wohler@newt.com>  http://www.newt.com/wohler/  GnuPG ID:610BD9AD
Maintainer of comp.mail.mh FAQ and MH-E. Vote Libertarian!
If you're passed on the right, you're in the wrong lane.

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

* Re: Support find-tag in Info-mode
  2005-11-03 19:06 Support find-tag in Info-mode Bill Wohler
@ 2005-11-04 17:27 ` Richard M. Stallman
  2005-11-05  9:45   ` Juri Linkov
  0 siblings, 1 reply; 4+ messages in thread
From: Richard M. Stallman @ 2005-11-04 17:27 UTC (permalink / raw)
  Cc: emacs-devel

    Try to use M-. on `foo' in Info-mode and you get the error, "Can't find
    tag foo'.

    I have little experience with syntax entries, but the following fixes
    find-tag at the expense of losing the ability to consider a contraction
    as part of the same word:

	(add-hook 'Info-mode-hook
		  '(lambda ()
		     (modify-syntax-entry ?' "'   ")))

This would make M-f and M-b work badly, so it certainly is not a good
idea.

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

* Re: Support find-tag in Info-mode
  2005-11-04 17:27 ` Richard M. Stallman
@ 2005-11-05  9:45   ` Juri Linkov
  2005-11-05 23:43     ` Richard M. Stallman
  0 siblings, 1 reply; 4+ messages in thread
From: Juri Linkov @ 2005-11-05  9:45 UTC (permalink / raw)
  Cc: wohler, emacs-devel

>     Try to use M-. on `foo' in Info-mode and you get the error,
>     "Can't find tag foo'.
>
>     I have little experience with syntax entries, but the following
>     fixes find-tag at the expense of losing the ability to consider
>     a contraction as part of the same word:
>
> 	(add-hook 'Info-mode-hook
> 		  '(lambda ()
> 		     (modify-syntax-entry ?' "'   ")))
>
> This would make M-f and M-b work badly, so it certainly is not a good
> idea.

It makes M-f and M-b work badly only for contractions like "it's", "don't".
But in Info manuals apostrophes are no less frequently used as a right
single quotation mark.  Since contractions are rare on word boundaries
in English, then what about treating ' as part of the same word only
when both its adjacent characters have word syntax?

-- 
Juri Linkov
http://www.jurta.org/emacs/

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

* Re: Support find-tag in Info-mode
  2005-11-05  9:45   ` Juri Linkov
@ 2005-11-05 23:43     ` Richard M. Stallman
  0 siblings, 0 replies; 4+ messages in thread
From: Richard M. Stallman @ 2005-11-05 23:43 UTC (permalink / raw)
  Cc: wohler, emacs-devel

      Since contractions are rare on word boundaries
    in English, then what about treating ' as part of the same word only
    when both its adjacent characters have word syntax?

This is not completely correct; there are contractions such as "mens'
wear".  However, it could be that this change would result in correct
behavior more of the time than now.  That could be enough to make such
a change.

But that is not a simple change.  There is no syntax code which does
that.

We could think about this after the release.

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

end of thread, other threads:[~2005-11-05 23:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-03 19:06 Support find-tag in Info-mode Bill Wohler
2005-11-04 17:27 ` Richard M. Stallman
2005-11-05  9:45   ` Juri Linkov
2005-11-05 23:43     ` Richard M. Stallman

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).