Re: [O] org-grep, and problems

2013-10-15 Thread Suvayu Ali
On Mon, Oct 14, 2013 at 07:50:36PM -0400, François Pinard wrote:
 Suvayu Ali fatkasuvayu+li...@gmail.com writes:
 
   No matter what I search for, I get 0 results!
  I'm on Linux.
 
 Hmph!  As it works nicely for me, I thought it would be useful to
 others.  I'm saddened it does not work for you.  How could we proceed so
 I try to help on this one?  Write me privately if you feel like it (yet
 my replies may lag sometimes, I'm not always available).

The library seemed interesting, so I was trying it out.  I usually use a
custom shell script from the terminal to search.  I can try debugging
org-grep, but I don't know where I should start.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] org-grep, and problems

2013-10-15 Thread François Pinard
James Harkins jamshar...@gmail.com writes:

 I don't want to drag it out much further as it's well off topic,

I'm sorry that my little grammar question, in the P.S. of the original
message, generated all that traffic.  I did not know the answers were so
debatable, and was rather expecting a quick and conclusive reply from
any English guy (or girl) around.

Another notable point is that nobody replied to the Org questions in the
original message, yet I quite understand that chasing bugs in someone
else code is not an especially attractive activity :-).

Keep happy all!

François

P.S. Who just upgraded Ubuntu to [...]  Oops!  No more P.S.'es :-)



Re: [O] org-grep, and problems

2013-10-15 Thread François Pinard
Suvayu Ali fatkasuvayu+li...@gmail.com writes:

 I can try debugging org-grep, but I don't know where I should start.

I would either step through org-grep (using C-u C-M-x first over any
line of the org-grep definition within org-grep.el, or add (message ...)
lines within the function before to later check the *Messages* buffer,
and after calling org-grep the normal way to trigger the trace, pay
special attention to the argument given to shell-command.

That command, repeated in a mere shell outside Emacs, should find hits
in your Org files.  If not, I would play with that command to see how it
should have been written to be successful, then amend org-grep so it
generates the proper command.

If everything that should be found gets found, then I'd suspect the code
after shell-command which reformats the output, and step through it to
find where it does it wrong.

The code is small, so the bug does not have much room to hide :-).

François



Re: [O] org-grep, and problems

2013-10-14 Thread Suvayu Ali
On Sun, Oct 13, 2013 at 05:43:18PM -0400, R. Michael Weylandt 
michael.weyla...@gmail.com wrote:
 
 
 On Oct 10, 2013, at 11:50, François Pinard pin...@iro.umontreal.ca wrote:
 
  
  P.S. What is proper English: nobody remember or nobody remembers?
  
 
 Remembers. 'Nobody' counts as singular, as does 'no one'. English
 isn't totally consistent on this matter, however, as 'none' takes a
 plural verb.
 
 No one is brave enough to skip the meeting, even though none of the
 bosses are going to attend.

Actually, I think it is quite consistent.  Nobody refers to an
individual, even though the set of possible individuals is infinite;
same goes for no one.  Where as none of the ... refers to the set
collectively.

I think Strunk  White says the same, although I can't quote – I don't
have my copy handy at the moment.

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] org-grep, and problems

2013-10-14 Thread James Harkins
R. Michael Weylandt michael.weylandt at gmail.com michael.weylandt at 
gmail.com writes:

 On Oct 10, 2013, at 11:50, François Pinard pinard at iro.umontreal.ca 
wrote:
 
  
  P.S. What is proper English: nobody remember or nobody remembers?
  
 
 Remembers. 'Nobody' counts as singular, as does 'no one'. English isn't  
totally consistent on this
 matter, however, as 'none' takes a plural verb. 
 
 No one is brave enough to skip the meeting, even though none of the bosses 
are going to attend. 

Actually, I think the latter clause is incorrect usage. The verb's subject is 
none, not bosses; since the subject is singular, the verb form should be 
singular as well. It feels wrong to have a singular verb immediately after a 
plural noun, but that noun properly belongs to the preposition, not the verb.

I'm voting for none of the bosses is going to attend.

hjh




Re: [O] org-grep, and problems

2013-10-14 Thread Jonathan Leech-Pepin
Hello,

On Oct 14, 2013 10:43 AM, James Harkins jamshar...@gmail.com wrote:

 R. Michael Weylandt michael.weylandt at gmail.com michael.weylandt
