all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Testing presence of a property
@ 2009-07-30 19:57 User
  2009-07-30 20:56 ` Nick Dokos
  0 siblings, 1 reply; 3+ messages in thread
From: User @ 2009-07-30 19:57 UTC (permalink / raw)
  To: emacs-orgmode

Is there a way to search for headlines which does *not* have set
a particular property? Reading the manual I have the impression
property search has the fixed syntax name=value, so there is no
simple way to search for headers where a property is not yet set
(that is, it has no value).

The only way I found is testing for all possible values, but it's
a bit clumsy (prop<>"value1"+prop<>"value2"+prop<>"value3"...).

Is there a simpler way?

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

* Re: Testing presence of a property
  2009-07-30 19:57 Testing presence of a property User
@ 2009-07-30 20:56 ` Nick Dokos
  2009-07-30 21:06   ` User
  0 siblings, 1 reply; 3+ messages in thread
From: Nick Dokos @ 2009-07-30 20:56 UTC (permalink / raw)
  To: User; +Cc: emacs-orgmode

User <spamfilteraccount@gmail.com> wrote:

> Is there a way to search for headlines which does *not* have set
> a particular property? Reading the manual I have the impression
> property search has the fixed syntax name=value, so there is no
> simple way to search for headers where a property is not yet set
> (that is, it has no value).
> 
> The only way I found is testing for all possible values, but it's
> a bit clumsy (prop<>"value1"+prop<>"value2"+prop<>"value3"...).
> 
> Is there a simpler way?
> 
> 

I don't use properties, but doesn't

  prop=""

work?

I added the following file to my agenda list:

,----
| 
| * head
|   :PROPERTIES:
|   :PROP:     foo
|   :END:
| 
| * tail
|   :PROPERTIES:
|   :PROP:   bar
|   :END:
`----

and I did

    C-c a m PROP="" <RET>

Since none of my normal headlines has the PROP property, I got a buffer
with all the headlines except the above two.

Conversely,

  C-c a m PROP<>"" <RET>

found only those two.

HTH,
Nick

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

* Re: Testing presence of a property
  2009-07-30 20:56 ` Nick Dokos
@ 2009-07-30 21:06   ` User
  0 siblings, 0 replies; 3+ messages in thread
From: User @ 2009-07-30 21:06 UTC (permalink / raw)
  To: emacs-orgmode

Nick Dokos <nicholas.dokos <at> hp.com> writes:
> 
> I don't use properties, but doesn't
> 
>   prop=""
> 
> work?
> 

Yep, it seems to do the job. Thanks for that.

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

end of thread, other threads:[~2009-07-30 21:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-30 19:57 Testing presence of a property User
2009-07-30 20:56 ` Nick Dokos
2009-07-30 21:06   ` User

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.