all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Starting buffer configuration
@ 2011-12-31 10:10 Yotam Avital
  2011-12-31 21:32 ` Drew Adams
  0 siblings, 1 reply; 6+ messages in thread
From: Yotam Avital @ 2011-12-31 10:10 UTC (permalink / raw)
  To: help-gnu-emacs

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

Hi guys.

I'm using emacs for several projects. I find the bookmark feature very
useful. How can I set emacs launch in my bookmark page (or any other page
for that matter)?

Thanks

-- 
My other email account has a "professional" signature.

[-- Attachment #2: Type: text/html, Size: 383 bytes --]

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

* RE: Starting buffer configuration
  2011-12-31 10:10 Yotam Avital
@ 2011-12-31 21:32 ` Drew Adams
  0 siblings, 0 replies; 6+ messages in thread
From: Drew Adams @ 2011-12-31 21:32 UTC (permalink / raw)
  To: 'Yotam Avital', help-gnu-emacs

> I'm using emacs for several projects. I find the bookmark
> feature very useful. How can I set emacs launch in my
> bookmark page (or any other page for that matter)?

Put this at the end of your init file (~/.emacs):

(require 'bookmark)
(call-interactively 'bookmark-bmenu-list)

Or if you use Bookmark+, change the first line to (require 'bookmark+).  (The
Bookmark+ files need to be in your `load-path', for that.  Bookmark+ is here:
http://www.emacswiki.org/cgi-bin/wiki/BookmarkPlus.)

The reason you need to use `call-interactively' and not just
`(bookmark-bmenu-list)' is that `bookmark-bmenu-list' does not show the buffer
unless it is called interactively.  It includes this code:

(if (called-interactively-p 'interactive)
     (switch-to-buffer buf) ; Show it
  (set-buffer buf))) ; Just create it, without showing it.

(`bookmark-bmenu-list' is the command you use when you hit `C-x r l' to show the
bookmark list.)





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

* Re: Starting buffer configuration
@ 2011-12-31 22:01 Silvio Levy
  2011-12-31 22:23 ` Drew Adams
  0 siblings, 1 reply; 6+ messages in thread
From: Silvio Levy @ 2011-12-31 22:01 UTC (permalink / raw)
  To: Drew Adams; +Cc: help-gnu-emacs, 'Yotam Avital'


Dear Drew,

Thanks for this very informative answer to Yotam's question.  
I just checked out Bookmark+ and it looks good: thanks for writing it!

I get an error when doing exactly as you said (having placed the 8
bookmark+* files on my emacs path). The whole debug output is copied
after my signature; the gist (which appears when I type C-x r l) is

Symbol's function definition is void: with-buffer-modified-unmodified

I'm using GNU Emacs 23.1.50.1.

Silvio Levy




Debugger entered--Lisp error: (void-function with-buffer-modified-unmodified)
  (with-buffer-modified-unmodified (save-excursion (save-window-excursion ... ... ... ...)))
  (progn (unless no-msg-p (message "Showing file names...")) (with-buffer-modified-unmodified (save-excursion ...)) (unless no-msg-p (message "Showing file names...done")) (when (and ... ...) (fit-frame-if-one-window)))
  (if (or force bookmark-bmenu-toggle-filenames) (progn (unless no-msg-p ...) (with-buffer-modified-unmodified ...) (unless no-msg-p ...) (when ... ...)))
  (when (or force bookmark-bmenu-toggle-filenames) (unless no-msg-p (message "Showing file names...")) (with-buffer-modified-unmodified (save-excursion ...)) (unless no-msg-p (message "Showing file names...done")) (when (and ... ...) (fit-frame-if-one-window)))
  bookmark-bmenu-show-filenames(nil)
  (if bookmark-bmenu-toggle-filenames (bookmark-bmenu-show-filenames no-msg-p) (bookmark-bmenu-hide-filenames no-msg-p))
  (let ((bookmark-bmenu-toggle-filenames ...)) (if bookmark-bmenu-toggle-filenames (bookmark-bmenu-show-filenames no-msg-p) (bookmark-bmenu-hide-filenames no-msg-p)))
  bookmark-bmenu-toggle-filenames(t)
  (progn (bookmark-bmenu-toggle-filenames t))
  (if bookmark-bmenu-toggle-filenames (progn (bookmark-bmenu-toggle-filenames t)))
  (when bookmark-bmenu-toggle-filenames (bookmark-bmenu-toggle-filenames t))
  (let* ((inhibit-read-only t) (title ...) (show-image-file-icon-p ...)) (erase-buffer) (when (fboundp ...) (remove-images ... ...)) (insert (format "%s\n%s\n" title ...)) (add-text-properties (point-min) (point) (bmkp-face-prop ...)) (goto-char (point-min)) (insert (format "Bookmark file:\n%s\n\n" bmkp-current-bookmark-file)) (forward-line bmkp-bmenu-header-lines) (let (... name markedp tags annotation temporaryp start) (setq bmkp-sorted-alist ...) (dolist ... ...) (setq max-width ...) (dolist ... ... ... ... ... ... ... ... ... ... ... ...)) (goto-char (point-min)) (forward-line bmkp-bmenu-header-lines) (bookmark-bmenu-mode) (when bookmark-bmenu-toggle-filenames (bookmark-bmenu-toggle-filenames t)) (when (and ... ...) (fit-frame-if-one-window)))
  bmkp-bmenu-list-1(filteredp nil 1)
  (let ((bookmark-alist ...)) (bmkp-bmenu-list-1 (quote filteredp) nil msgp))
  (cond ((and bmkp-bmenu-first-time-p bmkp-bmenu-state-file ...) (let ... ... ...) (setq bmkp-bmenu-first-time-p nil) (let ... ...) (when ... ...) (when ... ...) (when bmkp-last-bmenu-bookmark ...)) (t (setq bmkp-bmenu-first-time-p nil) (bmkp-bmenu-list-1 filteredp ... msgp)))
  bookmark-bmenu-list(nil 1)
  call-interactively(bookmark-bmenu-list)
  eval-buffer(#<buffer  *load*> nil "/home/levy/.emacs" nil t)  ; Reading at buffer position 328
  load-with-code-conversion("/home/levy/.emacs" "/home/levy/.emacs" t t)
  load("~/.emacs" t t)
  #[nil "\b\205\264emacs" windows-nt directory-files nil "^\\.emacs\\(\\.elc?\\)?$" "~/.emacs" "^_emacs\\(\\.elc?\\)?$" "~/_emacs" "/.emacs" t load expand-file-name "init" file-name-as-directory "/.emacs.d" file-name-extension "elc" file-name-sans-extension ".el" file-exists-p file-newer-than-file-p message "Warning: %s is newer than %s" sit-for 1 "default" alt inhibit-default-init inhibit-startup-screen] 7]()
  command-line()
  normal-top-level()



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

* RE: Starting buffer configuration
  2011-12-31 22:01 Silvio Levy
@ 2011-12-31 22:23 ` Drew Adams
  0 siblings, 0 replies; 6+ messages in thread
From: Drew Adams @ 2011-12-31 22:23 UTC (permalink / raw)
  To: levy; +Cc: help-gnu-emacs, 'Yotam Avital'

> Thanks for this very informative answer to Yotam's question.  
> I just checked out Bookmark+ and it looks good: thanks for writing it!

Thanks for trying it, Silvio.

> Symbol's function definition is void: with-buffer-modified-unmodified
> I'm using GNU Emacs 23.1.50.1.   Silvio Levy

Thanks for providing your Emacs version.  Please download bookmark+-bmu.el again
and try once more.

It turns out that macro `with-buffer-modified-unmodified' was added in Emacs
23.2, not in Emacs 23.1.  My code was testing (< emacs-major-version 23).  I
corrected it to test whether the version is less than 23.2.

BTW, you are apparently using an old development version of Emacs.  If you can,
you should probably upgrade to at least Emacs 23.2 (or downgrade to Emacs 23.1).
Your version is likely to contain extra bugs. ;-)

Thx - Drew




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

* Re: Starting buffer configuration
@ 2011-12-31 22:55 Silvio Levy
  2011-12-31 23:10 ` Drew Adams
  0 siblings, 1 reply; 6+ messages in thread
From: Silvio Levy @ 2011-12-31 22:55 UTC (permalink / raw)
  To: Drew Adams; +Cc: help-gnu-emacs, 'Yotam Avital'


Thanks. Strangely, when I tried with the new mu file in place I got a
blank screen forever and no interaction, as if it were in an infinite
loop. The last message was "loaded /etc/emacs/site-start.d/50psvn.el".
Quitting and repeating made no difference. Then as soon as I placed
(setq debug-on-quit t) in my .emacs, it started working.

> BTW, you are apparently using an old development version of Emacs.
> If you can, you should probably upgrade to at least Emacs 23.2 (or
> downgrade to Emacs 23.1).

I just run what "sudo apt-get install emacs-snapshot-dbg" gives me.
These days I'm reluctant to install/upgrad large software packages
other than via the ubuntu repository.  When something goes wrong
it's a daunting task to fix it...

Silvio


> > Thanks for this very informative answer to Yotam's question.  
> > I just checked out Bookmark+ and it looks good: thanks for writing it!
> 
> Thanks for trying it, Silvio.
> 
> > Symbol's function definition is void: with-buffer-modified-unmodified
> > I'm using GNU Emacs 23.1.50.1.   Silvio Levy
> 
> Thanks for providing your Emacs version.  Please download bookmark+-bmu.el ag
> ain
> and try once more.
> 
> It turns out that macro `with-buffer-modified-unmodified' was added in Emacs
> 23.2, not in Emacs 23.1.  My code was testing (< emacs-major-version 23).  I
> corrected it to test whether the version is less than 23.2.
> 
> BTW, you are apparently using an old development version of Emacs.  If you can,
> you should probably upgrade to at least Emacs 23.2 (or downgrade to Emacs 23.1).
> Your version is likely to contain extra bugs. ;-)
> 
> Thx - Drew
> 



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

* RE: Starting buffer configuration
  2011-12-31 22:55 Starting buffer configuration Silvio Levy
@ 2011-12-31 23:10 ` Drew Adams
  0 siblings, 0 replies; 6+ messages in thread
From: Drew Adams @ 2011-12-31 23:10 UTC (permalink / raw)
  To: levy; +Cc: help-gnu-emacs, 'Yotam Avital'

> Thanks. Strangely, when I tried with the new mu file in place I got a
> blank screen forever and no interaction, as if it were in an infinite
> loop. The last message was "loaded /etc/emacs/site-start.d/50psvn.el".

Sorry for your trouble.  I'm not familiar with that Lisp file (50psvn.el).  I
suggest we take the problem off list to debug it.

> Quitting and repeating made no difference. Then as soon as I placed
> (setq debug-on-quit t) in my .emacs, it started working.

Try starting from `emacs -q --no-site-file' (no init file and no site startup
file).  Then evaluate the two sexps (requiring the library and invoking
bookmark-bmenu-list) by putting the cursor after each and hitting `C-x C-e'.

If you still see a problem that way then let's investigate off list.

If it works that way, try with just `emacs -q' (site file but no init file).  If
that works too, then bisect your init file repeatedly until you find what causes
the problem.

Another thing you can try with `emacs -q --no-site-file' is `M-x
bookmark-bmenu-list'.  IOW, invoke it interactively instead of in your init
file.  That should change nothing, but trying it will tell.  And you can try
that without loading Bookmark+ (i.e., just vanilla Emacs), to see if that makes
a difference.




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

end of thread, other threads:[~2011-12-31 23:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-31 22:55 Starting buffer configuration Silvio Levy
2011-12-31 23:10 ` Drew Adams
  -- strict thread matches above, loose matches on Subject: below --
2011-12-31 22:01 Silvio Levy
2011-12-31 22:23 ` Drew Adams
2011-12-31 10:10 Yotam Avital
2011-12-31 21:32 ` Drew Adams

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.