at
 gmail.com writes:

  On Oct 10, 2013, at 11:50, François Pinard pinard at iro.umontreal.ca

 wrote:
 
  
   P.S. What is proper English: nobody remember or nobody remembers?
  
 
  Remembers. 'Nobody' counts as singular, as does 'no one'. English isn't
 totally consistent on this
  matter, however, as 'none' takes a plural verb.
 
  No one is brave enough to skip the meeting, even though none of the
bosses
 are going to attend.

 Actually, I think the latter clause is incorrect usage. The verb's
subject is
 none, not bosses; since the subject is singular, the verb form should
be
 singular as well. It feels wrong to have a singular verb immediately
after a
 plural noun, but that noun properly belongs to the preposition, not the
verb.

 I'm voting for none of the bosses is going to attend.

None is a bit of an odd case, since it reflects the plurality of the
associated noun.

None of the group is going...
None of the groups are going...
None of the bosses are going to attend.

Some, most, all also follow that pattern:
All of the group is...
All of the bosses are...

Group allows for both the plural and similar case since even one group
still has multiple members (at least it implies such).

Jon

 hjh




Re: [O] org-grep, and problems

2013-10-14 Thread Alan L Tyree

On 15/10/13 05:19, Jonathan Leech-Pepin wrote:


Hello,

On Oct 14, 2013 10:43 AM, James Harkins jamshar...@gmail.com 
mailto:jamshar...@gmail.com wrote:


 R. Michael Weylandt michael.weylandt at gmail.com 
http://gmail.com michael.weylandt at

 gmail.com http://gmail.com writes:

  On Oct 10, 2013, at 11:50, François Pinard pinard at 
iro.umontreal.ca http://iro.umontreal.ca

 wrote:
 
  
   P.S. What is proper English: nobody remember or nobody 
remembers?

  
 
  Remembers. 'Nobody' counts as singular, as does 'no one'. English 
isn't

 totally consistent on this
  matter, however, as 'none' takes a plural verb.
 
  No one is brave enough to skip the meeting, even though none of 
the bosses

 are going to attend.

 Actually, I think the latter clause is incorrect usage. The verb's 
subject is
 none, not bosses; since the subject is singular, the verb form 
should be
 singular as well. It feels wrong to have a singular verb 
immediately after a
 plural noun, but that noun properly belongs to the preposition, not 
the verb.


 I'm voting for none of the bosses is going to attend.

None is a bit of an odd case, since it reflects the plurality of the 
associated noun.


None of the group is going...
None of the groups are going...
None of the bosses are going to attend.

Some, most, all also follow that pattern:
All of the group is...
All of the bosses are...

Group allows for both the plural and similar case since even one group 
still has multiple members (at least it implies such).


Jon

 hjh




Strunk  White 3rd edition p9:

  With none, use the singular verb when the word means no one or not
   one.

 None of us are perfect. None of us is perfect.

   A plural verb is commonly used when none suggests more than one thing
   or person.

 None are so fallible as those who are sure they're right.


Alan

--
Alan L Tyreehttp://www2.austlii.edu.au/~alan
Tel:  04 2748 6206  sip:typh...@iptel.org



Re: [O] org-grep, and problems

2013-10-14 Thread François Pinard
Suvayu Ali fatkasuvayu+li...@gmail.com writes:

  No matter what I search for, I get 0 results!
 I'm on Linux.

