unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* [el-search] How to search string excluding docstring?
@ 2017-12-25 10:27 Chunyang Xu
  2017-12-25 10:40 ` Jean-Christophe Helary
                   ` (3 more replies)
  0 siblings, 4 replies; 28+ messages in thread
From: Chunyang Xu @ 2017-12-25 10:27 UTC (permalink / raw)
  To: help-gnu-emacs; +Cc: michael_heerdegen

Hi Michael Heerdegen and other Emacs users,

For example, with the following contents in a buffer

(defun foo ()
  "foo docstring"
  (message "foo string"))

(string "foo") matches both "foo docstring" and "foo string", I want a
way to exclude the docstring, by "docstring", I just mean the string
being checking should not be the fourth element in

  (defun _ _ docstring . _)

I am thinking a pattern like

  (and (pred stringp) (guard (not (docstring-p))) (string "foo"))

but I have no idea how to define 'docstring-p'.

Any tips?



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

end of thread, other threads:[~2017-12-27 13:58 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.6328.1514197667.27995.help-gnu-emacs@gnu.org>
2017-12-25 12:00 ` [el-search] How to search string excluding docstring? Emanuel Berg
2017-12-25 13:57   ` Chunyang Xu
2017-12-25 14:34     ` Michael Heerdegen
     [not found]   ` <mailman.6334.1514210258.27995.help-gnu-emacs@gnu.org>
2017-12-25 14:08     ` Emanuel Berg
2017-12-25 17:55       ` tomas
     [not found]       ` <mailman.6358.1514224565.27995.help-gnu-emacs@gnu.org>
2017-12-25 18:11         ` Emanuel Berg
2017-12-25 19:14           ` tomas
     [not found]           ` <mailman.6366.1514229270.27995.help-gnu-emacs@gnu.org>
2017-12-25 19:36             ` Emanuel Berg
2017-12-25 21:20               ` tomas
     [not found]               ` <mailman.6371.1514236843.27995.help-gnu-emacs@gnu.org>
2017-12-25 21:56                 ` Emanuel Berg
2017-12-26  2:44                   ` Emanuel Berg
2017-12-26 13:34                   ` Emanuel Berg
2017-12-26 13:48                     ` Jean-Christophe Helary
     [not found]                     ` <mailman.6381.1514296097.27995.help-gnu-emacs@gnu.org>
2017-12-26 15:19                       ` Emanuel Berg
2017-12-27  5:38                     ` Chunyang Xu
2017-12-27 13:58                       ` Michael Heerdegen
     [not found]                     ` <mailman.6406.1514353148.27995.help-gnu-emacs@gnu.org>
2017-12-27  6:58                       ` Emanuel Berg
2017-12-25 19:39             ` Emanuel Berg
2017-12-25 10:27 Chunyang Xu
2017-12-25 10:40 ` Jean-Christophe Helary
2017-12-25 12:00 ` Skip Montanaro
2017-12-25 18:04   ` Michael Heerdegen
2017-12-25 14:56 ` Michael Heerdegen
2017-12-25 16:58   ` Chunyang Xu
2017-12-25 17:51     ` Michael Heerdegen
     [not found] ` <mailman.6340.1514213787.27995.help-gnu-emacs@gnu.org>
2017-12-25 15:50   ` Emanuel Berg
2017-12-25 16:59     ` Michael Heerdegen
     [not found]     ` <mailman.6351.1514221174.27995.help-gnu-emacs@gnu.org>
2017-12-25 18:04       ` Emanuel Berg

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