emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Julien Danjou <julien@danjou.info>
To: Matt Lundin <mdl@imapmail.org>
Cc: emacs-orgmode@gnu.org, Carsten Dominik <carsten.dominik@gmail.com>
Subject: Re: [PATCH] Always return refreshed category
Date: Fri, 24 Dec 2010 17:33:50 +0100	[thread overview]
Message-ID: <87tyi3p1u9.fsf@keller.adm.naquadah.org> (raw)
In-Reply-To: <87r5d7xjfv.fsf@fastmail.fm> (Matt Lundin's message of "Fri, 24 Dec 2010 10:46:28 -0500")


[-- Attachment #1.1.1: Type: text/plain, Size: 516 bytes --]

On Fri, Dec 24 2010, Matt Lundin wrote:

> With your original patch, I am also frequently seeing "???" as a
> category in the agenda buffer. E.g.,
>
> ???:        In  -1 d.:  TODO Christmas gifts wrapped                    :home:
>
> This occurs with files/entries that do not have an in-buffer category
> statement (e.g, #+CATEGORY: or :CATEGORY:).

Seems like the refresh function set this by default if no category is
found. That looks stupid, I wonder why there's that line.

Here's a patch that should fix it.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1.2: 0001-Fix-in-category.patch --]
[-- Type: text/x-diff, Size: 904 bytes --]

From 89464e137f66cfeb144938692479bf95e9187a4d Mon Sep 17 00:00:00 2001
From: Julien Danjou <julien@danjou.info>
Date: Fri, 24 Dec 2010 17:32:45 +0100
Subject: [PATCH] Fix ??? in category

* org.el (org-refresh-category-properties): Do not set ??? as default
  category if no default.

Signed-off-by: Julien Danjou <julien@danjou.info>
---
 lisp/org.el |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 863a80b..5fb2ba4 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -8154,8 +8154,7 @@ call CMD."
 		  ((null org-category)
 		   (if buffer-file-name
 		       (file-name-sans-extension
-			(file-name-nondirectory buffer-file-name))
-		     "???"))
+			(file-name-nondirectory buffer-file-name))))
 		  ((symbolp org-category) (symbol-name org-category))
 		  (t org-category)))
 	beg end cat pos optionp)
-- 
1.7.2.3


[-- Attachment #1.1.3: Type: text/plain, Size: 53 bytes --]


-- 
Julien Danjou
❱ http://julien.danjou.info

[-- Attachment #1.2: Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

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

      parent reply	other threads:[~2010-12-24 16:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-22 14:06 [PATCH] Always return refreshed category Julien Danjou
2010-12-23  7:43 ` [Accepted] " Carsten Dominik
2010-12-23  7:43 ` [PATCH] " Carsten Dominik
2010-12-23 15:42   ` Matt Lundin
2010-12-23 16:03     ` Julien Danjou
2010-12-24 15:46       ` Matt Lundin
2010-12-24 16:33         ` Carsten Dominik
2010-12-27 10:56           ` Julien Danjou
2010-12-27 14:23             ` Julien Danjou
2011-01-03  8:39               ` Carsten Dominik
2011-01-03 10:57                 ` Julien Danjou
2011-01-03 12:14                   ` Carsten Dominik
2010-12-24 16:33         ` Julien Danjou [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tyi3p1u9.fsf@keller.adm.naquadah.org \
    --to=julien@danjou.info \
    --cc=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mdl@imapmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).