ymacs icon indicating copy to clipboard operation
ymacs copied to clipboard

*** no error message given ***

Open jcubic opened this issue 9 years ago • 2 comments

I have this command:

  Ymacs_Buffer.newCommands({
      exit: Ymacs_Interactive(function() {
          var buffs = ymacs.buffers.slice();
          (function loop() {
              var buff = buffs.shift();
              if (buff) {
                  if (buff.name != '*scratch*' && buff.dirty()) {
                      var msg = 'Save file ' + buff.name + ' yes or no?';
                      function next() {
                          ymacs.killBuffer(buff);
                          loop();
                      }
                      buff.cmd('minibuffer_yn', msg, function(yes) {
                          if (yes) {
                              buff.cmd('save_buffer_with_continuation',
                                       false,
                                       next);
                          } else {
                              next();
                          }
                      });
                  } else {
                      next();
                  }
              } else {
                  $('.DlDesktop').hide();
                  leash.terminal.focus(true);
              }
          })();
      })
  });

and when I call it using M-x and when there are no unsaved files I got exception: Uncaught s: *** no error message given *** from thelib.js file.

jcubic avatar Dec 18 '15 17:12 jcubic

It work fine If I call it from C-x C-c.

jcubic avatar Dec 18 '15 20:12 jcubic

I don't get that error if I don't kill *scratch* buffer.

jcubic avatar Dec 20 '15 18:12 jcubic