all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Org agenda and recent files list....
@ 2012-08-10  4:01 Robert Goldman
  2012-08-10  7:21 ` Bastien
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Goldman @ 2012-08-10  4:01 UTC (permalink / raw)
  To: Org Mode

I was finding that the use of org-agenda made my recent files list less
than useful, by filling up the list with files that I rarely opened "by
hand" with find-file.

The following snippet, added to my org-config file, seems to have fixed
things.

;;;---------------------------------------------------------------------------
;;; Agenda files shouldn't get entries in the recentf-list
;;;---------------------------------------------------------------------------
(defun org-is-agenda-file (filename)
  (find (file-truename filename) org-agenda-files :key 'file-truename
:test 'equal))

(require 'recentf)
(pushnew 'org-is-agenda-file recentf-exclude)

I mention this on the off-chance it's useful to someone else...

cheers,
r

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

* Re: Org agenda and recent files list....
  2012-08-10  4:01 Org agenda and recent files list Robert Goldman
@ 2012-08-10  7:21 ` Bastien
  2012-08-10 20:39   ` Robert Goldman
  0 siblings, 1 reply; 4+ messages in thread
From: Bastien @ 2012-08-10  7:21 UTC (permalink / raw)
  To: rpgoldman; +Cc: Org Mode

Robert Goldman <rpgoldman@sift.info> writes:

> ;;;---------------------------------------------------------------------------
> ;;; Agenda files shouldn't get entries in the recentf-list
> ;;;---------------------------------------------------------------------------

Knowing about `recentf-exclude' will certainly help many users, 
not only for excluding Org files.

Thanks,

-- 
 Bastien

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

* Re: Org agenda and recent files list....
  2012-08-10  7:21 ` Bastien
@ 2012-08-10 20:39   ` Robert Goldman
  2014-02-03  9:55     ` mohamed
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Goldman @ 2012-08-10 20:39 UTC (permalink / raw)
  To: Bastien; +Cc: Org Mode

On 8/10/12 Aug 10 -2:21 AM, Bastien wrote:
> Robert Goldman <rpgoldman@sift.info> writes:
> 
>> ;;;---------------------------------------------------------------------------
>> ;;; Agenda files shouldn't get entries in the recentf-list
>> ;;;---------------------------------------------------------------------------
> 
> Knowing about `recentf-exclude' will certainly help many users, 
> not only for excluding Org files.
> 
> Thanks,
> 

For what it's worth, a more fine-grained alternative would be to get
inside org-get-agenda-file-buffer and inhibit the recentf caching while
calling find-file inside there.

That would allow you to have an agenda file appear in the recent files
list IF it was opened through a manual use of find-file, but NOT if it
was opened as a side effect of loading an agenda.

This more fine-grained approach was a little more work than I wanted to
do, and didn't necessarily provide me a lot more value, so I didn't
bother with it.  But someone else might find it worth coding up.  Chacun
à son org configuration!

Cheers,
r

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

* Re: Org agenda and recent files list....
  2012-08-10 20:39   ` Robert Goldman
@ 2014-02-03  9:55     ` mohamed
  0 siblings, 0 replies; 4+ messages in thread
From: mohamed @ 2014-02-03  9:55 UTC (permalink / raw)
  To: emacs-orgmode

Robert Goldman <rpgoldman <at> sift.info> writes:

> 
> On 8/10/12 Aug 10 -2:21 AM, Bastien wrote:
> > Robert Goldman <rpgoldman <at> sift.info> writes:
> > 
> >>
;;;---------------------------------------------------------------------------
> >> ;;; Agenda files shouldn't get entries in the recentf-list
> >>
;;;---------------------------------------------------------------------------
> > 
> > Knowing about `recentf-exclude' will certainly help many users, 
> > not only for excluding Org files.
> > 
> > Thanks,
> > 
> 
> For what it's worth, a more fine-grained alternative would be to get
> inside org-get-agenda-file-buffer and inhibit the recentf caching while
> calling find-file inside there.
> 
> That would allow you to have an agenda file appear in the recent files
> list IF it was opened through a manual use of find-file, but NOT if it
> was opened as a side effect of loading an agenda.
> 
> This more fine-grained approach was a little more work than I wanted to
> do, and didn't necessarily provide me a lot more value, so I didn't
> bother with it.  But someone else might find it worth coding up.  Chacun
> à son org configuration!
> 
> Cheers,
> r
> 
> 

It seems that absolute paths are needed in the definition of org files.
If org-agenda-files is defined using ~/org/.. this may not work since
recentf uses absolute paths.

Cheers,
Mohamed   

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

end of thread, other threads:[~2014-02-03  9:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-10  4:01 Org agenda and recent files list Robert Goldman
2012-08-10  7:21 ` Bastien
2012-08-10 20:39   ` Robert Goldman
2014-02-03  9:55     ` mohamed

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.