emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* sparse-tree in indirect buffer
@ 2007-10-22 13:16 Stuart McLean
  2007-10-22 22:11 ` Bastien
  0 siblings, 1 reply; 3+ messages in thread
From: Stuart McLean @ 2007-10-22 13:16 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

First some background, I am using
GNU Emacs 22.1.1 (x86_64-pc-linux-gnu, GTK+ Version 2.10.13) of 2007-08-21 on excelsior, modified by Debian
and org-mode version 5.13a

I have headings like (for example)
* September
** similar stuff to October
* October
** Oct 1
*** Work
    :PROPERTIES:
    :CATEGORY: work
    :END:
**** work info
** Oct 2
    :PROPERTIES:
    :CATEGORY: work
    :END:
**** work info
** Oct 3
    :PROPERTIES:
    :CATEGORY: work
    :END:
**** work info
** Oct 4
    :PROPERTIES:
    :CATEGORY: work
    :END:

and so on.

I want to display the subtree in an indirect buffer, so I type `C-c C-x b'

Now, _from the indirect buffer_ I want a sparse tree as follows `C-c
/' (org-sparse-tree) and at the prompt I type `p', enter the property
name "CATEGORY" with the value "work"

The message in the echo area is Wrong type argument: stringp, nil

and in the *Messages* buffer:

abbreviate-file-name: Wrong type argument: stringp, nil

I would like to be able to get a sparse tree from an indirect buffer, is this possible? And if it is not, should the message be more informative e.g. "Please call sparse tree from blah blah"?

Sorry if this is noise,

org-mode is fantastic btw :-)

Stuart

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

* Re: sparse-tree in indirect buffer
  2007-10-22 13:16 sparse-tree in indirect buffer Stuart McLean
@ 2007-10-22 22:11 ` Bastien
  2007-10-26 13:49   ` Stuart McLean
  0 siblings, 1 reply; 3+ messages in thread
From: Bastien @ 2007-10-22 22:11 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 426 bytes --]

Stuart McLean <makhector@gmail.com> writes:

> Now, _from the indirect buffer_ I want a sparse tree as follows `C-c
> /' (org-sparse-tree) and at the prompt I type `p', enter the property
> name "CATEGORY" with the value "work"
>
> The message in the echo area is Wrong type argument: stringp, nil

It's because the indirect buffer doesn't have a `buffer-file-name'.

This small patch against latest Org 5.13d should fix it:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: org.el.patch --]
[-- Type: text/x-diff, Size: 658 bytes --]

diff -u /home/guerry/elisp/testing/org/org.el /home/guerry/elisp/testing/bzg/org.el
--- /home/guerry/elisp/testing/org/org.el	2007-10-22 15:04:16.000000000 +0100
+++ /home/guerry/elisp/testing/bzg/org.el	2007-10-22 23:06:42.000000000 +0100
@@ -14143,7 +14143,8 @@
 		      'keymap org-agenda-keymap
 		      'help-echo
 		      (format "mouse-2 or RET jump to org file %s"
-			      (abbreviate-file-name buffer-file-name))))
+			      (abbreviate-file-name 
+			       (or buffer-file-name (buffer-name))))))
 	 (case-fold-search nil)
          lspos
 	 tags tags-list tags-alist (llast 0) rtn level category i txt

Diff finished.  Mon Oct 22 23:06:50 2007

[-- Attachment #3: Type: text/plain, Size: 13 bytes --]


-- 
Bastien

[-- Attachment #4: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: sparse-tree in indirect buffer
  2007-10-22 22:11 ` Bastien
@ 2007-10-26 13:49   ` Stuart McLean
  0 siblings, 0 replies; 3+ messages in thread
From: Stuart McLean @ 2007-10-26 13:49 UTC (permalink / raw)
  To: emacs-orgmode



> Now, _from the indirect buffer_ I want a sparse tree as follows `C-c
> /' (org-sparse-tree) and at the prompt I type `p', enter the property
> name "CATEGORY" with the value "work"
>
> The message in the echo area is Wrong type argument: stringp, nil

>> It's because the indirect buffer doesn't have a `buffer-file-name'.
>> 
>> This small patch against latest Org 5.13d should fix it:
>> 
>> [2. text/x-diff; org.el.patch]
>> 
>> diff -u /home/guerry/elisp/testing/org/org.el /home/guerry/elisp/testing/bzg/org.el
>> --- /home/guerry/elisp/testing/org/org.el	2007-10-22 15:04:16.000000000 +0100
>> +++ /home/guerry/elisp/testing/bzg/org.el	2007-10-22 23:06:42.000000000 +0100

Thanks, Bastien.

I didn't have time to apply the patch before 5.13e was out, and it what I wanted works in that version. Thanks very much for your speedy reply. Just a note, I for one love the fact that this group is so active and that the traffic is high. Just an indication of the life in the group!

Stuart

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

end of thread, other threads:[~2007-10-26 13:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-22 13:16 sparse-tree in indirect buffer Stuart McLean
2007-10-22 22:11 ` Bastien
2007-10-26 13:49   ` Stuart McLean

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

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).