Hmph!  As it works nicely for me, I thought it would be useful to
others.  I'm saddened it does not work for you.  How could we proceed so
I try to help on this one?  Write me privately if you feel like it (yet
my replies may lag sometimes, I'm not always available).

François



Re: [O] org-grep, and problems

2013-10-14 Thread James Harkins
On Oct 15, 2013 2:19 AM, Jonathan Leech-Pepin 
jonathan.leechpe...@gmail.com wrote:.
  I'm voting for none of the bosses is going to attend.

 None is a bit of an odd case, since it reflects the plurality of the
associated noun.

I don't want to drag it out much further as it's well off topic, but... I
did some checking and found (for the most part) that what I said *used* to
be true, but that the usage has been shifting for a good century or two (to
allow none to be plural). So I concede that point (and learned something
today, which I like).

From the few grammar sites I checked, it seems that a plural none is
definitely accepted in speech and informal writing. One site mentioned that
formal writing may more often call for none to take a singular verb,
regardless of the associated noun. But Facebook, twitter and texting have
basically killed formal writing already, so, soon even that caveat will be
gone.

I did not find any sites claiming that it's mandatory to give none a
plural verb if it appears with a plural noun. All of those sites at least
gave lip service to its origin as not one of -- e.g. not one of the
groups is going -- so my preference for the singular verb is justified,
though not my claim that the other is flat-out incorrect.

Thanks... Glad to learn I can cross that one off my grammar police list.

hjh


Re: [O] org-grep, and problems

2013-10-13 Thread R. Michael Weylandt michael.weyla...@gmail.com


On Oct 10, 2013, at 11:50, François Pinard pin...@iro.umontreal.ca wrote:

 
 P.S. What is proper English: nobody remember or nobody remembers?
 

Remembers. 'Nobody' counts as singular, as does 'no one'. English isn't  
totally consistent on this matter, however, as 'none' takes a plural verb. 

No one is brave enough to skip the meeting, even though none of the bosses are 
going to attend. 

M


Re: [O] org-grep, and problems

2013-10-11 Thread Suvayu Ali
Hi François,

On Thu, Oct 10, 2013 at 09:14:57PM -0400, François Pinard wrote:
 Suvayu Ali fatkasuvayu+li...@gmail.com writes:
 
  No matter what I search for, I get 0 results!  My org-directory points
  to the correct location: ~/org.  Not sure what is wrong.
 
 Annoying!  I just tried resetting org-grep-directories to nil here, as a
 way to force the default of org-directory, and it works well for me.
 
 Would you happen to be using Windows?  I only tried it on Linux.  It
 surely depend on find and grep being system commands.  (And I should
 document that.)

I'm on Linux.

-- 
Suvayu

Open source is the future. It sets us free.



[O] org-grep, and problems

2013-10-10 Thread François Pinard
Hi, Org people.

I recently rewrote my Emacs org-grep function, which surely nobody
remember, as when we discussed it here, it was years ago! :-)

The new writing gives nicer results, so I made it available as:

   https://github.com/pinard/org-grep

However, I'm not satisfied.  Maybe someone would be kind enough to
explore and understand some of the problems I see, at least before I
succeed in doing it myself.  The two main problems are:

  - (save-current-buffer ...) or (save-excursion ...) fail to bring the
cursor back into the current window, seemingly whenever an Org link
gets followed within the Lisp form.

  - org-reveal leaves the cursor line collapsed.

I can live with these two problems unsolved, as it only requires a few
more manipulations as a user.  They would be nicer solved, of course.

Keep happy, all!

François

P.S. What is proper English: nobody remember or nobody remembers?



Re: [O] org-grep, and problems

2013-10-10 Thread Suvayu Ali
On Thu, Oct 10, 2013 at 11:50:47AM -0400, François Pinard wrote:
 
 I recently rewrote my Emacs org-grep function, which surely nobody
 remember, as when we discussed it here, it was years ago! :-)

Looks interesting.  I'll check it out.

 P.S. What is proper English: nobody remember or nobody remembers?
 

no one remembers maybe?

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] org-grep, and problems

2013-10-10 Thread Suvayu Ali
On Thu, Oct 10, 2013 at 06:54:06PM +0200, Suvayu Ali wrote:
 On Thu, Oct 10, 2013 at 11:50:47AM -0400, François Pinard wrote:
  
  I recently rewrote my Emacs org-grep function, which surely nobody
  remember, as when we discussed it here, it was years ago! :-)
 
 Looks interesting.  I'll check it out.

No matter what I search for, I get 0 results!  My org-directory points
to the correct location: ~/org.  Not sure what is wrong.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] org-grep, and problems

2013-10-10 Thread François Pinard
Suvayu Ali fatkasuvayu+li...@gmail.com writes:

 No matter what I search for, I get 0 results!  My org-directory points
 to the correct location: ~/org.  Not sure what is wrong.

Annoying!  I just tried resetting org-grep-directories to nil here, as a
way to force the default of org-directory, and it works well for me.

Would you happen to be using Windows?  I only tried it on Linux.  It
surely depend on find and grep being system commands.  (And I should
document that.)

François